mountainman3520 Posted October 27, 2015 Posted October 27, 2015 Hello, I have a feature request. I often write programs that are setup to run during particular times of year, for example I have programs that select different power rate profiles during different months causing my AC programs to be optimized. And I have programs that adjust my irrigation based on date. And I have programs that control holiday lights based on date. But as far as I can tell, the ISY programming always requires that a year be included in any date schedule. This causes me to have to edit my programs every year or list numerous date ranges with or conditions for the next 5 years. Is there a better way? If there isn't a better way, please add to the feature request list that we should be able to specify a day and month without a year, or a day of the month without a month or year, etc. Thanks!
MWareman Posted October 27, 2015 Posted October 27, 2015 I believe this may already be coming in v5..... . You're not the only one with this issue!
larryllix Posted October 27, 2015 Posted October 27, 2015 Using v5.x I use a twice per day trigger to update two variables containing the month and date in one and the day of the week in the second. Now you have a one line test for any date of the year and with the day of the week can determine stat holidays etc. Set MMDD - [ID 00B8][Parent 0020] If Time is 12:00:05AM Or Time is 6:00:05AM Then $ISY.Date.scratchpad = [Current Month (Jan=1, Feb=2, etc.)] $ISY.Date.scratchpad *= 100 $ISY.Date.scratchpad += [Current Day of Month] $sISY.MMDD = $ISY.Date.scratchpad $sISY.MMDD Init To $sISY.MMDD $sISY.DayOfWeek = [Current Day of Week] $sISY.DayOfWeek Init To $sISY.DayOfWeek Wait 2 seconds Run Program 'Set MMDD' (Else Path) Else - No Actions - (To add one, press 'Action') To test for dates you can use programs like this. This is an example only and not a usable program. Note: $cDAY.MON is a state variable permanently set to 1 = the value for ISY Monday Stat Holidays - [ID 00CB][Parent 0020] If $sISY.MMDD is 101 Or ( $sISY.MMDD >= 215 And $sISY.MMDD <= 221 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 518 And $sISY.MMDD <= 524 And $sISY.DayOfWeek is $cDAY.MON ) Or $sISY.MMDD is 701 Or ( $sISY.MMDD >= 801 And $sISY.MMDD <= 807 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 901 And $sISY.MMDD <= 907 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 1008 And $sISY.MMDD <= 1014 And $sISY.DayOfWeek is $cDAY.MON ) Or $sISY.MMDD is 1225 Or $sISY.MMDD is 1226 Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action')
Michel Kohanim Posted October 27, 2015 Posted October 27, 2015 Hi larryllix, MWareman is correct: this has been a long standing request. We should get to it eventually. With kind regards, Michel
mountainman3520 Posted October 27, 2015 Author Posted October 27, 2015 Using v5.x I use a twice per day trigger to update two variables containing the month and date in one and the day of the week in the second. Now you have a one line test for any date of the year and with the day of the week can determine stat holidays etc. Set MMDD - [ID 00B8][Parent 0020] If Time is 12:00:05AM Or Time is 6:00:05AM Then $ISY.Date.scratchpad = [Current Month (Jan=1, Feb=2, etc.)] $ISY.Date.scratchpad *= 100 $ISY.Date.scratchpad += [Current Day of Month] $sISY.MMDD = $ISY.Date.scratchpad $sISY.MMDD Init To $sISY.MMDD $sISY.DayOfWeek = [Current Day of Week] $sISY.DayOfWeek Init To $sISY.DayOfWeek Wait 2 seconds Run Program 'Set MMDD' (Else Path) Else - No Actions - (To add one, press 'Action') To test for dates you can use programs like this. This is an example only and not a usable program. Note: $cDAY.MON is a state variable permanently set to 1 = the value for ISY Monday Stat Holidays - [ID 00CB][Parent 0020] If $sISY.MMDD is 101 Or ( $sISY.MMDD >= 215 And $sISY.MMDD <= 221 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 518 And $sISY.MMDD <= 524 And $sISY.DayOfWeek is $cDAY.MON ) Or $sISY.MMDD is 701 Or ( $sISY.MMDD >= 801 And $sISY.MMDD <= 807 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 901 And $sISY.MMDD <= 907 And $sISY.DayOfWeek is $cDAY.MON ) Or ( $sISY.MMDD >= 1008 And $sISY.MMDD <= 1014 And $sISY.DayOfWeek is $cDAY.MON ) Or $sISY.MMDD is 1225 Or $sISY.MMDD is 1226 Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') Clever way to work-around the limitation, larryllix! Thank you for that. I should have been a bit more creative in looking for a solution instead of contaminating numerous programs with a bunch of date checks for the next 5-10 years. In any case, I'm glad to hear Michel and team are working on a good solution inherent in the schedule features of ISY programming. Thanks!
larryllix Posted October 27, 2015 Posted October 27, 2015 It should work for now and be easily adapted once the features get released into v5.++ I too eagerly await the next release after v5.0.2.It seems it should be mostly cosmetic GUI bug free. Thanks for the encouragement Michel. Some of us OCD types are excitedly impatient and I know you guys are real busy with the larger pieces you byte off. ISY994i V5 a new future is being created! Which future would your home choose?
mountainman3520 Posted October 28, 2015 Author Posted October 28, 2015 Larryllix, is that part at the bottom your own special marketing slogan and recommended letterhead for UD? haha
Michel Kohanim Posted October 28, 2015 Posted October 28, 2015 Hi larryllix, Thank you and especially for the slogans! With kind regards, Michel
Sub-Routine Posted November 30, 2015 Posted November 30, 2015 It would be great if we could specify dates without years. Independence Day (US) is always July 4, New Years, Jan 1, etc. Also day of the month. For instance, Thanksgiving is always the fourth Thursday in November. Memorial Day, the last Monday in May.
stusviews Posted November 30, 2015 Posted November 30, 2015 Passover moves, so does Channukah, Rosh Hashana, Ash Wednesday and Lent. Marti Gras, too.
larryllix Posted November 30, 2015 Posted November 30, 2015 As long as they aren't based on moon cycles, as Easter is, the technique in post #5 works just fine for holidays based on a date formula.For US Thanksgiving and US Memorial Day. Or ( $sISY.MMDD >= 1122 And $sISY.MMDD <= 1128 And $sISY.DayOfWeek is $cDAY.THU /(value=4) ) Or ( $sISY.MMDD >= 525 And $sISY.MMDD <= 531 And $sISY.DayOfWeek is $cDAY.MON /(value=1) )
stusviews Posted November 30, 2015 Posted November 30, 2015 As Sub-Routine Thanksgiving and Memorial day are relatively easy, Thanksgiving is always the fourth Thursday in November. Memorial Day, the last Monday in May. The holidays I mentioned are lunisolar and can vary by weeks.
larryllix Posted December 1, 2015 Posted December 1, 2015 As Sub-Routine Thanksgiving and Memorial day are relatively easy, Thanksgiving is always the fourth Thursday in November. Memorial Day, the last Monday in May. The holidays I mentioned are lunisolar and can vary by weeks.That's what I figured after posting. Religious based holidays always seem to be based on lunacy things. Somebody had requested lunar cycles once upon a time. I am beginning to see the value. A Google calendar hook may work more effectively but lose some self-dependence.
Amigo Posted December 1, 2015 Posted December 1, 2015 I too wish we had a google calendar hook, that would make a lot of sense to me. IFTTT offers some possibilities to tie in google calendar but I prefer a direct hook in ISY. May be it is in the works for 5.xx, cheers.
Michel Kohanim Posted December 1, 2015 Posted December 1, 2015 Hi Amigo, We are working on IFTTT integration. With kind regards, Michel
fryfrog Posted December 1, 2015 Posted December 1, 2015 Oh god, Google Calendar integration would be amazing.
larryllix Posted December 1, 2015 Posted December 1, 2015 Google calendar integration may be a better and more fitting task for a Node attachment for ISY. The passing of the definitions may be a hard thing to get a programmer's head around but possibly a user predefined holiday number for any event the user wants to define in the Google calendar. The event could have some code attached to each labelled event that could be passed to ISY for identification and trigger of programs. There has to be an 'easier' way to do this.
mwester Posted December 1, 2015 Posted December 1, 2015 I'm interested in giving this a try -- I'm already working on a general "clock" 5.0 node server, and adding this sort of feature would be neat. So, let's gather some requirements -- and for each requirement, also make sure to note how it would be exposed to a program running in the ISY. For example: - The user desires to expose a custom google calendar event to the ISY for use as a status as well as a trigger. The user will be required to enter the event in their google calendar with a specially-formatted string that contains an integer value between 0 and 256. A "calendar" device in the ISY will expose this integer value as its status for the duration of the event (as scheduled in the google calendar). A program will be able to trigger on the start of the event in the normal fashion (if control). - The user desires to expose a set of common holidays and other events to the ISY, as in the previous use-case. However, for these common or standard events, a set of pre-determined values should, if possible, be used instead of integers (e.g. "Easter", "Victoria Day", etc.) Thoughts?
Amigo Posted December 1, 2015 Posted December 1, 2015 @Michel, just in case I was not clear, I meant a direct integration between google calendar and ISY, skipping IFTTT middleware. But I take what we can get, @mwester, for me as long as it is a local node server(runs on ISY), that would be a fantastic addition. My general preference is always to eliminate/reduce as many failure points as I can, for example a node server that runs on yet another piece of hardware. I have done a number of google calendar integrations in larger commercial automation applications not involving ISY. I can easily tell you that the end users love it. Each google calendar has a unique id, so that is what Node server/ISY would use as a reference when you create different calendars for different zones/purposes. My personal requirements would be very simple, if there is an active event in a specific calendar then set a user specified ISY integer to 1 otherwise that integer is 0. I am fine with reasonable delays in status/update check of calendar status. cheers.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.