Announcement

Collapse
No announcement yet.

Help with Event with motion sensors

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

    Help with Event with motion sensors

    I am trying to do an event that uses 3 motion sensors in a Group. I have created an Event to turn on a set of Hue lights in the Basement when ANY of the motion sensors detect motion. This seems to work. However, I am having trouble with the Event to turn the lights OFF after there is no motion from ALL motion sensors for 3 minutes. This is the Event that I have setup but for some reason it is turning the light off while there is still motion being detected. Can anybody help with this?

    Click image for larger version

Name:	screencapture-192-168-1-15-8000-Events-2020-03-12-11_30_23.png
Views:	183
Size:	103.8 KB
ID:	1369500

    #2
    It appears that you could have motion in the 3 minute delay before the off command is sent, but your event will ignore it. Instead of using a delayed device action, you could try a delayed event, where the event has the same conditions as the off event. (Be sure to include the requirement that the other event conditions are true.)
    You should also have your ON event cancel delayed device actions or events related to your lights.
    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


      #3
      There are a few different ways to accomplish this type of motion controlled lighting, and I believe there is a detailed tutorial in the Event Clinic on the different methods.

      But for the events as you have them now, I think you need to add an action to your Basement Lights Off event to Remove Delayed Device Actions for JowiHue Basement. It should be the first action of the Off event, before the action to turn them off after 3 minutes.

      Comment


        #4
        Originally posted by Uncle Michael View Post
        Instead of using a delayed device action, you could try a delayed event, where the event has the same conditions as the off event. (Be sure to include the requirement that the other event conditions are true.)
        How do I do a delayed event?

        Comment


          #5
          Just curious! In the Off event you have "less than 10 watts" and it is the same as the On event. Should the Off event be "greater than 10 watts"?

          Comment


            #6
            Originally posted by pcgirl65 View Post
            How do I do a delayed event?
            Select 'Run Another Event' as the event action and enter a delay time.

            Click image for larger version

Name:	delevent.png
Views:	119
Size:	13.9 KB
ID:	1369518

            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


              #7
              Originally posted by cowinger View Post
              Just curious! In the Off event you have "less than 10 watts" and it is the same as the On event. Should the Off event be "greater than 10 watts"?
              That is for the TV plug. So if the TV is on then the lights ON doesn't need to run because we might have the lights set to a different scene. Also if the TV is on, I don't want the lights to turn off.

              Comment


                #8
                Originally posted by teladog01 View Post
                But for the events as you have them now, I think you need to add an action to your Basement Lights Off event to Remove Delayed Device Actions for JowiHue Basement. It should be the first action of the Off event, before the action to turn them off after 3 minutes.
                If I were to add a Cancel Delayed Action before the Action of turning the lights off does it work because the rule is flowing down? I don't see how this would work? It would cancel the event of turning the lights off after 3 minutes. Doesn't it work that when all the Conditions are TRUE then the Events start? If the Conditions are FALSE then nothing happens?

                Comment


                  #9
                  If you cancel the delayed device action in the On event it will work.

                  The Off event runs with all motion sensors at 0 setting up a delayed device action.
                  When the On Event runs it will cancel the delayed device action.
                  When the sensors are all 0 again a new delayed device action is created
                  This will continue until there has been no motion in any sensor for more than 3 minutes.
                  If your TV is on neither event runs. If you turn the TV on while any of the sensors are at 255, the lights will not turn off. If you turn the TV on while there is no motion and within the 3 minutes, the delayed action will turn the lights off and the On event will not run.

                  Comment


                    #10
                    In rereading your event, I see one other change that could help. In the delayed event, instead of the condition that all devices in the group have a value of zero, it would be preferable, I think, to have them be in the range [0,0] for at least 3 minutes. That would prevent the lights from going out as long as there is some detected motion at least every 3 minutes, even if the TV is turned off. (I assume that with the current event, if the TV is on, the lights do not turn off.)
                    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


                      #11
                      Originally posted by Uncle Michael View Post
                      In rereading your event, I see one other change that could help. In the delayed event, instead of the condition that all devices in the group have a value of zero, it would be preferable, I think, to have them be in the range [0,0] for at least 3 minutes. That would prevent the lights from going out as long as there is some detected motion at least every 3 minutes, even if the TV is turned off. (I assume that with the current event, if the TV is on, the lights do not turn off.)
                      That is another good solution.

                      Comment


                        #12
                        Originally posted by Uncle Michael View Post
                        In rereading your event, I see one other change that could help. In the delayed event, instead of the condition that all devices in the group have a value of zero, it would be preferable, I think, to have them be in the range [0,0] for at least 3 minutes. That would prevent the lights from going out as long as there is some detected motion at least every 3 minutes, even if the TV is turned off. (I assume that with the current event, if the TV is on, the lights do not turn off.)
                        i do this too

                        Comment


                          #13
                          Originally posted by Uncle Michael View Post
                          In rereading your event, I see one other change that could help. In the delayed event, instead of the condition that all devices in the group have a value of zero, it would be preferable, I think, to have them be in the range [0,0] for at least 3 minutes. That would prevent the lights from going out as long as there is some detected motion at least every 3 minutes, even if the TV is turned off. (I assume that with the current event, if the TV is on, the lights do not turn off.)
                          Actually, this is how I decided to try it. Is this correct?

                          Click image for larger version

Name:	screencapture-192-168-1-15-8000-Events-2020-03-12-15_28_35.png
Views:	121
Size:	58.3 KB
ID:	1369550

                          I suppose I could also take the TV Plug condition out of both and then do another event where TV Plug is >10 then Disable the Lights On and Lights Off events?

                          Comment


                            #14
                            rprade I understand your logic also - I had to read it a couple of times. However, there would never be a time where there would be no motion before turning the TV on as I have a motion sensor right beside the TV.

                            Comment


                              #15
                              Originally posted by pcgirl65 View Post

                              If I were to add a Cancel Delayed Action before the Action of turning the lights off does it work because the rule is flowing down? I don't see how this would work? It would cancel the event of turning the lights off after 3 minutes. Doesn't it work that when all the Conditions are TRUE then the Events start? If the Conditions are FALSE then nothing happens?
                              Uncle Micheal and rprade have offered other good solutions. But to clear up the specific confusion of the events in the screenshot...

                              The reason the light turns off even though there is still motion, is that the Off event is actually running every time all three sensors become in a state of "no motion". And each time it runs it is setting up a delayed action to turn off the lights.

                              So you potentially have many delayed actions could be queueing up if there is intermittent motion periodically within the three minute delay. If you don't clear these delayed actions, they will all still run even though there has potentially been more motion since the delay started.

                              This is why you need to add the action to cancel the delayed actions first, then the second action will set up a new delayed action. This way you only ever have one delayed action queued up.

                              I hope that made some sense. It can be tricky to keep track of exactly what is happening with the delayed actions....

                              Comment

                              Working...
                              X