I have OH 3.1.0 running on a Mac running MacOS 11.5.2 (Big Sur). I have three Phillip Hues connected with the Zigbee binding. These are behind a z-wave switch (KitchenIslandLight_Switch). The idea is that when the switch is turned on, the color of the lights will change depending on whether it’s daylight or not. The rule looks like this:
rule "Kitchen Island Control"
when
Item KitchenIslandLight_Switch changed
then
if (KitchenIslandLight_Switch.state == ON) {
if (Daylight_Switch.state == OFF) {
KitchenIslandHue1_Color.sendCommand("42,100,70")
KitchenIslandHue2_Color.sendCommand("42,100,70")
KitchenIslandHue3_Color.sendCommand("42,100,70")
} else {
KitchenIslandHue1_Color.sendCommand("58,20,44")
KitchenIslandHue2_Color.sendCommand("58,20,44")
KitchenIslandHue3_Color.sendCommand("58,20,44")
KitchenIslandHue1_ColorTemp.sendCommand(50)
KitchenIslandHue2_ColorTemp.sendCommand(50)
KitchenIslandHue3_ColorTemp.sendCommand(50)
}
}
if (KitchenIslandLight_Switch.state == OFF) {
KitchenIslandHue1_Color.sendCommand(OFF)
KitchenIslandHue2_Color.sendCommand(OFF)
KitchenIslandHue3_Color.sendCommand(OFF)
}
end
The problem is that although all lights toggle on and off with the z-wave switch, the color of all three don’t always change appropriately when turned on and there is a delay in the change to occur (the default state is the non-daylight color). For example, 2 will change correctly but the third will not. Sometimes its one bulb and other times another bulb so this does not appear to be a bulb issue.
Could the zigbee commands be lost or garbled due to the rapid command succession? Is there a better way to accomplish insuring that all lights are set appropriately?