Announcement

Collapse
No announcement yet.

Event to turn lights back on if accidentally turned off

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

    Event to turn lights back on if accidentally turned off

    New to Homeseer and trying to create an event that will turn some outside lights back on if accidentally turned off and turn them off if there accidentally turned on. I have lights set to come on 15 minutes before sunset and go off 15 minutes after sunrise. While they are on, if someone (kids) hit the switch and turned the lights off I would like them to turn back on and vice versa. Is this possible?
    Thanks in advance.




    #2
    I am not sure all of this will work. I tried the OFF event and if you try to turn the light on during the day hours it goes right back off. As far as the ON event I am not sure if it will work because it hasn't triggered. Maybe someone else can weigh in and say if it will or not.
    Attached Files

    Comment


      #3
      At a quick glance, the ON will work but the OFF will always turn it off.
      But
      I am also new on Homeseer so don't trust me!

      Comment


        #4
        Originally posted by cowinger View Post
        I am not sure all of this will work. I tried the OFF event and if you try to turn the light on during the day hours it goes right back off. As far as the ON event I am not sure if it will work because it hasn't triggered. Maybe someone else can weigh in and say if it will or not.
        Those events will not work In the first event the first trigger and condition pair will never be true at the same time, but the event will immediately turn the lights off if they are turned on - day or night. The second event will never run because the first trigger and condition pair can never be true at the same time and the second pair of conditions can never be true at the same time.

        While these examples will not respect the 15 minute offset from sunrise and sunset the OP has in his events to turn the lights on and off, they should suffice. He would need to change the lights to come on at sunset and off at sunrise.

        IF the Light changes and becomes On
        AND IF The time is daytime
        Then Set Device Light to Off

        IF the Light changes and becomes Off
        AND IF The time is nighttime
        Then Set Device Light to On

        If he is absolutely married to the 15 minutes before sunset and 15 minutes after sunrise, It will require a virtual device, Spud's Easy Trigger plug-in or some scripting.

        If that is what he wants, I'm sure one of us can come up with some examples. I use Easy Trigger schedules, which make things like this easy.
        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          As a first shot, I'd suggest turning a virtual device (VD) on 15 min before sunset and off 15 min after sunrise.

          Then two events:
          - If the VD is On and if the lights are off, turn the lights on.
          - If the VD is Off and if the lights are on, turn the lights off.

          [Operationally, the triggers might be a bit more involved:
          Event 1:
          If the VD changes and becomes on
          And if the Lights are off

          Or if the lights change and become off
          And if the VD is on]

          Similarly for the second event.
          Mike____________________________________________________________ __________________
          HS3 Pro Edition 3.0.0.548, NUC i3

          HW: Stargate | NX8e | CAV6.6 | Squeezebox | PCS | WGL 800RF | RFXCOM | Vantage Pro | Green-Eye | Edgeport/8 | Way2Call | Ecobee3 | EtherRain | Ubiquiti

          Comment


            #6
            Thanks all. I have set it up like this now and I think this might work. I wont know for sure until sunset tonight.

            Sunset
            IF The time is 15m, 0s before sunset. (8:09:35 PM)
            Then Set Device Node 2 Outside Front Lights to On
            Then Run Event Auto On Front Lights After waiting 1m, 0s

            Sunrise
            IF The time is 15m, 0s after sunrise. (5:38:54 AM)
            Then Set Device Node 2 Outside Front Lights to Off
            Then Run Event Auto Off Front Lights After waiting 1m, 0s

            Auto Off
            IF Node 2 Outside Front Lights changes and becomes On
            AND IF The time is daytime (after sunrise, before sunset).
            Then Set Device Node 2 Outside Front Lights to Off

            Auto On
            IF Node 2 Outside Front Lights changes and becomes Off
            AND IF The time is nighttime (after sunset, before sunrise).
            Then Set Device Node 2 Outside Front Lights to On

            Comment


              #7
              So the first event won't work because the two times for sunrise and sunset are not a time frame but an individual time for each.

              Which is why the second event will not either?

              Comment


                #8
                Cowinger are you referring to me?

                Originally posted by cowinger View Post
                So the first event won't work because the two times for sunrise and sunset are not a time frame but an individual time for each.

                Which is why the second event will not either?

                Comment


                  #9
                  Originally posted by MikeyNice View Post
                  Thanks all. I have set it up like this now and I think this might work. I wont know for sure until sunset tonight.

                  Sunset
                  IF The time is 15m, 0s before sunset. (8:09:35 PM)
                  Then Set Device Node 2 Outside Front Lights to On
                  Then Run Event Auto On Front Lights After waiting 1m, 0s

                  Sunrise
                  IF The time is 15m, 0s after sunrise. (5:38:54 AM)
                  Then Set Device Node 2 Outside Front Lights to Off
                  Then Run Event Auto Off Front Lights After waiting 1m, 0s

                  Auto Off
                  IF Node 2 Outside Front Lights changes and becomes On
                  AND IF The time is daytime (after sunrise, before sunset).
                  Then Set Device Node 2 Outside Front Lights to Off

                  Auto On
                  IF Node 2 Outside Front Lights changes and becomes Off
                  AND IF The time is nighttime (after sunset, before sunrise).
                  Then Set Device Node 2 Outside Front Lights to On
                  The only problem with these events is that your Auto Off event will turn the lights off right after your sunset event runs, because it is still daytime.

                  Your auto On event will be fine, except that if someone turns the light off after sunrise, but before 15 minutes after sunrise, they will not turn back on.
                  HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    No MikeyNice. I was asking a question based on what Randy said so I can learn how to do this correctly. I need to learn to use quotes.

                    Comment


                      #11
                      I'd definitely be using a virtual device. Logically the values for that device would be OFF, ON and MANUAL. I'm suggesting MANUAL 'cause I would always want to be able to override.

                      How many outside lights to control?

                      Comment


                        #12
                        Originally posted by cowinger View Post
                        So the first event won't work because the two times for sunrise and sunset are not a time frame but an individual time for each.

                        Which is why the second event will not either?


                        The first Event's first trigger will be true or "fire" at 5:54:11 AM, but the condition requires that the time be 8:10 PM. They both cannot ever be true at the same time. Not that the condition is a specific time, nbot before or after that specific time. This is why Spud's Easy Trigger filled a void - HomeSeer has no conditions for "If the time is before 15 minutes after sunrise".

                        The Second event's first trigger suffers from the same problem. The second trigger in the second event will work fine, but the conditions are in conflict. It cannot be 8:10 PM AND 5:47 AM at the same time. Remember those Conditions are specific times, not ranges like "Daytime" or "Nighttime". There is also the issue of Midnight being the start and end of each day, so conditions cannot cross that line without special construction.
                        HS4 Pro, 4.2.19.16 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          How about this.

                          Sunset
                          IF The time is 15m, 0s before sunset. (8:09:35 PM)
                          Then Set Device Node 2 Outside Front Lights to On
                          Then Run Event Auto On Front Lights After waiting 1m, 0s

                          Sunrise
                          IF The time is 15m, 0s after sunrise. (5:38:54 AM)
                          Then Set Device Node 2 Outside Front Lights to Off
                          Then Run Event Auto Off Front Lights After waiting 1m, 0s

                          Auto Off
                          IF Node 2 Outside Front Lights changes and becomes On
                          AND IF The time is 15m before sunset. (8:09 PM)
                          AND IF The time is 15m after sunrise. (5:38 AM
                          Then Set Device Node 2 Outside Front Lights to Off

                          Auto On
                          IF Node 2 Outside Front Lights changes and becomes Off
                          AND IF The time is 15m before sunset. (8:09 PM)
                          AND IF The time is 15m after sunrise. (5:38 AM)
                          Then Set Device Node 2 Outside Front Lights to On

                          Originally posted by cowinger View Post
                          So the first event won't work because the two times for sunrise and sunset are not a time frame but an individual time for each.

                          Which is why the second event will not either?
                          Originally posted by rprade View Post
                          The only problem with these events is that your Auto Off event will turn the lights off right after your sunset event runs, because it is still daytime.

                          Your auto On event will be fine, except that if someone turns the light off after sunrise, but before 15 minutes after sunrise, they will not turn back on.

                          Comment


                            #14
                            Oops messed that up. This is what I meant.

                            Sunset
                            IF The time is 15m, 0s before sunset. (8:09:35 PM)
                            Then Set Device Node 2 Outside Front Lights to On
                            Then Run Event Auto On Front Lights After waiting 1m, 0s

                            Sunrise
                            IF The time is 15m, 0s after sunrise. (5:38:54 AM)
                            Then Set Device Node 2 Outside Front Lights to Off
                            Then Run Event Auto Off Front Lights After waiting 1m, 0s

                            Auto Off
                            IF Node 2 Outside Front Lights changes and becomes On
                            AND IF The time is 15m after sunrise. (5:38 AM
                            AND IF The time is 15m before sunset. (8:09 PM)
                            Then Set Device Node 2 Outside Front Lights to Off

                            Auto On
                            IF Node 2 Outside Front Lights changes and becomes Off
                            AND IF The time is 15m before sunset. (8:09 PM)
                            AND IF The time is 15m after sunrise. (5:38 AM)
                            Then Set Device Node 2 Outside Front Lights to On

                            Comment


                              #15
                              Originally posted by rprade View Post


                              The first Event's first trigger will be true or "fire" at 5:54:11 AM, but the condition requires that the time be 8:10 PM. They both cannot ever be true at the same time. Not that the condition is a specific time, nbot before or after that specific time. This is why Spud's Easy Trigger filled a void - HomeSeer has no conditions for "If the time is before 15 minutes after sunrise".

                              The Second event's first trigger suffers from the same problem. The second trigger in the second event will work fine, but the conditions are in conflict. It cannot be 8:10 PM AND 5:47 AM at the same time. Remember those Conditions are specific times, not ranges like "Daytime" or "Nighttime". There is also the issue of Midnight being the start and end of each day, so conditions cannot cross that line without special construction.
                              Thanks Randy. I see now what you are talking about.

                              Comment

                              Working...
                              X