Jump to content

Help with program at sunset to sunrise W/ Open Close


sdynak

Recommended Posts

Hi Guys, Gals

I have a simple program that turns my hall light on from sunset to sunrise when either my front or basement door opens and will shut it off after 2 minutes. 

 Everything works as I would like except if I have my front door open (for light or fresh air) when it hits sunset the light comes on. Although it's not a big deal I would prefer to make it somehow that if the door is actually open at that time to not come on unless it were closed & open again. I don't see the basement door being open at times but the front is very likely especially with fall being here. 

Any thoughts if there is a creative way to make this happen? I can see this being useful for my rear outside light also with my sliders. Program is very similar. 

 

Hallway Auto Light - [ID 0021][Parent 0001]

If
        From    Sunset  +  1 minute
        To      Sunrise -  1 minute (next day)
    And (
             Status  'Front-Door / Front Door-Opened' is On
          Or Status  'Basement Stairs Door-Opened' is On
        )
 
Then
        Set Scene 'Hallway Auto Light' On
 
Else
        Wait  2 minutes 
        Set Scene 'Hallway' Off
 

Thanks!

Stan

Link to comment
1 hour ago, sdynak said:

Hi Guys, Gals

I have a simple program that turns my hall light on from sunset to sunrise when either my front or basement door opens and will shut it off after 2 minutes. 

 Everything works as I would like except if I have my front door open (for light or fresh air) when it hits sunset the light comes on. Although it's not a big deal I would prefer to make it somehow that if the door is actually open at that time to not come on unless it were closed & open again. I don't see the basement door being open at times but the front is very likely especially with fall being here. 

Any thoughts if there is a creative way to make this happen? I can see this being useful for my rear outside light also with my sliders. Program is very similar. 

 

Hallway Auto Light - [ID 0021][Parent 0001]

If
        From    Sunset  +  1 minute
        To      Sunrise -  1 minute (next day)
    And (
             Status  'Front-Door / Front Door-Opened' is On
          Or Status  'Basement Stairs Door-Opened' is On
        )
 
Then
        Set Scene 'Hallway Auto Light' On
 
Else
        Wait  2 minutes 
        Set Scene 'Hallway' Off
 

Thanks!

Stan

When the time frame triggers Then or Else (it triggers both) the door logic is also true causing Then to run.
Time frame logic is a combination of status and edge trigger, making it a dual purpose logic condition. It can act like a status condition for another  trigger (passive) , as well as trigger on both nodes (active).


Use Control/switched logic instead of status logic. Then the If sensing logic can be true only when the sensors are initially switched On . Sensor status would be true during the whole time the door is open.

Hallway Auto Light - [ID 0021][Parent 0001]

If
        From    Sunset  +  1 minute
        To      Sunrise -  1 minute (next day)
    And (
             Control  'Front-Door / Front Door-Opened' is Switched On
          Or Control  'Basement Stairs Door-Opened' is Switched On
        )
 
Then
        Set Scene 'Hallway Auto Light' On
 
Else
        Wait  2 minutes 
        Set Scene 'Hallway' Off

 

Link to comment

Not trying to hijack the thread, but wondering Larry if you or someone else knows if there’s a similarly elegant way to do this if using Elk zones as triggers? I have a similar problem that I haven’t tackled (nor attempted in earnest) since I assumed it would require extra programs and what I have works and is complicated enough for now. As I understand the Elk zones essentially are evaluated as Insteon “status” rather than “control”


Sent from my iPhone using Tapatalk

Link to comment
10 minutes ago, TrojanHorse said:

Not trying to hijack the thread, but wondering Larry if you or someone else knows if there’s a similarly elegant way to do this if using Elk zones as triggers? I have a similar problem that I haven’t tackled (nor attempted in earnest) since I assumed it would require extra programs and what I have works and is complicated enough for now. As I understand the Elk zones essentially are evaluated as Insteon “status” rather than “control”


Sent from my iPhone using Tapatalk

Use two programs. The "control" triggers wanted are installed in the first program. It's "Then" calls the second program.

The second program must be "disabled". Here is where you put your elements you do NOT want to cause any triggering that could cause restarting, stopping or running Else.
Note: Program Disable only disables triggers in the program and doesn't stop it running. The program becomes similar to  linear program coding.

Link to comment
Use two programs. The "control" triggers wanted are installed in the first program. It's "Then" calls the second program.
The second program must be "disabled". Here is where you put your elements you do NOT want to cause any triggering that could cause restarting, stopping or running Else.
Note: Program Disable only disables triggers in the program and doesn't stop it running. The program becomes similar to  linear program coding.

Thanks. So then I figure I’d have the Elk zone in the first program and have the then section call the IF of the 2nd (disabled) program that would have the time condition? I can probably handle that


Sent from my iPhone using Tapatalk
Link to comment

So although this change in program would resolve the initial issue it seems it introduces another.. Now with the control being set as the trigger, after set time in wait in else statement the lights do not shut off. Actually, I do not even see the program turn red as it has before when in countdown. It seems to skip over the else now. 

 Any thoughts?

Thanks,

Stan

Link to comment
2 hours ago, sdynak said:

So although this change in program would resolve the initial issue it seems it introduces another.. Now with the control being set as the trigger, after set time in wait in else statement the lights do not shut off. Actually, I do not even see the program turn red as it has before when in countdown. It seems to skip over the else now. 

 Any thoughts?

Thanks,

Stan

Sorry. An update was missed fixing the other part. :)

Hallway Auto Light - [ID 0021][Parent 0001]

If
        From    Sunset  +  1 minute
        To      Sunrise -  1 minute (next day)
    And (
             Control  'Front-Door / Front Door-Opened' is Switched On
          Or Control  'Basement Stairs Door-Opened' is Switched On
        )
 
Then
        Set Scene 'Hallway Auto Light' On
        Wait  2 minutes 
        Set Scene 'Hallway' Off 


Else        <---- still need this for the end of the time frame. ie: Sunrise - 1 min
      Wait  2 minutes 
        Set Scene 'Hallway' Off

Link to comment
33 minutes ago, sdynak said:

Thanks again Larry! I'll update it and see how it goes.. How do you know all this stuff :)??

It started out in 1964 with two 12 foot long 2 x 4s and a logarithm chart trying to build a slide rule that would yeild four digit accuracy (felt pens are not fine enough). Then in 1971 when the 8 bit CPU, expandable to  of 384 bytes, was released, and digital computers for the average person became possible, many addictions started :)

Link to comment
1 hour ago, sdynak said:

Thanks.. I do have a lot of folders organizing rooms itself with the milti devices in each. Don't use times with them yet but good to know. 

I think @Scott was referring to folders for programs. His American accent can be hard to read sometimes. :)  Both (not Scott and me) can have folders. I organise my device folders by rooms and my program folders by function.

Sorry. Too much HA in my life and I get crazy.....or so Scott would have you believe.

Link to comment

Archived

This topic is now archived and is closed to further replies.


  • Recently Browsing

    • No registered users viewing this page.
  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...