home-assistant.io/source/_components/binary_sensor.modbus.markdown
Franck Nijhof ebca3218c7
🔥Removes linkable_title everywhere (#9772)
* Automatically create linkable headers

* Visually improve position of linkable header chain icon

* Do not auto link  headers on homepage

* Remove linkable_title everywhere

* 🚑 Re-instante linkable_title plugin as NOOP
2019-07-04 19:08:27 +02:00

1.8 KiB

layout, title, description, date, sidebar, comments, sharing, footer, logo, ha_category, ha_release, ha_iot_class
layout title description date sidebar comments sharing footer logo ha_category ha_release ha_iot_class
page Modbus Binary Sensor Instructions on how to set up Modbus binary sensors within Home Assistant. 2016-09-13 12:02 true false true true modbus.png
Binary Sensor
0.28 Local Push

The modbus binary sensor allows you to gather data from Modbus coils.

Configuration

To use your Modbus binary sensors in your installation, add the following to your configuration.yaml file:

# Example configuration.yaml entry
binary_sensor:
  - platform: modbus
    coils:
      - name: Sensor1
        hub: hub1
        slave: 1
        coil: 100
      - name: Sensor2
        hub: hub1
        slave: 1
        coil: 110

{% configuration %} coils: description: The array contains a list of coils to read from. required: true type: [map, list] keys: name: description: Name of the sensor. required: true type: string hub: description: The name of the hub. required: false default: default type: string slave: description: The number of the slave (Optional for TCP and UDP Modbus). required: true type: integer coil: description: Coil number. required: true type: integer {% endconfiguration %}

It's possible to change the default 30 seconds scan interval for the sensor updates as shown in the Platform options documentation.

Full example

Example a sensor with a 10 seconds scan interval:

binary_sensor:
  - platform: modbus
    scan_interval: 10
    coils:
      - name: Sensor1
        hub: hub1
        slave: 1
        coil: 100
      - name: Sensor2
        hub: hub1
        slave: 1
        coil: 110