Hey guys, I made a simple rule based on a group switch state on/off to switch on/off my 2 bulbs. This is the rule:
when
Item AlleLichten changed from OFF to ON
then
sendCommand(KeukenLamp, ON)
sendCommand(WoonkamerLamp, ON)
end
rule "Licht uit"
when
Item AlleLichten changed from ON to OFF
then
sendCommand(KeukenLamp, OFF)
sendCommand(WoonkamerLamp, OFF)
end
items file:
Group:Switch:OR(ON, OFF) AlleLichten "Alle lampies" ["Switchable"]
Switch WoonkamerLamp "WoonkamerLamp" (AlleLichten) ["Lighting"] {channel="milight:rgbwwLed:F0FE6B3BD6A2:1:ledbrightness"}
Switch KeukenLamp "KeukenLamp" (AlleLichten) ["Lighting"] {channel="milight:rgbwwLed:F0FE6B3BD6A2:2:ledbrightness"}
Now when I hit the switch in ClassicUI or through Google Assistant, I see the switches hop on and off again rapidly en randomly stops with one light on and one off. When I hit it a few times they all go off or on. These are the logs:
2019-02-28 11:27:48.863 [GroupItemStateChangedEvent] - AlleLichten changed from OFF to ON through KeukenLamp
2019-02-28 11:27:48.871 [vent.ItemStateChangedEvent] - KeukenLamp changed from OFF to ON
2019-02-28 11:27:48.878 [ome.event.ItemCommandEvent] - Item ‘KeukenLamp’ received command OFF
2019-02-28 11:27:48.887 [ome.event.ItemCommandEvent] - Item ‘KeukenLamp’ received command ON
2019-02-28 11:27:48.896 [ome.event.ItemCommandEvent] - Item ‘WoonkamerLamp’ received command ON
2019-02-28 11:27:48.899 [ome.event.ItemCommandEvent] - Item ‘WoonkamerLamp’ received command OFF
2019-02-28 11:27:48.903 [vent.ItemStateChangedEvent] - WoonkamerLamp changed from OFF to ON
2019-02-28 11:27:48.906 [nt.ItemStatePredictedEvent] - KeukenLamp predicted to become OFF
2019-02-28 11:27:48.909 [nt.ItemStatePredictedEvent] - KeukenLamp predicted to become ON
2019-02-28 11:27:48.914 [vent.ItemStateChangedEvent] - KeukenLamp changed from ON to OFF
2019-02-28 11:27:48.917 [nt.ItemStatePredictedEvent] - WoonkamerLamp predicted to become ON
2019-02-28 11:27:48.919 [nt.ItemStatePredictedEvent] - WoonkamerLamp predicted to become OFF
2019-02-28 11:27:48.922 [vent.ItemStateChangedEvent] - KeukenLamp changed from OFF to ON
2019-02-28 11:27:48.924 [vent.ItemStateChangedEvent] - WoonkamerLamp changed from ON to OFF
This is how the UI looks: