03-31-2023, 04:59 AM
use KC868-A16 work with KC868-H32BS by RS485 cable via modbus.
this is a demo , i have created one switch button in ESPHome, you can create many others.
KC868-H32BS use modbus command:
01 05 00 00 FF 00 CRC turn on relay1
01 05 00 00 00 00 CRC turn off relay1
make sure your relay board as these:
ON = 0xFF00 OFF=0000
if your relay board not use by this protocol. you can also write esphome as "write_lambda" way. i have tested, "write_lambda" to create switch also work fine. just need to create ON and OFF two command.
yaml files for KC868-A16 work with modbus switch:
ESPHome_A16_modbus_relay.txt (Size: 6.5 KB / Downloads: 545)
this is a demo , i have created one switch button in ESPHome, you can create many others.
KC868-H32BS use modbus command:
01 05 00 00 FF 00 CRC turn on relay1
01 05 00 00 00 00 CRC turn off relay1
make sure your relay board as these:
ON = 0xFF00 OFF=0000
if your relay board not use by this protocol. you can also write esphome as "write_lambda" way. i have tested, "write_lambda" to create switch also work fine. just need to create ON and OFF two command.
yaml files for KC868-A16 work with modbus switch:
ESPHome_A16_modbus_relay.txt (Size: 6.5 KB / Downloads: 545)