My Home Assistant (HA) is running in a Docker container inside iHost. While this setup isn’t ideal, it serves my basic automation and integration needs effectively. All Zigbee devices and entities connected to iHost are accessible/exposed to HA through the HomeKit integration (which server runs in another docker container). I’ve included a schematic below for visualization:
In iHost, I’ve set up the following automation: when a Zigbee button from Sonoff is pressed, it controls a Sonoff Mini R4. This automation works flawlessly, as expected since all components are from the same brand. However, I’m now considering using one of my two buttons (either SNZB-01 or SNZB-01P) to turn on/off a ceiling fan from a different brand, trough HA.
During the setup process, I noticed that both buttons trigger an event every 2 hours. For test purposes, I recreated the same automation i have in HA. Indeed the lamp controlled by the Sonoff Mini R4 also turns on and off every 2 hours (without anyone pressing the button).
My suspicion is that this periodic event might be related to a “Zigbee update” performed by iHost, which HA interprets as a button click. Strangely, neither the device logs in iHost nor the HomeKit logs show any triggers during these events.
Does anyone have any insights into what might be happening, or how I can troubleshoot this further?
It’s probably a heartbeat message, but you haven’t pasted the (correctly formatted) automation or the events for either a genuine button click or the periodic event, so I can only speculate.
How is your automation triggered? I had a similar issue a while ago with Philips Hue buttons (using a Hue hub), which registered a “press” whenever Philips issued a firmware update… As I recall, I was using the event timestamp as a “state” to trigger the automation (as suggested in the docs) and the update appeared to be changing it.
I’m putting my money on the Homekit integration not sending more data in your event then.
It should be sending an event based on the command, cluster_id and endpoint_id, similar to the logic in this ZHA Blueprint
I have found the hearbeat message. The Ewelink CUBE Plugin inside homebridge docker container send a periodic message with the signal intensity in dbm (RSSI).
Problably homebridge fowards this to the HA HomeKit Integration and it interprets that as a button press. I’m trying to investigate further and have made some changes.