![]() |
|
HAv2 + ESPHome - Avoiding Frame Collision - 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: HAv2 + ESPHome - Avoiding Frame Collision (/showthread.php?tid=9958) |
HAv2 + ESPHome - Avoiding Frame Collision - phrfpeixoto - 11-18-2026 Hello there, I have a home setup with 3 E16S boards running ESPHome. Each one is connected to a series of HAv2 breakout boards through the RS485 bus. I'm using momentary switches very similar to the ones you sell, but they are from a different supplier. Each wall switch has digital inputs (K1 to K6, dry contact) and digital outputs (D1 to D6 - LEDs). LEDs go WHITE if I short Dx to GND. Otherwise, they stay AMBER In the YAML (attached), I configure every Kx press to: - Flip an output of the E16S - Flip an output of an HAv2 (Dx) so that the LED is White/Ambar based on the relay state The issue I'm having is inconsistent behavior between presses and LEDs. Sometimes presses are ignored. With ChatGPT's help and logs, we've figured out that the issue happens due to collisions on the RS485 bus: Repeated key presses collide with ESPHome's "reply" to flip the LED. This happens especially when: - A kid spams a switch - Someone presses two switches "at the same time" Is there a way to avoid this collision? Can you implement bus access arbitration in HAv2? RE: HAv2 + ESPHome - Avoiding Frame Collision - admin - 11-18-2026 you can test with KCS firmware. KCS firmware support HAv2 directly. RE: HAv2 + ESPHome - Avoiding Frame Collision - phrfpeixoto - 11-18-2026 Searching this forum, I also found this message: https://www.kincony.com/forum/showthread.php?tid=9875&pid=27616#pid27616 That user states more or less the same thing that ChatGPT found in my testing: UART read in fixed byte windows. In fact, the AI suggested some changes in a fork we made: https://github.com/phrfpeixoto/esphome-kc868-ha/tree/improve-rx-tx-transmission He also states: Quote:For production we plan to poll each TS only every 90 minutes, only when the bus has been quiet, and never within a few seconds of a button press. That keeps the remaining collision risk very small. I also tried this approach of delaying the update to Dx outputs, but the collision still happens every so often. Disabling Dx altogether made the switches work waaaaay more reliably. Quote:it receives status reports from the F24 regarding the corresponding lights (where the panel indicator reflects the relay state, and all nodes update their status accordingly) Can you please provide more details about this? How can we implement this response payload? Quote:In a home automation context, the probability of switches being pressed simultaneously is extremely low. It happens every single day in here. Try having kidsĀ
|