arskiracer Posted December 16, 2019 Posted December 16, 2019 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? 1
oberkc Posted December 16, 2019 Posted December 16, 2019 It depends upon what version of software you run. If on version 4.xx, the ISY does not have a native method for doing this. If on v5.xx, the ISY includes some standard functions that would allow for this. On what version are you?
arskiracer Posted December 16, 2019 Author Posted December 16, 2019 I have the latest version of the isy firmware, 5.0.16A. Thanks, I'll look into these methods when I have a sec.
oberkc Posted December 16, 2019 Posted December 16, 2019 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)
JLOB Posted February 3, 2020 Posted February 3, 2020 (edited) 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 February 3, 2020 by JLOB Forgot the necessary info line
Craigb Posted February 5, 2020 Posted February 5, 2020 (edited) 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. Then I have a program that checks for the date of Halloween and takes a number of actions. 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 February 5, 2020 by Craigb 1
arskiracer Posted February 5, 2020 Author Posted February 5, 2020 (edited) 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 February 5, 2020 by arskiracer
Goose66 Posted February 5, 2020 Posted February 5, 2020 (edited) 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 February 5, 2020 by Goose66
arskiracer Posted February 5, 2020 Author Posted February 5, 2020 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. 1
JLOB Posted February 5, 2020 Posted February 5, 2020 To set the record straight, I didn't write those programs. That was the work of some much more exalted than I. I just reap the benefit! JLOB 1
arskiracer Posted October 12, 2020 Author Posted October 12, 2020 So I programmed this up, and now that it's October, it is keeping the lights off for the entire month, instead of just on the 31st. I'm not sure what I did wrong, seems to be the nested AND should make it respond to month and day both. What am I doing wrong?
gzahar Posted October 12, 2020 Posted October 12, 2020 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.
larryllix Posted October 12, 2020 Posted October 12, 2020 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.
arskiracer Posted October 12, 2020 Author Posted October 12, 2020 Okay, makes sense. Yeah, a Not() would be great here. A separate program will get me by though. I'll know tomorrow if the way I set it up works. Thanks for the help. 1
Recommended Posts