接入modbus设备
操作步骤
-
Modbus协议
-
HomeAssistant中Modbus的配置
-
具体设备配置
- 协议不全的问题与解决
参考
- LH-04继电器模块的配置
```yaml modbus: # - name: hub_tcp # type: rtuovertcp # host: 192.168.31.246 # port: 8899 - name: hub_serial type: serial method: rtu port: /dev/ttyUSB0 baudrate: 9600 stopbits: 1 bytesize: 8 parity: N
switch: platform: modbus coils: - name: switch1 hub: hub_serial slave: 1 coil: 0 - name: switch2 hub: hub_serial slave: 1 coil: 1 - name: switch3 hub: hub_serial slave: 1 coil: 2 - name: switch4 hub: hub_serial slave: 1 coil: 3 ```