Smart Home Automation Forum
KC868-A16 work with relay board by RS485 modbus in ESPHome - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=20)
+--- Forum: KC868-A16 (https://www.kincony.com/forum/forumdisplay.php?fid=25)
+--- Thread: KC868-A16 work with relay board by RS485 modbus in ESPHome (/showthread.php?tid=2754)

Pages: 1 2


RE: KC868-A16 work with relay board by RS485 modbus in ESPHome - admin - 07-11-2023

how to wire? why not let 4pcs of A16 board all connect to your router by network cable?


RE: KC868-A16 work with relay board by RS485 modbus in ESPHome - Dario - 07-11-2023

(07-11-2023, 01:44 PM)admin Wrote: how to wire? why not let 4pcs of A16 board all connect to your router by network cable?

RS485. Maybe its the wrong method, but I would like to make them communicate even when the network might be down. 1 can be connected straight to a HA server.


RE: KC868-A16 work with relay board by RS485 modbus in ESPHome - admin - 07-11-2023

ok, if you want to add 4pcs A16 board on one modbus , just need to add "modbus_controller_id", here is example of use 2pcs A16 board:

modbus_controller:
- id: a16a
address: 1
modbus_id: modbus1
update_interval: 3s

modbus_controller:
- id: a16b
address: 1
modbus_id: modbus1
update_interval: 3s

switch:

- platform: modbus_controller
modbus_controller_id: a16a
name: 'modbus-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1

- platform: modbus_controller
modbus_controller_id: a16b
name: 'modbus-switch1'
address: 0 # 0:relay1 1:relay2 ......
register_type: coil
bitmask: 1