Jump to content

ISY Programs needing Date variables


TheA2Z

Recommended Posts

Posted

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

  1. 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?
  2. 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

 

Posted
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

 

Screen Shot 2019-12-18 at 3.04.51 PM.png

Posted (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:

 

Screen Shot 2019-12-18 at 3.21.06 PM.png

Screen Shot 2019-12-18 at 3.22.22 PM.png

Edited by Bumbershoot
  • Like 1
Posted
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:

 

Screen Shot 2019-12-18 at 3.21.06 PM.png

Screen Shot 2019-12-18 at 3.22.22 PM.png

Nodelink is what I would suggest, it works well and is easy to use in programs.

  • Like 1
  • 1 month later...
Posted

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...  ;)

Posted
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.07




Sent using Tapatalk

Posted
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.

Posted
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.

 

 

  • Like 1
Posted
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

Guest
This topic is now closed to further replies.

×
×
  • Create New...