A quick and dirty hack for a couple of scenes triggered from a fibaro dimmer 2, might be useful to you:
rule "Kitchen Party Mode ON" when Item PartyMode changed from OFF to ON then
PartyTimer?.cancel
PartyTimer = createTimer(now, [ |
if(PartyMode.state == ON){
KitchenSpots1?.members.forEach(KitchenSpots1|
sendCommand(KitchenSpots1, (((Math::random * 255).intValue)) + "," + 100 + "," + 70)
)
PartyTimer.reschedule(now.plusMillis(2000))
}])
end
rule "Kitchen Party Mode OFF" when Item PartyMode changed from ON to OFF then
PartyTimer?.cancel
PartyTimer = null
KitchenLights?.members.forEach(KitchenLights|
sendCommand(KitchenLights,"39,1,100"))
KitchenScene.postUpdate(1)
end
rule "Kitchen Scene" when Item KitchenLightScene received update 14 then
if(KitchenLightDimmer.state == OFF). {KitchenLightDimmer.sendCommand(ON)}
if(KitchenScene.state == 1 || KitchenScene.state == NULL)
{KitchenSpots.sendCommand("20,80,79")AboveLightColour.sendCommand("10,86,79")BelowLightColour.sendCommand("10,86,79")PlynthLightColour.sendCommand("10,86,79")KitchenTVLights.sendCommand("10,86,79")KitchenScene.postUpdate(2)}
else if(KitchenScene.state == 2)
{KitchenSpots.sendCommand("3,100,79")AboveLightColour.sendCommand("41,80,79")BelowLightColour.sendCommand("41,80,79")PlynthLightColour.sendCommand("41,80,79")KitchenTVLights.sendCommand("41,80,79")KitchenScene.postUpdate(3)}
else if(KitchenScene.state == 3)
{KitchenSpots.sendCommand("281,38,49")AboveLightColour.sendCommand("17,64,49")BelowLightColour.sendCommand("17,64,49")PlynthLightColour.sendCommand("41,80,79")KitchenTVLights.sendCommand("17,64,49")KitchenScene.postUpdate(10)}
else if(KitchenScene.state == 4)
{KitchenSpots.sendCommand("333,35,49")KitchenScene.postUpdate(5)}
else if(KitchenScene.state == 5)
{KitchenSpots.sendCommand("20,83,49")KitchenScene.postUpdate(6)}
else if(KitchenScene.state == 6)
{KitchenSpots.sendCommand("254,51,54")KitchenScene.postUpdate(7)}
else if(KitchenScene.state == 7)
{KitchenSpots.sendCommand("197,100,54")KitchenScene.postUpdate(8)}
else if(KitchenScene.state == 8)
{KitchenSpots.sendCommand("198,100,54")KitchenScene.postUpdate(9)}
else if(KitchenScene.state == 9)
{KitchenSpots.sendCommand("261,100,54")KitchenScene.postUpdate(10)}
else if(KitchenScene.state == 10)
{KitchenSpots.sendCommand("254,51,54")AboveLightColour.sendCommand("171,100,54")BelowLightColour.sendCommand("171,100,54")PlynthLightColour.sendCommand("171,100,54")KitchenTVLights.sendCommand("198,100,54")KitchenScene.postUpdate(11)}
else if(KitchenScene.state == 11)
{KitchenSpots.sendCommand("3,100,79")AboveLightColour.sendCommand("39,36,79")BelowLightColour.sendCommand("39,36,79")PlynthLightColour.sendCommand("39,36,79")KitchenTVLights.sendCommand("10,86,79")KitchenScene.postUpdate(12)}
else if(KitchenScene.state == 12)
{KitchenSpots.sendCommand("281,38,49")AboveLightColour.sendCommand("17,64,49")BelowLightColour.sendCommand("17,64,49")PlynthLightColour.sendCommand("17,64,49")KitchenTVLights.sendCommand("281,38,60")KitchenScene.postUpdate(13)}
else if(KitchenScene.state == 13)
{KitchenSpots.sendCommand("340,59,85")AboveLightColour.sendCommand("343,18,85")BelowLightColour.sendCommand("343,18,85")PlynthLightColour.sendCommand("343,18,85")KitchenTVLights.sendCommand("342,43,85")KitchenScene.postUpdate(14)}
else if(KitchenScene.state == 14)
{KitchenSpots.sendCommand("39,1,100")AboveLightColour.sendCommand("39,1,100")BelowLightColour.sendCommand("39,1,100")PlynthLightColour.sendCommand("39,1,100")KitchenTVLights.sendCommand("39,1,100")KitchenScene.postUpdate(1)}
end
rule "Kitchen Bottom" when Item KitchenLightScene3 received update 26 then
if(PlynthLight.state == OFF || PlynthLightColour.state == NULL) {PlynthLight.postUpdate(ON)PlynthLightColour.sendCommand("39,1,100")}
else {PlynthLight.postUpdate(OFF)PlynthLightColour.sendCommand("39,1,0")}
end
rule "Kitchen Party Mode" when Item KitchenLightScene received update 24 then
if(KitchenLightDimmer.state == OFF). {KitchenLightDimmer.sendCommand(ON)}
if(PartyMode.state == OFF || PartyMode.state == NULL){PartyMode.sendCommand(ON)}
if(PartyMode.state == ON). {PartyMode.sendCommand(OFF)}
end
@oeo Will give you the host hopefully for scenes and random lights for a disco