Jump to content

Why isn't this program functioning like I think it should?


gweempose

Recommended Posts

I created a program that is supposed to turn on an "Entry Lighting" scene if the door is unlocked via the outside keypad after the sun has set. As it stands, the program is turning on the lights every day as soon as the sun sets. What am I doing wrong?

Entry Lighting - Front Door - [ID 0026][Parent 0025]

If
        Status  'Z-Wave / Lock - Front Door' is Access Code 1
    And From    Sunset 
        To      Sunrise (next day)
 
Then
        Set Scene 'Entry Lighting' On
 
Else
   - No Actions - (To add one, press 'Action')
 


Link to comment

The program triggers at sunset and sunrise. The access code, once set to 1 stays at 1. So at sunset the program triggers and sees the access code is set to 1 and turns on the entry lighting. Somehow you need to reset the access code. Maybe by doing a lock from the ISY. I haven't played with trying to reset the door lock status.

Link to comment

The program triggers at sunset and sunrise. The access code, once set to 1 stays at 1. So at sunset the program triggers and sees the access code is set to 1 and turns on the entry lighting. Somehow you need to reset the access code. Maybe by doing a lock from the ISY. I haven't played with trying to reset the door lock status.

 

Thanks! You made me realize that I was keying off the status, when I should be keying off the control. I just tweaked the program. I think this will do what I want it to ...

Entry Lighting - Front Door - [ID 0026][Parent 0025]

If
        Control 'Z-Wave / Lock - Front Door' is switched Unlocked by Keypad
    And From    Sunset 
        To      Sunrise (next day)
 
Then
        Set Scene 'Entry Lighting' On
 
Else
   - No Actions - (To add one, press 'Action')
 


Edited by gweempose
Link to comment

I haven't used that scenario. Not sure that CONTROL will work with a Z-Wave device, typically it doesn't, but I hope it works for you.

 

If not, you may want to split this up into 2 programs.

 

if door unlocked

 run program 2

 

program 2

if sunset to sunrise

 turn entry light on

 

and set program 2 to disabled so it doesn't run automatically at sunset.

Link to comment

 

Thanks! You made me realize that I was keying off the status, when I should be keying off the control. I just tweaked the program. I think this will do what I want it to ...

 

"control" is a transient EVENT, not a STATE. "control" has no "memory".

 

Your second program will turn the light on when the keypad is operated to unlock, so long as it is between sunset and sunrise (next day).

 

If I understand you correctly, you want the light to come on from sunset to sunrise, provided that the gate was last opened by the keypad.

 

You will have to maintain some variable. Set it true when the door is switched unlocked by keypad.

 

Set it false, when ??? (What did you have in mind?)

Link to comment

Looks perfect!

 

Controls only true when it calls the CPU to execute the logic evaluation.

 

This means when the sunset trigger gets attention for evaluation the control is always False.

 

Whenever you want to use the time frame logic only as a filter you need another program or use Control for the trigger element.

 

With variable values as triggers, a second trigger disabled program is necessary for the time frame not to trigger Then at the start node and Else at the termination node.

Link to comment

... you may want to split this up into 2 programs.

 

if door unlocked

 run program 2

 

program 2

if sunset to sunrise

 turn entry light on

 

and set program 2 to disabled so it doesn't run automatically at sunset.

 

I didn't realize you could have one program run another program even if the second program is disabled. Good to know. 

 

Your second program will turn the light on when the keypad is operated to unlock, so long as it is between sunset and sunrise (next day).

 

Excellent! That's exactly what I want it to do.

Link to comment

I didn't realize you could have one program run another program even if the second program is disabled. Good to know.

 

Other than manually, that's the only way to run a disabled program.

 

Edit: wrong word corrected.

Edited by stusviews
Link to comment

Looks perfect!

 

Controls only true when it calls the CPU to execute the logic evaluation.

 

This means when the sunset trigger gets attention for evaluation the control is always False.

 

Whenever you want to use the time frame logic only as a filter you need another program or use Control for the trigger element.

 

With variable values as triggers, a second trigger disabled program is necessary for the time frame not to trigger Then at the start node and Else at the termination node.

 

This is excellent information. I will certainly keep this in mind when setting up time based programs in the future.

 

Thanks for all the help, guys!!!

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

×
×
  • Create New...