Smart Home Automation Forum
Issues with binary sensor of kc868_ha component in esphome/home assistant - 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-HA /HA v2 (https://www.kincony.com/forum/forumdisplay.php?fid=55)
+--- Thread: Issues with binary sensor of kc868_ha component in esphome/home assistant (/showthread.php?tid=8193)



Issues with binary sensor of kc868_ha component in esphome/home assistant - shavrin - 06-17-2025

I have tried to configure KS868-HA-V21 module with KC868-A6 using EspHome. Connection between A6 and KS686-HA works good, at least I can see debug logs, when attach K1 (or any other K pin) to GND:

Code:
[17:27:41][D][kc868_ha.component:019]: uart bus receive 1:10:0:a:0:6:c:65:3:0:0:0:0:0:0:0:0:0:0:f:b8
[17:27:41][D][kc868_ha.component:030]: uart crc=f:b8, calc crc=f:b8
[17:27:41][D][kc868_ha.component:043]: dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=1
[17:27:41][D][kc868_ha.component:043]: dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=2
[17:27:41][D][kc868_ha.component:043]: dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=3
[17:27:41][D][kc868_ha.component:043]: dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=4
[17:27:41][D][kc868_ha.component:043]: dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=5
[17:27:41][D][kc868_ha.component:043]: dump kc868_ha config, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=6
[17:27:41][D][kc868_ha.component:054]: found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=1
[17:27:41][D][kc868_ha.component:054]: found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=2
[17:27:41][D][kc868_ha.component:054]: found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=3
[17:27:41][D][kc868_ha.component:054]: found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=4
[17:27:41][D][kc868_ha.component:054]: found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=5
[17:27:41][D][kc868_ha.component:054]: found a kc868_ha board, target_relay_controller_addr=1, switch_adapter_addr=10, bind_output=6

But binary sensor doesn't worked as expected. Configuration for esphome taken fromĀ https://github.com/hzkincony/esphome-kc868-ha.

I have checked esphome-kc868-ha code, and looks, like module send "3" when K1 attached to GND and "0" when it's released. But module expect "1" and "2" values.

What can be done, to resolve this issue?

(I have multiple KC868-HA modules, and looks that all of them have the same issue)


RE: Issues with binary sensor of kc868_ha component in esphome/home assistant - admin - 06-18-2025

do you using HAv2 or HA module? can you take a photo of your product.


RE: Issues with binary sensor of kc868_ha component in esphome/home assistant - shavrin - 06-19-2025

I have HAv2.

But I think I have solved issues using HA CTR485 software. I have changed switcher type to EdgeEvent and Rising/Falling Edge to EvtOn and EvtOFF - and problem gone, binary sensor works correctly with EspHome.

So, problem is solved. Thank you.


RE: Issues with binary sensor of kc868_ha component in esphome/home assistant - admin - 06-19-2025

ok, good.