03-31-2023, 09:13 AM
Hi,
Thanks for testing this!
In my case, the device represents the inputs/outputs as registers, not coils. I used the write_lambda in debugging the problem to make sure that I get the correct modbus command (which I know is now correct because the output actually toggles).
Have you checked if you can also read the inputs from the KC868-H32BS via RS485?
The weird thing in my case is that nothing comes in on the UART. Can you confirm that if you add this code to the UART definition in esphome, that you then can see incoming messages in addition to the outgoing messages?
Thanks for testing this!
In my case, the device represents the inputs/outputs as registers, not coils. I used the write_lambda in debugging the problem to make sure that I get the correct modbus command (which I know is now correct because the output actually toggles).
Have you checked if you can also read the inputs from the KC868-H32BS via RS485?
The weird thing in my case is that nothing comes in on the UART. Can you confirm that if you add this code to the UART definition in esphome, that you then can see incoming messages in addition to the outgoing messages?
Code:
logger:
level: DEBUG
debug:
direction: BOTH
dummy_receiver: false
after:
timeout: 1s
sequence:
- lambda: UARTDebug::log_hex(direction, bytes,' ');