TheA2Z Posted December 18, 2019 Posted December 18, 2019 Ive have reviewed the forums and searched but i havent seen any really good options on having date variables to be used by ISY programs for If statements. Ive seen a program set that I can add that does it programmatically in the ISY. My concern is how accurate it will be over time and get out of sync. Questions Are their any calls that can be made with the ISY to the ISY portal or Polyglot that will enable me to store a Month, a Day, and Year variable in my ISY that I can then use in my programs? Also, Are there any services that will enable me to capture if the day is a holiday? Some are easy that are tied to days like July 4th is 7/4 and Christmas is 12/25. I am interested in having a variable like sMemorialDayToday and be able to set it to 1 if it is Memorial Day. Thanks A2Z
Bumbershoot Posted December 18, 2019 Posted December 18, 2019 15 minutes ago, TheA2Z said: Are their any calls that can be made with the ISY to the ISY portal or Polyglot that will enable me to store a Month, a Day, and Year variable in my ISY that I can then use in my programs? I'm not entirely sure what you're asking for here, but in version 5.x.x of the ISY firmware, you can save temporal data to variables (see screenshot). 31 minutes ago, TheA2Z said: Also, Are there any services that will enable me to capture if the day is a holiday? Some are easy that are tied to days like July 4th is 7/4 and Christmas is 12/25. I am interested in having a variable like sMemorialDayToday and be able to set it to 1 if it is Memorial Day. As for this, there are two Polyglot nodeservers, Holidays and HolidaysGoogle. I don't use either one, but I do know that the HolidaysGoogle nodeserver uses the calendar of your Google/Gmail account. You'll need to be on the 5.x.x series of firmware to use Polyglot
Bumbershoot Posted December 18, 2019 Posted December 18, 2019 (edited) On second thought, if you're okay with running a nodeserver, then NodeLink provides "ISY Data" that makes it pretty easy to program date related things. The program below would probably get you Memorial Day, every year: New Program - [ID 00C1][Parent 00A7] If 'Devices / dirNodeServers / ISY Data / ISY Data' Month is September And 'Devices / dirNodeServers / ISY Data / ISY Data' Week is 1 And 'Devices / dirNodeServers / ISY Data / ISY Data' Day of Week is Monday Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') Here are screenshots of the data as presented in the ISY: Edited December 18, 2019 by Bumbershoot 1
DennisC Posted December 19, 2019 Posted December 19, 2019 13 hours ago, Bumbershoot said: On second thought, if you're okay with running a nodeserver, then NodeLink provides "ISY Data" that makes it pretty easy to program date related things. The program below would probably get you Memorial Day, every year: New Program - [ID 00C1][Parent 00A7] If 'Devices / dirNodeServers / ISY Data / ISY Data' Month is September And 'Devices / dirNodeServers / ISY Data / ISY Data' Week is 1 And 'Devices / dirNodeServers / ISY Data / ISY Data' Day of Week is Monday Then - No Actions - (To add one, press 'Action') Else - No Actions - (To add one, press 'Action') Here are screenshots of the data as presented in the ISY: Nodelink is what I would suggest, it works well and is easy to use in programs. 1
paulbates Posted December 19, 2019 Posted December 19, 2019 + 1 for @DennisC's suggestion. I've used this for a number of years and its flexible and makes programs easy to write... and read / understand years after you wrote them Paul
TheA2Z Posted January 19, 2020 Author Posted January 19, 2020 Thanks all. I just used the native Month, Day, and Year in ISY that Bumbershoot referenced. Didnt know they were there. It doesnt solve the knowing when the holidays are for those that fall on different dates each year. Ill just have to manually program them each year. Im using this to send birthday, holiday type text info to my Elk panel displays on those days. I also plan to use them to control LED stair lighting changing the color of the lights based on the holiday. My next foray, not related to date, is adding motorized blinds to my ISY. Home automation is like crack (not that I have used it). Always looking for something else to automate...
larryllix Posted January 19, 2020 Posted January 19, 2020 Thanks all. I just used the native Month, Day, and Year in ISY that Bumbershoot referenced. Didnt know they were there. It doesnt solve the knowing when the holidays are for those that fall on different dates each year. Ill just have to manually program them each year. Im using this to send birthday, holiday type text info to my Elk panel displays on those days. I also plan to use them to control LED stair lighting changing the color of the lights based on the holiday. My next foray, not related to date, is adding motorized blinds to my ISY. Home automation is like crack (not that I have used it). Always looking for something else to automate... Long weekend style holidays take a combination of date and day filters.If Monday and 5.01 to 5.07Sent using Tapatalk
carealtor Posted January 19, 2020 Posted January 19, 2020 1 hour ago, TheA2Z said: Home automation is like crack (not that I have used it). Always looking for something else to automate... Ain't that the truth.
TheA2Z Posted January 19, 2020 Author Posted January 19, 2020 49 minutes ago, larryllix said: Long weekend style holidays take a combination of date and day filters. If Monday and 5.01 to 5.07 Sent using Tapatalk Not as much that functionality as much as If Thanksgiving, Memorial day, or Labor Day, etc. These dates change each year. Easy for me to program fixed date holidays like 7/4, 12/25, or 1/1. Barring any solution i just update holiday dates one during the new year in the programs.
larryllix Posted January 20, 2020 Posted January 20, 2020 5 hours ago, TheA2Z said: Not as much that functionality as much as If Thanksgiving, Memorial day, or Labor Day, etc. These dates change each year. Easy for me to program fixed date holidays like 7/4, 12/25, or 1/1. Barring any solution i just update holiday dates one during the new year in the programs. Read the algorithm I posted. ISY can detect any holiday by formula as well as the fixed dates ones. Eater is very complex and based on lunar cycles. I have no solution for that one. Again and hopefully more simply put... Let's suppose you want to trigger a program on Labour Day (Canadian / US are the same day). This will trigger on the first Monday of every September, independent of year. If day is Monday and MM.DD >= 9.01 and MM.DD <- 9.07 Then do Labour Day things Else --- First you will need ISY v5.xx and a program to extract the month and date from ISY variables into your own state variable. 1
TheA2Z Posted January 20, 2020 Author Posted January 20, 2020 14 hours ago, larryllix said: Let's suppose you want to trigger a program on Labour Day (Canadian / US are the same day). This will trigger on the first Monday of every September, independent of year. If day is Monday and MM.DD >= 9.01 and MM.DD <- 9.07 Then do Labour Day things Else --- Yes, That would work great. Thanks
Recommended Posts