Jump to content

Time bracketing


Kevin Connolly

Recommended Posts

I’m trying to set up a bracket of time for a program that’s not year dependent. To be specific from 12/1 of one year to 1/12 of the next.
Any ideas?


If you’re inclined to add a RPi to your system, either ISYLink or NodeLink depending on version of ISY FW. They update variables for month and day.
Link to comment
  • To install nodelink on a pi, there is a script from ioguy, author of Nodelink
     
  • To set it up, you then browse to your pi's ip address @ port 8090
  • On the Devices tab, add "Additional ISY Data"

You should see these values in your ISY, nodelink keeps them up to date

image.thumb.png.2070838003c5c2ccbb58ccdb505abd2e.png

If this didn't show up in your ISY, press Install Nodes from the new page/tab for Additional ISY Data that will appear in Nodelink's configuration page

You can use any of these in your program's ifs or assign to variables. I use this at Christmas time to keep certain lights on between December 22 and 27... I don't care what year it is. Its called from another program and controls a particular scene that keeps the inside and outside decorations lit around Christmas:

Lights and Lamps off Xmas - [ID 004A][Parent 0006][Not Enabled]

If
        'Zystem / isydata' Month = December
    And 'Zystem / isydata' Day of Month >= 24
    And 'Zystem / isydata' Day of Month <= 27
 
Then
        Set 'Yard / Yard and Lamp Security / Yard light and lamps off - xm' Off
        Stop program 'Lights and Lamps Off'
 
Else
   - No Actions - (To add one, press 'Action')
 

Other examples

  • odd and even days can be helpful for sprinkler system programs if your community enforces that.
  • I have programs that prevent / allow operation based on what month it is... I don't want the attic fan/dampers to open in the winter.
  • I control the humidity level in the house, but only during winter months, I prevent the program from running outside of that.

You can do things like that.

Paul

Link to comment
I thought I remember reading way back that version 5 would include greatly improved calendar/scheduling processing capabilities.  I'm on 5.0.14 and just looked and I don't see anything improved in this respect.
Real time variable/system variables are available in v5.

Sent from my SM-G930W8 using Tapatalk

Link to comment
20 hours ago, carealtor said:

I thought I remember reading way back that version 5 would include greatly improved calendar/scheduling processing capabilities.  I'm on 5.0.14 and just looked and I don't see anything improved in this respect.

You have access to system variables (month, year, etc) only within the user configurable variables.  You will need to create a user defined variable for each system variable you intend to use.  Then create a program that updates the user defined variable with the system value.  Then you can use that user defined variable within other programs.  Frankly, the nodelink program is better.  Though it uses the time from the pc or rpi's clock it runs on, not the isy clock.  The program that updates the variable will need to run at logical times to make sure the value is correct. 

Link to comment
1 hour ago, apostolakisl said:

You have access to system variables (month, year, etc) only within the user configurable variables.  You will need to create a user defined variable for each system variable you intend to use.  Then create a program that updates the user defined variable with the system value.  Then you can use that user defined variable within other programs.  Frankly, the nodelink program is better.  Though it uses the time from the pc or rpi's clock it runs on, not the isy clock.  The program that updates the variable will need to run at logical times to make sure the value is correct. 

Thank you for the explanation.  I see it now!  This should really help.

Link to comment
3 hours ago, apostolakisl said:

Frankly, the nodelink program is better.

I think that's open for interpretation.  The nodelink program make you dependent on another device adding an additional point of failure.  Using system variables is really easy.  Here's what I use:

Set Date Variables - [ID 00A0][Parent 004D]

If
        Time is 12:00:00AM
 
Then
        
        // Determine Day of Week
 
        $sISY.DayOfWeek  = [Current Day of Week]
        $sISY.DayOfWeek Init To $sISY.DayOfWeek
        $iISY.DayOfWeek  = $sISY.DayOfWeek
        
        // Determine Day of Month
 
        $sISY.DayOfMonth  = [Current Day of Month]
        $sISY.DayOfMonth Init To $sISY.DayOfMonth
        $iISY.DayOfMonth  = $sISY.DayOfMonth
        
        // Determine Month Of Year
 
        $sISY.MonthOfYear  = [Current Month (Jan=1, Feb=2, etc.)]
        $sISY.MonthOfYear Init To $sISY.MonthOfYear
        $iISY.MonthOfYear  = $sISY.MonthOfYear
        
        // Determine Week of Month
 
        $sISY.WeekOfMonth  = $sISY.DayOfMonth
        $sISY.WeekOfMonth -= 1
        $sISY.WeekOfMonth /= 7
        $sISY.WeekOfMonth += 1
        $sISY.WeekOfMonth Init To $sISY.WeekOfMonth
        $iISY.WeekOfMonth  = $sISY.WeekOfMonth
        
        // Create Month.Day Combo
 
        $iISY.Date_Scratchpad  = [Current Day of Month]
        $iISY.Date_Scratchpad /= 100
        $iISY.Date_Scratchpad += [Current Month (Jan=1, Feb=2, etc.)]
        $sISY.MMDD  = $iISY.Date_Scratchpad
        $sISY.MMDD Init To $sISY.MMDD
        $iISY.MMDD  = $sISY.MMDD
        
        // Determine if it's a holiday
 
        Run Program 'Holiday reset' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

 

Link to comment
4 hours ago, larryllix said:

You haven't seen how Apostolakisl managed to get all this in v3 while we were all still in diapers! :):)

I used his programs in V4 and was very thankful that he put them together because there were a lot of them and they did EVERTHING!  Just setting up all the variables had me in tears, let alone the actual programs. ?  That is why I love the simplicity of V5 so much.

Link to comment
4 hours ago, kclenden said:

I think that's open for interpretation.  The nodelink program make you dependent on another device adding an additional point of failure.  Using system variables is really easy.  Here's what I use:


Set Date Variables - [ID 00A0][Parent 004D]

If
        Time is 12:00:00AM
 
Then
        
        // Determine Day of Week
 
        $sISY.DayOfWeek  = [Current Day of Week]
        $sISY.DayOfWeek Init To $sISY.DayOfWeek
        $iISY.DayOfWeek  = $sISY.DayOfWeek
        
        // Determine Day of Month
 
        $sISY.DayOfMonth  = [Current Day of Month]
        $sISY.DayOfMonth Init To $sISY.DayOfMonth
        $iISY.DayOfMonth  = $sISY.DayOfMonth
        
        // Determine Month Of Year
 
        $sISY.MonthOfYear  = [Current Month (Jan=1, Feb=2, etc.)]
        $sISY.MonthOfYear Init To $sISY.MonthOfYear
        $iISY.MonthOfYear  = $sISY.MonthOfYear
        
        // Determine Week of Month
 
        $sISY.WeekOfMonth  = $sISY.DayOfMonth
        $sISY.WeekOfMonth -= 1
        $sISY.WeekOfMonth /= 7
        $sISY.WeekOfMonth += 1
        $sISY.WeekOfMonth Init To $sISY.WeekOfMonth
        $iISY.WeekOfMonth  = $sISY.WeekOfMonth
        
        // Create Month.Day Combo
 
        $iISY.Date_Scratchpad  = [Current Day of Month]
        $iISY.Date_Scratchpad /= 100
        $iISY.Date_Scratchpad += [Current Month (Jan=1, Feb=2, etc.)]
        $sISY.MMDD  = $iISY.Date_Scratchpad
        $sISY.MMDD Init To $sISY.MMDD
        $iISY.MMDD  = $sISY.MMDD
        
        // Determine if it's a holiday
 
        Run Program 'Holiday reset' (Then Path)
 
Else
   - No Actions - (To add one, press 'Action')
 

 

Nodelink puts the values as nodes.  That is a huge plus.  I already have all the values as variables from that huge batch of programs I wrote so many years ago so there was no point in using v5 date variables.  I checked it out and was disappointed that the values weren't directly accessible.   The issues with another device running wasn't an issue for me as I already had a rpi and a pc configured for always on reliability.  It would seem to me that with polyglot, ISY is going to be leaning more and more on that method for expanding its integration and would expect that most ISY owners would end up running a polyglot rpi sooner or later.  Perhaps the cloud based polyglot will make that unnecessary, but then you have the issue with the system no longer being local.

Link to comment
16 hours ago, apostolakisl said:

I checked it out and was disappointed that the values weren't directly accessible.

I, too, was disappointed that the values weren't directly accessible. Having written a compiler and interpreter in college, it seems strange to me that the values aren't directly accessible, but I'm sure UDI had a good reason.

Link to comment

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...