Jump to content

Is there a way to check if in we are in DST or not?


barkster

Recommended Posts

28 minutes ago, barkster said:

when we are in DST the sunset it pretty accurate for turning on porch lights etc but when we aren't I have to add an hour to sunset time to because it isn't actually dark yet.  Is there a way to check for DST?

You must not have the time values configured correctly.   In the Admin console on the Configuration Tab Click the button Change Location.  There is a dropdown on the resulting window for whose daylight savings rules to use.   Is that dropdown set correctly?

(You'll note the Daylight Savings time Checkbox on the main config tab is greyed out, that's because it moved into the dropdown on the next screen...worldwide DST rules are complicated and a single checkbox doesn't do it anymore.)

There is a time-data nodeserver that will return DST vs standard time, but I don't think you actually need that, I think your timezone and location must not be set correctly.

BTW, entering custom coordinates on the change location dialog will better fine tune the calculated Sunset/sunrise times.  For me the closet listed City is Chicago but it is much further north and east which makes a difference of 20 minutes or more to the calculated time.

Link to comment

yeah my timezone is set correctly, these are just my observations that I have noticed.  Sunset just isn't the correct time to turn on the lights.  I have always just done sunset plus 1.5 hours but right now it is dark about sunset plus 30 mins.  Winter time works perfect summer not so much.

Link to comment

The weather nodes you can install using polyglot include "solar irradiation".  This might be better for you than sunrise/sunset.  I assume you are very far North and have very long twilight?  I'm looking at the weatherbit node and it has that measurement, but I am pretty sure it isn't the only one.  This is also affected by cloud cover.  Obviously, patchy clouds will be very inconsistent from your location as compared to the measuring location, but on days with horizon to horizon cloud cover you will get an accurate reading.

Link to comment
23 hours ago, barkster said:

yeah my timezone is set correctly, these are just my observations that I have noticed.  Sunset just isn't the correct time to turn on the lights.  I have always just done sunset plus 1.5 hours but right now it is dark about sunset plus 30 mins.  Winter time works perfect summer not so much.

You might want to try out the TimeData nodeserver, it might give you better sunset calculations for your location.  I note that mine are a few minutes different than the ISY's but that might just be the precision of the long/lat coordinates that I entered.   The nodesever also has a true/false flag for whether you are in or out of DST-- which at the very least would allow you to adjust your times via ISY programs rather than having to fiddle with it several times a year.  

If you don't have Polisy/polyglot locally there is a cloud version of that node server available, you just need a portal subscription (and ISY firmware V5.x) to use it.  To find it login to your portal account and click Open PolyGlot in the upper right corner.  In the store you'll see TimeDataPGC.   More instructions here.

If your still on version 4 or don't want to mess with Polyglot, you could also use the programs in the post linked below by @kclenden.   You'd want to add one more variable, integer should suffice, $iDST and set it zero or one in the appropriate THEN statement, and set the init each time.  Then you would have a DST flag to use in your programs.

 

 

Adding that revision would change 2 programs of the set as follows:

DST_Check_1 - [ID 00BB][Parent 00BE]

If
        Time is  1:05:00AM
    And $iDST_Hour_Check is 1
 
Then
        
        // $iDST_Hour_Check should have been set to 0 at 12:05AM.  The only way
        // for it to be 1 now is if 1:05AM happened and then happened again.
        // This should only occur during "Fall Back" when DST is changed from ON
        // to OFF and the clock goes from 2:00AM to 1:00AM
 
        $sDST_Alert  = $cTrue
		$iDST = $cFalse
		$iDST Init to $cFalse 
        $iDST_Hour_Check  = 1
 
Else
        $iDST_Hour_Check  = 1

 

DST_Check_3 - [ID 00BC][Parent 00BE]

If
        Time is  3:05:00AM
    And $iDST_Hour_Check is 1
 
Then
        
        // $iDST_Hour_Check should have been set to 2 at 2:05AM.  The only way
        // for it to be 1 now is if 2:05AM never happened.  This should only 
        // occur during "Spring Forward" when DST is changed from OFF to ON
        // and the clock goes from 2:00AM to 3:00AM
 
        $sDST_Alert  = $cTrue
		$iDST = $cTrue
		$iDST Init to $cTrue
        $iDST_Hour_Check  = 3
 
Else
        $iDST_Hour_Check  = 3
 

of course you need also still need the additional programs in the other thread.

Link to comment

Archived

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


  • Recently Browsing

    • No registered users viewing this page.
  • Who's Online (See full list)

  • Forum Statistics

    • Total Topics
      36.9k
    • Total Posts
      370.2k
×
×
  • Create New...