If my Home Assistant goes down, then my home is dark. To avoid that, I have added a smart switch connected to the physical switch over the control signal, to turn on lights even when HA is missing. So far so good.
Now I wanted to replace my bulbs with smart ones. Please note: I still want the smart switch, but I also want the RGB dimming fun. The new problem is that when bulbs are unpowered, they will soon go offline and need to be rediscovered, which is not good.
Well, new problem = new solution: isnât it the hobby?
The new solution was automation. It works with two components. First I created a Boolean helper and I changed it status via automation whenever the lamp-group status went up or down. I needed the helper to store this status since I cannot query the lam-group when it is unpowered. Second I created an automation on the smart switch triggered by the switch going off event. Once activated, the automation brings the switch on again, and based on Boolean helper status, turn the light on or off.
It looks complex, but I tested it and it works perfectly. I can use the physical switch, and this works also when home assistant is down. Additionally, I can turn on my lights using a smart-button or the HA app on my phone. The logic is fully validated by testing, but sometime it doesnât work.
After investigation, I discovered that it fails when zigbee decides to change the communication route to the smart-switch. Normally this device is connected directly to the zigbee controller, but sometime it chooses a bulb as router. When it happens the my automation is in trouble because it includes a step where the smart-switch goes down because of the control signal from the physical switch, but then the automation bring it immediately up. The problem is that when the communication path is across the bulb as a router, since the bulb is now unpowered, then the command to bring the smart-switch up again doesnât arrive, or arrives several seconds later when zigbee finds a new communication path.
The explanation is long, but you asked and you have it :-). As you can see I have a reason for doing that. Maybe there are different way for implementing a solution, but my goal is fully legit in a home automation environment, and Iâm sure many folks want to be able to control their lights also in an emergency situation when Home Assistant is down.
Now that we have validated the reason why I (or anybody in the community) want that, can we focus on the solution? I need a way to prevent the smartswitch device from using those bulbs as router. It looks that on the device itself I cannot provide any hint about the route. Moving to the bulbs, it seems there isnât a way to disable the routing feature. Iâm also trying to see if I can force-set the bulb LQI to the lowest value to reduce the path quality to a level that it will not be selected, but it seems it is not possible.
It looks it is a zigbee limitation that developers do not want to address because they feel it goes against the zigbee âphilosophical theoryâ, but I think this is not correct.
Unless we find a workaround, I guess I should replace my zigbee smartswitch with an equivalent over WiFi.
THANK YOU it is a long post