Using a zigbee RGB light behind a zwave switch as a SMH monitor


#1

1) Give a description of the problem
Looking to write a piston to turn an RGB bulb that is part of a group red when SHM is set to Armed-Stay. A little more detail is in order. I have the basic piston working as mentioned above, but I’m looking to expand it. The RGB bulb is 1 of 5 RGB bulbs that are recessed in my kitchen, they are all zigbee. Furthermore, I have a Z-wave light switch that turns them all on and off for every day usage. I’d like the piston to work as follows, but I am a total programming logic dummy:

2) What is the expected behaviour?
If kitchen switch is OFF and SHM is set to Armed-Stay, then:

  • Turn on kitchen switch
  • Set RGB bulb 7 to level 25% and color red
  • Set RGB bulbs 1 through 6 to off

Conversely, if kitchen switch is ON and SHM is set to Armed-Stay, then:

  • Set RGB bulb 7 to level 25% and color red

Also, if the kitchen switch is turned OFF at any time WHILE SHM is set to Armed-Stay, then:

  • Turn on kitchen switch
  • Set RGB bulb 7 to level 25% and color red
  • Set RGB bulbs 1 through 6 to off)

3) What is happening/not happening?
(PUT YOUR INFO HERE)

**4) Post a Green Snapshot of the piston![image|45x37]


5) Attach logs after turning logging level to Full

REMOVE BELOW AFTER READING
If a solution is found for your question then please mark the post as the solution.


#2

try this:

If SHM changes to Armed or Stay
   then 
   With Kitchen switch turn ON
   then
   With RGB bulb 7 set to level %25 and color red
   then 
   With 
   Rgb bulbs, 1, 2, 3, 4, 5, 6 do turn OF

IF kitchten switch changes to OFF
AND
IF SHM is armed-stay
   Then 
   With RGB bulb 7 set to level %25 and color red
   then 
   With 
   Rgb bulbs, 1, 2, 3, 4, 5, 6 do turn OF

#3

Slight modification to @ike2018’s great suggestion:

If SHM changes to Armed or Stay           <--trigger
then 
   if Kitchen switch is off                           <--condition
     With Kitchen switch turn ON
     With Rgb bulbs 1, 2, 3, 4, 5, 6 do turn OFF
   end if
   With RGB bulb 7 set to level %25 and color red
end if

IF kitchten switch changes to OFF           <-- trigger
    AND SHM is armed-stay                      <--condition
Then 
   With Kitchen switch turn ON
   With RGB bulb 7 set to level %25 and color red 
   With Rgb bulbs, 1, 2, 3, 4, 5, 6 do turn OFF
end if

#4

Thanks a ton for this… What it really shows me is that my real weakness is in writing these pistons… I’ll put my mind to it and figure it out!