Announcement

Collapse
No announcement yet.

How do I turn lights only for a certain length of time using an event?

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

    How do I turn lights only for a certain length of time using an event?

    My original UPB setup (as installed by my builder) used a HAI PIM and switches etc. in a HLC mode and would turn interior lights on when either the front or side door opened at "night time".

    That stopped working last year and I have been slowly getting up to speed and updating a lot of what I have. I now have a new PIM-U from PulseWorx and I have set up all my HAI switches/dimmers in UPStart. This is imported into HomeSeer HS4 using UPBSpud.

    I have configured events to detect when my August Locks sense the door is "Open" and it is "Nightime" to switch on the interior lights. That works fine.

    What I cannot seem to replicate is the timer that then turns the lights off.

    I tried adding a second action to the event which controls the same device but turns it off using the After Waiting variable. But that seemed to just cause the lights to go into a cycle of going on and then off.

    I tested creating a secondary event that detected the change in the status of the light and then turned it off, again after a delay. I set the delay to 30 secs but it seemed to run immediately (which is not helpful).

    Any assistance would be great. Thanks






    Date/time=1/29/2023 1:04:13 PM Eastern Standard Time
    Version=HS4 Standard Edition 4.2.16.0 (Windows)
    License=Registered
    Confguration File=C:\Program Files (x86)\HomeSeer HS4\Data\HomeSeerData.json
    In Virtual Machine=No MFG: besstar tech
    Antivirus=Windows Defender
    OS=Microsoft Windows 10 Pro - Work Station
    OS Version=10.0.19044
    Uptime=11 Days 0 Hours 48 Minutes 24 Seconds
    Lan IP=192.168.1.212 (HTPLUSG2v2)
    Device Count=192
    Event Count=8
    Processor:=Intel64 Family 6 Model 122 Stepping 8 at 1.03 GHz
    Modules/Threads=122 Modules, 74 Threads
    Available Threads=1022
    System Load=184 Processes, 12% Load
    Free/Total Memory=1.24 GBytes / 3.83 GBytes (32% free)
    Free/Total Virtual Memory=1.62 GBytes / 7.40 GBytes (22% free)
    HomeSeer Memory Used=71 Mbytes
    Plugin Memory Used=10 EXE Plug-Ins using 283 Mbytes
    Plugins Installed=August Home 1.0.0.0,BLRussound 4.0.0.0,Ecobee 4.0.15.0,Google Nest 4.0.1.0,HSBuddy 4.37.118.1,OMNI 3.0.2.23,Tuya 4.0.37.0,Unifi 4.0.31.0,UPBSpud 3.0.0.54,Zigbee 4.0.11.0,Z-Wave 4.0.3.0​​​

    #2
    With any Event it is best to first determine the objectives. In the case of lighting 1) when do you want the lights to come on? You have that figured out and running. 2) When do you want them to go off?
    • Time after turned on
    • When door closed
    • Time after door closed
    Our house uses motion sensors. A light is turned on with motion when it is dark. Lights are turned off 10 minutes after motion ends. Closet lights are just on a timer, to turn Off 10 minutes after On.
    HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

    Comment


      #3
      Whilst I have everyone's attention, I'll see if you can help me with another event issue.

      I have an Arlo doorbell, and I want to turn on the lights on the front porch when it detects movement at nighttime (and then switch off after a period per the note above). Arlo isn't supported on HS4, so I have created an IFTTT applet that tests for the Arlo doorbell detecting motion and then runs a HomeSeer event.

      The HomeSeer event looks like this:
      Click image for larger version

Name:	image.png
Views:	223
Size:	46.3 KB
ID:	1589286
      However, it ignores the AND IF test for nighttime and turns on the lights with every motion detection during the day. Here is the log showing that:

      Click image for larger version

Name:	image.png
Views:	179
Size:	95.5 KB
ID:	1589287

      Does anyone understand why it might ignore the time test?​

      Comment


        #4
        It depends on what is triggering the Event.

        It is very important to remember Conditions are ALWAYS ignored when an event is run from HSTouch, IFTTT, Google Home, Echo or manually triggered from the "Run" button. It is also important to note that any event run from any means other than self triggering will ignore the Trigger.

        The only way conditions are honored in a manually triggered event, is if it is called from another Event specifically honoring the conditions in the called Event. Read this post. It will help with understanding.
        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

        Comment


          #5
          Originally posted by randy View Post
          With any Event it is best to first determine the objectives. In the case of lighting 1) when do you want the lights to come on? You have that figured out and running. 2) When do you want them to go off?
          • Time after turned on
          • When door closed
          • Time after door closed
          Our house uses motion sensors. A light is turned on with motion when it is dark. Lights are turned off 10 minutes after motion ends. Closet lights are just on a timer, to turn Off 10 minutes after On.
          I guess that is what I am trying to understand, how do I get them to turn off after a certain period time (in the way your closet lights do) as part of the same event? It seems like it should be possible because I want them to go off after 5 mins ONLY when they were turned on from the door opening versus being turned on by someone using the switch and wanting them left on.

          The event currently looks like this:

          Click image for larger version

Name:	image.png
Views:	179
Size:	51.4 KB
ID:	1589291

          If I just add another event to turn them off after 5 mins, what is the condition I am testing for? I guess I could test for the same condition as I am turning the lights on for and have a delayed action to turn them off BUT, that delayed action seems to keep running.

          Comment


            #6
            Just add a "wait 5 minutes" then "turn device off"

            Comment


              #7
              When you have an action there is a "After Waiting" option. So in that section you can turn off the device after waiting for 5 minutes.
              Attached Files

              Comment


                #8
                Mulu beat me to the punch- Use a delayed device action- Turn the lights on, then Turn them off After a delay of 5 minutes. Be sure to look at the HS3 Event Clinic. Randy put together an excellent guide. Though written for HS3, it applies to HS4 but looks different. https://forums.homeseer.com/forum/ho...le-of-contents

                Comment


                  #9
                  Mulu has the correct answer. Here is an example. The door opening turns the light on. Then any prior delayed device actions are deleted and a fresh one for 10 minutes later turning the light off. The reason for deleting the delayed device action is in case the door is opened again within 10 minutes of the first time, allowing the 10 minute timer to reset.


                  ​​Click image for larger version  Name:	image.png Views:	0 Size:	61.1 KB ID:	1589301
                  HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                  Comment


                    #10
                    Originally posted by randy View Post
                    Mulu has the correct answer. Here is an example. The door opening turns the light on. Then any prior delayed device actions are deleted and a fresh one for 10 minutes later turning the light off. The reason for deleting the delayed device action is in case the door is opened again within 10 minutes of the first time, allowing the 10 minute timer to reset.


                    ​​Click image for larger version Name:	image.png Views:	0 Size:	61.1 KB ID:	1589301
                    Thank you for this. I had tried sequencing the On and then Off (with a delay on it) but it didn't seem to work correctly, I must have gotten something mixed up. I have configured it like this now, which seems to be what you were showing as the example.

                    Click image for larger version

Name:	image.png
Views:	173
Size:	84.7 KB
ID:	1589317

                    I'll see if this now works, Thanks!​

                    Comment


                      #11
                      Originally posted by randy View Post
                      It depends on what is triggering the Event.

                      It is very important to remember Conditions are ALWAYS ignored when an event is run from HSTouch, IFTTT, Google Home, Echo or manually triggered from the "Run" button. It is also important to note that any event run from any means other than self triggering will ignore the Trigger.

                      The only way conditions are honored in a manually triggered event, is if it is called from another Event specifically honoring the conditions in the called Event. Read this post. It will help with understanding.
                      Hey Randy, good to know that those conditions are ignored when the event is run from those services.

                      To solve what I am looking to do, would you change the initial event being called by IFTTT to just be one that calls a new event, and on the new event have the IF statement checking for the time of day and only switching the device on if it is nighttime? If so, what would be the Trigger on the second event with the action on it? Obviously one of them is the If it is nighttime, but I assume there needs to be an initial one as well otherwise it would run every night and turn the lights on.

                      Something like this:

                      Click image for larger version  Name:	image.png Views:	0 Size:	36.6 KB ID:	1589320
                      which is called from IFTTT and then that event calls this one:

                      Click image for larger version  Name:	image.png Views:	0 Size:	84.0 KB ID:	1589321
                      Does "This event is MANUALLY triggered"​ as the first condition in the second event mean that, as it is now called from another HS event and not from IFTTT, Google etc. that it will look at the secondary condition?

                      I read through the link you posted (very helpful thankyou) but that talks about group conditions etc. with red/blue icons none of which I see in HS4, so I am a little unclear on if what I have above will work.

                      I appreciate the patience.

                      Comment


                        #12
                        Your first Event needs to check conditions on the second event it calls. That way the conditions in the second event are honored.

                        Click image for larger version

Name:	4430718B-77C8-4855-99EB-8FF401315E8F.jpg
Views:	162
Size:	29.6 KB
ID:	1589329

                        Click image for larger version

Name:	348F63FF-43BB-4788-B97A-E264DD9D77F6.jpg
Views:	167
Size:	21.2 KB
ID:	1589328
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          Originally posted by randy View Post
                          Your first Event needs to check conditions on the second event it calls. That way the conditions in the second event are honored.


                          Updated event:

                          Click image for larger version

Name:	image.png
Views:	188
Size:	55.4 KB
ID:	1589336
                          ​Which triggered in IFTTT
                          Click image for larger version

Name:	image.png
Views:	164
Size:	55.9 KB
ID:	1589337

                          And which then put this in the log:

                          Click image for larger version

Name:	image.png
Views:	161
Size:	17.7 KB
ID:	1589338​​
                          SUCCESS!!!

                          Thank you very much.

                          PS - Should I be worried about these entries in the log relating to receiving messages from unknown networks, or the error on strings outside the bounds of the array?

                          Click image for larger version

Name:	image.png
Views:	212
Size:	330.5 KB
ID:	1589339

                          Comment


                            #14
                            Those log errors are troubling, but I’ll have to defer to someone who knows the UPB plugin.
                            HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                            Comment


                              #15
                              Originally posted by randy View Post
                              Those log errors are troubling, but I’ll have to defer to someone who knows the UPB plugin.
                              Hey Randy - I guess I spoke too soon. It said it worked earlier because it didn't trigger and gave the message saying the conditions weren't met, which they weren't. BUT, it is now after the time condition and it still doesn't trigger.

                              I took off the condition testing if the light was on, still said conditions weren't met. I then also took off the time condition, just leaving the "the event is manually triggered" step and it worked. But obviously my goal here is for this to only come on at nighttime. I then put the time condition back on and it went back to not working saying the conditions were not met.

                              Any more ideas?

                              Comment

                              Working...
                              X