Announcement

Collapse
No announcement yet.

disable event automatically based on a counter of how many times the event has run?

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

    disable event automatically based on a counter of how many times the event has run?

    I have a motion event at my front door that triggers a camera view on the tablets in my house. (first event) Camera sees motion, triggers a VD motion detector, and fires off the camera view (second event) on some HSTouch enabled tablets. I have the second event setup to not be able to rerun for 15 minutes...

    My issue is that sometimes it's windy here, and even with the 15 minute interval.... the event just continues to fire all day every 15 min. What i'd like to do is have some sort of "event counter" that says that

    IF xx event runs 4 times in one hour
    THEN disable event
    Wait 60 minutes
    THEN renable event

    Any thoughts on best way to set this up?

    Thanks.

    #2
    Could you start a timer at the first occurance (counter = 0) and increment counter by 1? Then if counter >3 and if timer is < 60 minutes, disable event, set counter to 0, set timer to 0 and stop. I don't use timers or counters, but some combo should work. You'd also need to reset/ stop the counter and timer when counter is low and timer is high, i.e. counter = 2 and timer is 90minutes. Don't know if it's the best way, but hope this helps.

    Comment


      #3
      What about adding an anemometer and gating motion detection based on wind speed?
      "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

      Comment


        #4
        Outside of the box thinking but you could use my HS4 Log monitor (which has a rolling watch period/watch period trigger count built-in) to trigger on 4 matches (using the event name) within an hour. That would then trigger another event which disables your second event with a 1 hour wait time and then enables it again.
        Jon

        Comment


          #5
          Originally posted by jon00 View Post
          Outside of the box thinking but you could use my HS4 Log monitor (which has a rolling watch period/watch period trigger count built-in) to trigger on 4 matches (using the event name) within an hour. That would then trigger another event which disables your second event with a 1 hour wait time and then enables it again.
          oh... I like that. Already use your log monitor for other events.

          One silly thing I can't figure out is how to enable/disable one event from another?

          Comment


            #6
            Just run immediate script commands as your actions:

            &hs.DisableEvent("<event name>")

            Wait 1 hour

            &hs.EnableEvent("<event name>")

            To get 4 triggers, make sure the watch period is over 1 hour to give a little head room.
            Jon

            Comment


              #7
              Originally posted by Tomgru View Post

              oh... I like that. Already use your log monitor for other events.

              One silly thing I can't figure out is how to enable/disable one event from another?
              EasyTrigger has a Disable and Enable Event action and I'm pretty sure mcsMQTT does as well. I'm not sure if mcsMQTT requires an MQTT message or not. I'll double check and update this post.
              "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

              Comment


                #8
                Originally posted by Tomgru View Post
                I have a motion event at my front door that triggers a camera view on the tablets in my house. (first event) Camera sees motion, triggers a VD motion detector, and fires off the camera view (second event) on some HSTouch enabled tablets. I have the second event setup to not be able to rerun for 15 minutes...

                My issue is that sometimes it's windy here, and even with the 15 minute interval.... the event just continues to fire all day every 15 min. What i'd like to do is have some sort of "event counter" that says that

                IF xx event runs 4 times in one hour
                THEN disable event
                Wait 60 minutes
                THEN renable event

                Any thoughts on best way to set this up?

                Thanks.
                I do this now with my weather station for my holiday blow-ups so they don't blow away - here's my example, a simple modification will make it fit your needs.
                First event - If it gusts past 15 MPH - increment the counter by one.

                Second event - After the counter gets past 4, remove the delayed action of the holiday blow-ups then turn the holiday blow up decorations off with a delayed action of turning them back on in 2 hours.

                Third event that resets the gust counter so if the wind keeps going, the gust counter prevents the blow-ups from turning back on since the 2nd event I have removes the 2 hours delayed "on"

                Seems as good of an excuse as any to get a weather station!

                (BTW, I'm not against saying Christmas, we have multiple holidays covered)
                Dan-O
                HomeSeer contributor since summer 1999, yes 1999!

                Comment


                  #9
                  You don't need to disable the event. Just add a condition to the event, and the counter needs to decrement:

                  Click image for larger version

Name:	Conditional Event.png
Views:	203
Size:	29.3 KB
ID:	1562197

                  Then you need a second delayed event that resets the counter after whatever timeframe you need:

                  Click image for larger version

Name:	Reset Event.png
Views:	183
Size:	28.0 KB
ID:	1562198

                  Personally, I always want to record on motion - even if it's just wind. Because, you know... paranoia.

                  As always, YMMV

                  Comment


                    #10
                    Originally posted by Dan-O View Post

                    I do this now with my weather station for my holiday blow-ups so they don't blow away - here's my example, a simple modification will make it fit your needs.
                    First event - If it gusts past 15 MPH - increment the counter by one.

                    Second event - After the counter gets past 4, remove the delayed action of the holiday blow-ups then turn the holiday blow up decorations off with a delayed action of turning them back on in 2 hours.

                    Third event that resets the gust counter so if the wind keeps going, the gust counter prevents the blow-ups from turning back on since the 2nd event I have removes the 2 hours delayed "on"

                    Seems as good of an excuse as any to get a weather station!

                    (BTW, I'm not against saying Christmas, we have multiple holidays covered)
                    That was my thoughts on using an anemometer (aka wind-speed indicator in a weather station) as a condition of (gate) motion detection. Pre-drought, I used one of these as a condition for running the lawn sprinklers.
                    "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                    Comment


                      #11
                      Originally posted by kenm View Post

                      That was my thoughts on using an anemometer (aka wind-speed indicator in a weather station) as a condition of (gate) motion detection. Pre-drought, I used one of these as a condition for running the lawn sprinklers.
                      Did you just manplain what an anemometer was to us?
                      Dan-O
                      HomeSeer contributor since summer 1999, yes 1999!

                      Comment


                        #12
                        Originally posted by Dan-O View Post

                        Did you just manplain what an anemometer was to us?
                        <Sigh> Yeah pretty much. Sorry about that. I suggested it in post 3 above but it seemed to get ignored so I thought I'd repeat myself.
                        "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                        Comment


                          #13
                          Originally posted by jon00 View Post
                          Just run immediate script commands as your actions:

                          &hs.DisableEvent("<event name>")

                          Wait 1 hour

                          &hs.EnableEvent("<event name>")

                          To get 4 triggers, make sure the watch period is over 1 hour to give a little head room.
                          This is exactly what I needed to solve a design problem I had.

                          This is the second time this forum pointed me to a script that solved a problem for me. How can I find more about these &hs scripts? Are they documented anywhere? Can I look at a Linux directory to find all of them?

                          I'm not great with Linux but I can probably find my way around.

                          I'm running HS4 on a HomeTroller Pi.

                          Comment


                            #14
                            Originally posted by bakers12 View Post

                            This is exactly what I needed to solve a design problem I had.

                            This is the second time this forum pointed me to a script that solved a problem for me. How can I find more about these &hs scripts? Are they documented anywhere? Can I look at a Linux directory to find all of them?

                            I'm not great with Linux but I can probably find my way around.

                            I'm running HS4 on a HomeTroller Pi.
                            Those are scripting methods coded into the hs object.

                            Here's a good place to start: https://help.homeseer.com/help/HS3/static/#.scripting

                            This doesn't cover anything that was added to HS4, but I know there was an ongoing effort to consolidate and update the HS4 documentation.
                            "if I have seen further [than others], it is by standing on the shoulders of giants." --Sir Isaac Newton (1675)

                            Comment


                              #15
                              Originally posted by kenm View Post

                              Those are scripting methods coded into the hs object.

                              Here's a good place to start: https://help.homeseer.com/help/HS3/static/#.scripting

                              This doesn't cover anything that was added to HS4, but I know there was an ongoing effort to consolidate and update the HS4 documentation.
                              Thanks, Ken! I'll start reading.

                              Comment

                              Working...
                              X