Comfort  Automation/ Security System Forums Home
Home Search search Menu menu Not logged in - Login | Register

How do I combine holiday, timer and sunset responses
 Moderated by: slychiu
 New Topic   Reply   Printer Friendly 
 Rate Topic 
AuthorPost
 Posted: Wednesday Dec 6th, 2017 01:22 am
   PM  Quote  Reply 
1st Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

As the title says, I want a program to run at sunset, but only for a set number of days.
Lets assume I want to turn on some lights at sunset, and off at midnight on those same days. I want this to happen for a month.

I have a pair of responses to control the lights at the times, but cannot figure out what is the best way to trigger them.

I can set a sunset response, but that will get triggered every day, all year.

I can use a time program to run at a given time when its a holiday. The problem with this is, the time program happens at a given time which is great for the midnight turn off, but not for sunset.
Also the holidays are single days, not for a duration of days.
Add to this, there are only 24 holiday entries.

If I could figure out how I can check which holiday has triggered my event I could set two holidays, one at the start and the other at the end, and then set or clear a flag that the sunset & midnight responses could check.
since I can't see a way to do this though, whats the best way to achieve what I am after ?

Cheers,
    john.



 Posted: Wednesday Dec 6th, 2017 12:02 pm
   PM  Quote  Reply 
2nd Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5493
Status: 
Offline

  back to top

Example
In the Sunset Response

if Month = 12 
 Then Do LightsOn
Endif

This will happen for the whole month of december

If you need to start in the middle of a month

If Month=12 and Days >=15 OR Month =1 and Days <15
Then do LightsOn
Endif

 



 Posted: Wednesday Dec 6th, 2017 04:23 pm
   PM  Quote  Reply 
3rd Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

ok, thanks for that.

So am I correct in thinking you can't actually trigger something off of when a holiday starts or stops as such, only check whether this day is a holiday ?
And you cant check which holiday day/period it is ?

I wanted to use a flag in my response rather than dates, so they are generic. I can do this by using another response to set the flag based on the dates as you have shown.
That still needs me to edit one or more responses rather than setting holidays (or timers). Ideally I want to avoid having to edit the responses for each 'holiday' period, as these change each year.

It would be really handy if it was possible to be able to set these periods using the tablet or phone app, rather than having to modify its programmed responses, otherwise the holiday entries are of limited use imo.

Thanks again for your reply.



 Posted: Wednesday Dec 6th, 2017 04:30 pm
   PM  Quote  Reply 
4th Post
slychiu
Administrator


Joined: Saturday Apr 29th, 2006
Location: Singapore
Posts: 5493
Status: 
Offline

  back to top

Correct. Holidays cannot trigger responses and you cannot check what holiday it is


You could use Time Programs to set and clear a flag for the days that the sunset response would act to turn on the lights
eg
Time Program 1 -
if Month=12 etc Set Flag X

Time Program 2
if Month=12 etc clear Flag X

In the sunset response you can test for Flag X



 Posted: Wednesday Dec 6th, 2017 05:13 pm
   PM  Quote  Reply 
5th Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

Thanks, I will do that.



 Posted: Wednesday Dec 6th, 2017 05:13 pm
   PM  Quote  Reply 
6th Post
John W
UCM Pi Users
 

Joined: Wednesday Feb 18th, 2009
Location: United Kingdom
Posts: 107
Status: 
Offline

  back to top

Thanks, I will do that.



 Current time is 12:15 pm
Top




UltraBB 1.172 Copyright © 2007-2014 Data 1 Systems