Announcement

Collapse
No announcement yet.

Offset Sunrise/Sunset based on DST?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Offset Sunrise/Sunset based on DST?

    Is anyone doing anything cool to offset the Sunrise/Sunset times based on whether or not DST is in effect? Here is the problem. If I have an event set to run 2 hours after Sunset and DST is in effect then the event runs at almost 10:00 PM. Therefore, I need it to run much earlier at "Sunset" during DST. (Or not as long after Sunset). Same goes for Sunrise.

    Hope this makes sense. So far the only workaround I've come up with is to use a LUX sensor to trigger Sunrise/Sunset. But I'd rather not depend on that for all the obvious reasons.

    Thanks in advance for any thoughts.

    #2
    I do not have to do anything to adjust for DST. Does the system running HomeSeer not adjust itself for DST? Meaning, is it off by an hour for part of the year? I am on Windows.

    NOTE that Sunset and Dusk are 2 completely different things. For me, the time between Sunset and Dusk is longer in the summer. I DO take that into account, but not through any math. I just have a Winter event for the outside lights which runs October to April (actually IF Before April 1 OR IF After Oct 1) to turn the lights on earlier. This compensates enough for our needs.
    Karl S
    HS4Pro on Windows 10
    1070 Devices
    56 Z-Wave Nodes
    104 Events
    HSTouch Clients: 3 Android, 1 iOS
    Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

    Comment


      #3
      If I'm understanding correctly, you have an event that is triggered by a time offset to sunrise and sunset and you want to have it fire at different times depending on if it's DST or not.

      Here's a suggestion:
      • Create a virtual device called Daylight Savings Time
      • Manually turn the virtual device on when it's DST and off when it's not DST (Could even automate that device with an event based on date)
      • First event triggers with an added device variable of Daylight Savings Time is On - alter the event times as needed
      • Create a second copy of the event with the device - Daylights Savings Time being Off - alter the event times as needed
      I do something similar with our deck/gazebo lighting except I use the dates April 15th and September 15th as my deciding factor on when the event runs since were not likely to be out late on the deck in early April or after mid-September.
      Dan-O
      HomeSeer contributor since summer 1999, yes 1999!

      Comment


        #4
        You might want to have a look at this thread.
        Zwave = Z-Stick, 3xHSM100� 7xACT ZDM230, 1xEverspring SM103, 2xACT HomePro ZRP210.
        X10 = CM12U, 2xAM12, 1xAW10, 1 x TM13U, 1xMS13, 2xHR10, 2xSS13
        Other Hardware = ADI Ocelot + secu16, Global Cache GC100, RFXtrx433, 3 x Foscams.
        Plugings = RFXcom, ActiveBackup, Applied Digital Ocelot, BLDeviceMatrix, BLGarbage, BLLAN, Current Cost, Global Cache GC100,HSTouch Android, HSTouch Server, HSTouch Server Unlimited, NetCAM, PowerTrigger, SageWebcamXP, SqueezeBox, X10 CM11A/CM12U.
        Scripts =
        Various

        Comment


          #5
          Dan-O and @enigmatheater, both great solutions, Thanks!
          Unless there is a trigger for when DST starts and ends by date I'll have to estimate it. Unless I can run a script to interrogate DST on/off on the Pi and then set a virtual device?

          Comment


            #6
            Unless I misunderstand this part of your original post you, you are looking to base an event runtime on the time and how dark it is outside. Sunrise and Sunset are the only two options in HomeSeer without using sensors. But you do not seem to be interested in just Sunrise/Sunset, but actually looking for Dusk and Dawn. You have Sunset, then Twilight, then Dusk. Sunset is the point where the sun drops below the horizon. Dusk is the point where the sun stops adding ambient light to the area.
            So far the only workaround I've come up with is to use a LUX sensor to trigger Sunrise/Sunset. But I'd rather not depend on that for all the obvious reasons.
            If you are interested in running events at Dusk instead of Sunset, you could use the BigTimer or Sun Position contrib in Node Red to fire the event.

            The above mentioned Sun Position contrib can also be used to set a HomeSeer Device such as Dan-O mentioned called Daylight Savings Time. Some of the provided nodes, such as the Clock Timer can provide a True/False output for IsDST, so is it DST? Run a flow this early every morning via an Inject node or Auto Trigger and have it set the HomeSeer virtual device. If you want to go this route and need assistance, let's move that to the Node Red channel with a new thread and link it here.

            If, on the other hand, there is an error in your sunrise/set calculations in HomeSeer, make sure you have a negative Longitude in your settings.

            The problem I have with LUX sensors comes to play with the weather. So you COULD do a combination of sensor reading and time, such as "the time is after sunset" but this still is not 100% perfect on a stormy evening. It woul dbe similar to an event I have for my shades which runs at Sunrise UNLESS sunrise is before 7AM. Here is the event trigger logic:
            Click image for larger version

Name:	hs1.PNG
Views:	254
Size:	156.6 KB
ID:	1479104
            Karl S
            HS4Pro on Windows 10
            1070 Devices
            56 Z-Wave Nodes
            104 Events
            HSTouch Clients: 3 Android, 1 iOS
            Google Home: 3 Mini units, 1 Pair Audios, 2 Displays

            Comment


              #7
              I plan on using node-red for other things in the future. However, right now I'd prefer a simpler solution. It would be nice if HS had the ability to set a virtual device based on a calendar day, i.e. "the first Sunday in November" and "the second Sunday in March". The other alternative is a script that could make this determination and set/reset a virtual device. I'll check Jon00's site. He might have a script.

              Comment


                #8
                Originally posted by avpman View Post
                I plan on using node-red for other things in the future. However, right now I'd prefer a simpler solution. It would be nice if HS had the ability to set a virtual device based on a calendar day, i.e. "the first Sunday in November" and "the second Sunday in March".
                Ummm... it does. You could easily set a VD when DST kicks in November and then turn it off in March using a similar event.

                Click image for larger version

Name:	Capture.PNG
Views:	179
Size:	16.2 KB
ID:	1479113

                Comment


                  #9
                  If you're into scripting,

                  https://docs.microsoft.com/en-us/dot...stem_DateTime_

                  Comment


                    #10
                    Originally posted by TC1 View Post

                    Ummm... it does. You could easily set a VD when DST kicks in November and then turn it off in March using a similar event.

                    Click image for larger version

Name:	Capture.PNG
Views:	179
Size:	16.2 KB
ID:	1479113
                    Duh me -

                    I'm also looking at a script. More than one way to skin...
                    Thank you all...

                    Comment

                    Working...
                    X