Modbus


Modbus is a serial communication protocol to control PLCs. It currently supports sensors and switches which can be controlled over serial, TCP and UDP connections.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Example configuration.yaml entry
modbus:
  type: serial
  method: rtu
  port: /dev/ttyUSB0
  baudrate: 9600
  stopbits: 1
  bytesize: 8
  parity: N

sensor:
  platform: modbus
  slave: 1
  registers:
    16:
      name: My integer sensor
        unit: C
    24:
      bits:
        0:
          name: My boolean sensor
        2:
          name: My other boolean sensor

switch:
  platform: modbus
  slave: 1
  registers:
    24:
      bits:
        0:
          name: My switch
        2:
          name: My other switch