Jump to content

workaround to get scene status?


domotinc-customs

Recommended Posts

all,

I have zen32 with buttons like "basement on" and basement off"

pressing it triggers a scene to turn on (or off) all the lights in the basement. pretty simple.

challenge is: I want zen32 leds to reflect the basement lights status. meaning if I go in the basement and manually turn on all the basement lights, I want the zen32 "basement ON" led to be lit.

only solution I can think of is to have a program that

IF light 1 and 2 and 3 and... and... and... 20 are ON,

then

set zen32 led to ON

 

anything smarter/elegant comes to mind?

thanks

Link to comment

That is pretty close to what I do, except in the THEN clause, I set a state variable $sBarnLightOn to 1 if any light is on and 0 otherwise. Then I use a second program that triggers off the state variable. The main reason I do this is in case I want to have multiple programs that take advantage of the lights being on or off flag  - for example, a program that sends a notification if the basement lights are left on past 10pm (and doesn't just shut them off in case I am in there).

I do the same thing with a state variable called '$sAnyZoneFaulted' which is a whole bunch of if statements on the node server nodes.

btw, in another case, I am not turning the light on and off, I am changing the color of the LED on the zen32 - this one just turns the lights on and off but you can use the other advanced settings to change the color.

Dormer light status - [ID 0020][Parent 0007]

If
        'Barn Dormer' Status is 100%
 
Then
        Wait  1 second
        Set 'Shop Loft-Binary' Set Configuration Parameter 3 = 3
        Wait  1 second
        Set 'Shop Loft-Binary' Set Configuration Parameter 5 = 2
 
Else
        Wait  1 second
        Set 'Shop Loft-Binary' Set Configuration Parameter 5 = 3
        Wait  1 second
        Set 'Shop Loft-Binary' Set Configuration Parameter 3 = 2
 

(at the time I am posting this, you can find the configuration parameters for the zen32 here: ZEN32 Scene Controller Advanced Settings - Zooz Support Center (getzooz.com) )

Edited by Andy P
Link to comment

yeah, I realized I needed to go through state variable because every time I was touching a light switch, it was triggering 10-12 program that were setting zen32 leds. figured that created a ton of unnecessary zwave traffic.

so zen32 trigger a scene on or off

another program monitor the state of all the lights in the switch and turn a state variable on or off

another program triggers on the state variable to change led on zen32

I realized that if you "change" the value of a state variable with the exact same value, it does not trigger a program with that variable in the IF.

can you elaborate on this? 

On 12/18/2023 at 5:20 PM, Andy P said:

I do the same thing with a state variable called '$sAnyZoneFaulted' which is a whole bunch of if statements on the node server nodes.

 

Link to comment
Guest
This topic is now closed to further replies.

×
×
  • Create New...