Jump to content

Porch light off every year for Halloween


arskiracer

Recommended Posts

I'm looking for a way to set an annual date on Oct31 to keep the front porch lights from coming on at sunset.  There doesn't seem to be a way to set one day per year, regardless of the year.  I have it working for the next 5 years by using a bunch of "or" arguments, but that is messy.  Is there a way to have an action based on one day per year, without having to set the year?

  • Like 1
Link to comment

For v5.xx software, it is much easier than with 4.xx version.  

The general approach is to create a couple of variables, one for the month and one for the day.  To the 3am query program, or some other daily cleanup program (hopefully run late night) set the two variables to the current month and current day.  Create an action for each >> variable>>month>> = >> [choose appropriate system variable]

From there, it is simple enough to create a condition such as:

if day of month = 31

and month = 10

then

do what you want (such as disable program, disable folder, don't run program, whatever)

Link to comment
  • 1 month later...
On 12/15/2019 at 9:13 PM, arskiracer said:

I'm looking for a way to set an annual date on Oct31 to keep the front porch lights from coming on at sunset.  There doesn't seem to be a way to set one day per year, regardless of the year.  I have it working for the next 5 years by using a bunch of "or" arguments, but that is messy.  Is there a way to have an action based on one day per year, without having to set the year?

I've been using these subroutines for quite a while.  They'll definitely solve your problem.   Drawback might be the space it takes up on ISY, and the fact that you might need to manually reset the data if you need to restore ISY to an earlier time.

https://wiki.universal-devices.com/index.php?title=ISY-99i_Generic_Calendar_Using_Programs_and_Variables

 

Edited by JLOB
Forgot the necessary info line
Link to comment

EDIT:  I was unaware of JLOB's programs in the wiki, but I apparently accomplished essentially the same thing.  He combined all the month checks into a single program.

 

I've been doing this exact action (lights off on Haloween if I'm away) for years.

Since earlier versions did not expose dates, I wrote a set of 7 programs that increment day, week, month, and year variables.  I also track the weekday, week of year, and weekday of the first of the month for determining holidays.  The Holiday program tests for things like the last Monday in May for Memorial Day or 4th of July or Thanksgiving and alters the routine of the house on holidays.

image.png.047ae33b3e5ceccef3d57c398d0b5040.png

 

Then I have  a program that checks for the date of Halloween and takes a number of actions.

image.png.f2a59002c264fff732b927af89cdd6a2.png

The Halloween Off runs after 11PM and resets things back to normal operations.

The second Front lights off is there because other programs may trigger the front light between 1hr and 15 min before sunset.

In my case, I use $Away_State to determine if the house is in Away mode or not.  If I'm home, I'll handle the Trick or Treaters, if I'm traveling for work, the house is in away mode and the front lights will be off.

Since I have dates as variables, I also set a season variable (1 to 4) incrementing it on June 15, September 15, and December 15. On March 15, it resets to 1. This is done by the Summer Set and Winter Set programs, based on the date.

 

 

 

Edited by Craigb
  • Like 1
Link to comment

I got it working by just setting a variable for month and another for day, then in my program that turns front lights on at sunset, i just have it not run if both of those variables are 10 and 31.  What I was missing previously was the little play button that changes the things you can set variables to.  Didn't know about that.

And I just figure if I'm home, I'll turn on the lights when I'm ready for trick-or-treaters, which will likely be before sunset anyway.  I just don't like when I'm away trick-or-treating with my own kids and realize my front lights came on an hour ago and people are probably lining up at my house.

Thanks everyone!

Edited by arskiracer
Link to comment

I have seen this question before in other contexts. I guess I don't see why it needs to be any more complicated than put in 5 years worth of halloween dates and then revisit it in 5 years. This is what I do for my Holiday_Lighting state variable that drives nightime lighting and program execution for Christmas dates and my programs for irrigation. Nothing in my setup tends to last more than a couple of years without changes, anyway.

Edited by Goose66
Link to comment

That would work too, but personally I don't like to create programs I know are going to stop working at some point, when I could spend slightly more time and have them be more robust.  Especially because I like to set up my stuff and forget it for many years.  That's the main reason I went with the isy, because the reliability is amazing and I don't have to ever mess with it.  It just works, unlike my Asus router, which I have to reboot on a monthly basis, and am therefore going to replace it with a much more expensive setup from Ubiquiti, all because I want to set it and forget it.

It wasn't so bad before I had kids, but now it's tough to find 15 minutes to configure anything without kids climbing all over me and pushing buttons on my keyboard.  That's why it took me 2 months from when I posted this question to finally implement the 10 minute solution.

  • Like 1
Link to comment
  • 8 months later...

Because present month in not 10 is now false. Even though present day is not 31 is true, when ‘anded’ with a false will result in false. There may be a direct way to put in the logic you are wanting, but easiest way may be to set a variable in another program based on month is 10 and day is 31. Then use that variable in program above.

Link to comment
1 minute ago, gzahar said:

Because present month in not 10 is now false. Even though present day is not 31 is true, when ‘anded’ with a false will result in false. There may be a direct way to put in the logic you are wanting, but easiest way may be to set a variable in another program based on month is 10 and day is 31. Then use that variable in program above.

That was the point of my recent request to have a NOT ( ) implemented.

This is not one that can be done in one program without implementation of a compound NOT(  logic.

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

×
×
  • Create New...