Announcement

Collapse
No announcement yet.

Daytime & Nighttime Events are Conflicting... help - Fixed!

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

    Daytime & Nighttime Events are Conflicting... help - Fixed!

    I have 2 events that are super basic... turn light On @ Daytime, Off @ Nighttime.

    But as you can see from the Log screenshot... it is turning the light OFF after turning it ON - within the same second.

    Is this a bug or am I missing something 'unique' about how Homeseer works?

    thx for the help
    Attached Files

    #2
    I think you need to remove the portion of each event related to daytime and night time. I vaguely remember this being an issue.

    The way I would deal with it is create a virtual device called daytime, it gets turned on with the same event that turns the light off and vice versa with other event.

    Use this VD in place of your daytime/nighttime portion of the event and I bet your problem goes away.

    Comment


      #3
      Originally posted by waynehead99 View Post
      I think you need to remove the portion of each event related to daytime and night time. I vaguely remember this being an issue.

      The way I would deal with it is create a virtual device called daytime, it gets turned on with the same event that turns the light off and vice versa with other event.

      Use this VD in place of your daytime/nighttime portion of the event and I bet your problem goes away.
      This is what I do, using easytrigger. A motion control virtual device gets turned on in the evening. If motion is detected AND if that device is on the light turns on and also creates a delayed event to turn it back off XX minutes later. Randy's event clinic stuff here was a great help in learning how to set this up.

      Comment


        #4
        Originally posted by Ltek View Post
        I have 2 events that are super basic... turn light On @ Daytime, Off @ Nighttime.

        But as you can see from the Log screenshot... it is turning the light OFF after turning it ON - within the same second.

        Is this a bug or am I missing something 'unique' about how Homeseer works?

        thx for the help


        I am thinking that your condition, "The time is night time" is testing if it's between the two sunrise or sunset times and because you also have it turn on or off at that exact same time, it's causing it to trigger your opposing event.

        I would either change the trigger to turn on/off the light to a second before or after the sunrise/sunset time. Or, instead of using the one condition "The time is night time", I would use The time is 1 second after sunset and if the time is 1 second before sunrise.

        I see why you used the condition that you did, it does say "after" sunset, "before" sunrise, indicating that it's testing for the second before or after, but my guess is it's "between" the exact time for sunset and sunrise.

        Hope that helps...


        Sent from my iPad using Tapatalk
        HS4 4.2.6.0 &HSTouch Designer 3.0.80
        Plugin's:
        BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
        EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
        weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

        Comment


          #5
          I am thinking that your condition, "The time is night time" is testing if it's between the two sunrise or sunset times and because you also have it turn on or off at that exact same time, it's causing it to trigger your opposing event.

          I would either change the trigger to turn on/off the light to a second before or after the sunrise/sunset time. Or, instead of using the one condition "The time is night time", I would use The time is 1 second after sunset and if the time is 1 second before sunrise.

          I see why you used the condition that you did, it does say "after" sunset, "before" sunrise, indicating that it's testing for the second before or after, but my guess is it's "between" the exact time for sunset and sunrise.

          Hope that helps...


          Sent from my iPad using Tapatalk
          HS4 4.2.6.0 &HSTouch Designer 3.0.80
          Plugin's:
          BLBackup, BLOccupied, BLShutdown, EasyTrigger, Ecobee, Nest, AK Bond
          EnvisaLink DSC, PHLocation, Pushover, SONOS, Blue Iris, UltraRachio3,
          weatherXML, Jon00 Alexa Helper, Network Monitor, MyQ, Z-Wave

          Comment


            #6
            Originally posted by waynehead99 View Post
            I think you need to remove the portion of each event related to daytime and night time. I vaguely remember this being an issue.

            The way I would deal with it is create a virtual device called daytime, it gets turned on with the same event that turns the light off and vice versa with other event.

            Use this VD in place of your daytime/nighttime portion of the event and I bet your problem goes away.
            In Other Words... huge HS3 bug. I'm going to email support and see what they say. This needs to work properly, not some workaround people have to figure out like it is a puzzle game.
            Last edited by Ltek; August 17, 2017, 08:53 PM.

            Comment


              #7
              I think I remember that HS3 thinks in terms of a minute...... even using the workaround, you may have to use 1 minute, not 1 second....
              HomeSeer Version: HS4 Pro Edition 4.2.19.0 (Windows - Running as a Service)
              Home Assistant 2024.3
              Operating System: Microsoft Windows 11 Pro - Desktop
              Z-Wave Devices via two Z-Net G3s
              Zigbee Devices via RaspBee on RPi 3b+
              WiFi Devices via Internal Router.

              Enabled Plug-Ins
              AK GoogleCalendar 4.0.4.16,AK HomeAssistant 4.0.1.23,AK SmartDevice 4.0.5.1,AK Weather 4.0.5.181,AmbientWeather 3.0.1.9,Big6 3.44.0.0,BLBackup 2.0.64.0,BLGData 3.0.55.0,BLLock 3.0.39.0,BLUPS 2.0.26.0,Device History 4.5.1.1,EasyTrigger 3.0.0.76,Harmony Hub 4.0.14.0,HSBuddy 4.51.303.0,JowiHue 4.1.4.0,LG ThinQ 4.0.26.0,ONVIF Events 1.0.0.5,SDJ-Health 3.1.1.9,TPLinkSmartHome4 2022.12.30.0,UltraCID3 3.0.6681.34300,Z-Wave 4.1.3.0

              Comment


                #8
                Originally posted by Ltek View Post
                In Other Words... huge HS3 bug. Amazing Rick cant get simple things like this right. I'm going to email support and see what they say. This needs to work properly, not some workaround people have to figure out like it is a puzzle game.
                There is no Rick involved in the programming. You might be thinking of Rich. I am also reasonably certain that there were others involved in the event engine design that are no longer working at HomeSeer, leaving Rich to fix things as they are discovered. I believe it is not a matter that Rich "cant [sic] get simple things like this right". It even might be an undiscovered bug, that Rich will address as soon as it is pointed out to him in a cogent fashion. I have found him to be quite responsive when presented with a clear and repeatable description of a bug.

                I am running some test events to confirm, but I am guessing it is a matter of the Sunrise/Sunset times being calculated to the second and the condition of Daytime/Nighttime possibly being rounded to the minute. I'll confirm the results of my testing events tomorrow after sunrise.

                In the meantime a viable workaround would be to change your OR IF in the first event to IF Front Yard Entry Light has been On for at least 1 minute. This will have the downside of allowing the light to remain on for 1 minute if someone turns it on during the daytime, but it will resove your immediate problem..

                After I figure out what times HomeSeer is using for each of the calculations, we might be abe to a) find a better workaround and b) provide Rich with a more definite and repeatable description of what is happening.
                HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                Comment


                  #9
                  1 sec or 1 min where both Daytime & Nightime are TRUE should have been caught in testing before put in release code. I would expect this function to be used frequently - surprised this was not found years ago.

                  Thx for looking at it. I've wasted a ton of time on this.

                  Sorry for the rant, just a ton of small'ish things in HS3 that cause a lot of problems and headaches - both bugs and 'uniqueness es' in the event engine.

                  Support is responsive, nice & helpful people (I do appreciate this!) ... they are not always in the know on how parts of HS actually work. Their on this topic was 'add a delay and let me know if that fixes it' ... clear indication.



                  comment to your side note: Not sure what other coders Rich has had involved over the years, true. When I used HS 1.x back in the early 2000's he was the only guy. no matter what, ultimately any issues are his responsibility.

                  Comment


                    #10
                    It is not that Daytime and Nighttime are true at the same time. That is never the case. It is that it will remain Daytime until the next exact minute after sunset. It will likely remain Nighttime until the next exact minute after sunrise.

                    Here are my trace log entries from the first two events that ran tonight:

                    Aug-17 7:54:00 PM Trace Nighttime
                    Aug-17 7:53:54 PM Trace Sunset

                    As you can see, it appears that "Nighttime" is truncated to the minute and Sunset is to the second. That is why your events are not working as you expect.

                    I will post tomorrow after my Sunrise and Daytime events run.

                    The easiest method to solve your timing issues would be a single Virtual device that toggles between daytime and nighttime. Using that device as your trigger as well as the conditions will make everything run correctly.

                    Alternately Easy Trigger schedules will not cause the problem either. With a schedule you can trigger on entry or exit of a schedule and use within or outside the schedule as a condition.

                    I agree that this is a bug, but I am not going to agree that it should have been found in testing. It is simply impossible to catch every foreseeable situation in testing. The fact that you are pointing this out for the first time that I have seen would sort of indicate how obscure the problem is.

                    As soon as I get me trace tomorrow morning I will send Rich an email describing what I have found. I strongly suspect that time truncating is behind this issue as well as the bug that causes a time trigger of 12:00AM to trigger every second from 12:00-12:01AM. It has always bothered me that a time trigger has a resolution in seconds but a time condition has a resolution of minutes. If you think about it, your situation is exactly that - more resolution in the trigger than in the condition.
                    HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                    Comment


                      #11
                      Here are the results of testing from Sunset/Nighttime yesterday and from Sunrise/Daytime today:

                      Aug-18 6:14:00 AM Trace Daytime
                      Aug-18 6:13:12 AM Trace Sunrise
                      Aug-17 7:54:00 PM Trace Nighttime
                      Aug-17 7:53:54 PM Trace Sunset


                      It seems that Daytime and Nighttime conditions are true at the beginning of the next minute after Sunrise and Sunset respectively. This would definitely explain the problems shown in the first post. As I stated above, HomeSeer seems to treat time differently in Conditions than it does in Triggers, which is clearly a recipe for problems.

                      I will put this together in an email to Rich later this evening.
                      HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                      Comment


                        #12
                        I presented a theory in the prior two posts. It seems to be a confirmable trend now.

                        Aug-19 6:15:00 AM Trace Daytime
                        Aug-19 6:14:08 AM Trace Sunrise
                        Aug-18 7:53:00 PM Trace Nighttime
                        Aug-18 7:52:31 PM Trace Sunset
                        Aug-18 6:14:00 AM Trace Daytime
                        Aug-18 6:13:12 AM Trace Sunrise
                        Aug-17 7:54:00 PM Trace Nighttime
                        Aug-17 7:53:54 PM Trace Sunset
                        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          Nice job... Hopefully they fix this.

                          Sent from my SAMSUNG-SM-G935A using Tapatalk

                          Comment


                            #14
                            Thanks, this will be fixed in the next update.
                            💁‍♂️ Support & Customer Service 🙋‍♂️ Sales Questions 🛒 Shop HomeSeer Products

                            Comment


                              #15
                              Thanks rich, I use this for several events... Looks like most people don't use daytime night-time for events that control lights like I do. Example... Entry on during night, off during day

                              Sent from my SAMSUNG-SM-G935A using Tapatalk

                              Comment

                              Working...
                              X