Announcement

Collapse
No announcement yet.

Trigger... Device Changes "N times in X seconds" ?

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

    Trigger... Device Changes "N times in X seconds" ?

    Something I used to do in Vera I sorely miss so wondering if anyone knows an easy way to do this. I get false positives on some motions sensors but since these rarely happen, once a night or so I need trigger to be like this...

    Sensor = Motion, 2 times within 60 seconds

    anyone do this or think of a way natively or with Easy Trigger ?

    thx for the help

    #2
    It can certainly be done with events. Here is an idea with 4 events ,1 timer, and 1 counter. I haven't tested. It is just pseudo event logic off the top of my head.

    Assuming N = 2 and X = 60

    Event1 - Test for motion and timer = 0, then set counter to 1, start timer
    Event2 - Test for motion and timer > 3, then increment counter
    Event3 - Test for motion and counter = N, then set timer to 0, set counter to 0, do whatever else you want
    Event4 - Test for timer > X, then set timer to 0, set counter to 0

    I've dealt with PIR motion sensors when doing arduino projects. A required delay between detected motions might be advised. Depending on the sensor you are using, they can bounce several times rather quickly even on false motion. A few seconds between them might be nice. That's why Event2 tests for timer > 3. It will depend on the characteristics of your motion sensor.

    Comment


      #3
      logbuilder
      thx for the example. I was hoping to do in a single event like I did in Vera. I know, this is not Vera (boy do I miss it sometimes). I'm going to see if spud will add to Easy Trigger.

      Comment


        #4
        What type of motion sensor are you using? Usually the purpose built motion sensors have sensitivity controls and some have delays. I haven't found a need to compensate in events for false positives. Dealing directly with the PIR sensor is another story which is where my debouncing thoughts come from.

        Also, what I presented was neither an example of eloquence nor efficiency. It was merely an example of how it might be done with standard events.

        Hey, maybe this is a 'name that tune' moment. Can anyone do it in fewer events? Maybe a script?

        Also, in terms of a developer investing time in creating a new function, it is always a balance between effort and reward. Reward in this case might be how many people would use such a function. Personally, I would have no use for this.


        Comment


          #5
          Elegant is in the eye of the observer. I am only concerned with function. Even an inelegant solution that works is fine, because I rarely revisit Events unless they are not working and I don't have other people looking at them. I have little concern about elegance, but by the same token a clean handful of events can be elegant.

          I have only two rooms when I need to see sustained motion before something happens. I was careful in the beginning to evaluate a number of motion sensors and their characteristics before choosing a type for the house. I settled on security PIR sensors because of their very fast response and near binary action - they go to No Motion almost the instant motion stops and to Motion nearly the instant it starts. I created events for both bathroom fans about 4 years ago. It probably took less than a minute to create the three Events. They are clean and simple. First motion starts a timer and increments a counter. Each subsequent motion increments the counter. When the counter exceeds 5, the fan is turned on. This represents sustained occupancy in the bathrooms, so the fan is turned on.

          When it takes less time to assemble Events to accomplish a goal than it does to write a post about how tedious or inelegant they are, it is easy to identify where the inefficiency lies.

          Click image for larger version  Name:	Capture.PNG Views:	1 Size:	104.5 KB ID:	1280663

          A third Event stops the timer and resets the counter at 2 minutes starting the process over.

          Click image for larger version  Name:	Capture1.PNG Views:	1 Size:	42.7 KB ID:	1280664

          Comment


            #6
            Please pardon the brief tangent.

            Originally posted by rprade View Post
            I settled on security PIR sensors...
            Randy, are these on a DSC panel using the Envisalink plugin? I haven't tried using my PIRs (Honeywell Vista panel, Envisalink, EnvisalinkAdemco PI) because current wiring has multiple rooms on a single zone, but am considering reworking it. I see up to a couple seconds delay on wired door contacts is the reason I ask.
            -Wade

            Comment


              #7
              Originally posted by cc4005 View Post
              Please pardon the brief tangent.



              Randy, are these on a DSC panel using the Envisalink plugin? I haven't tried using my PIRs (Honeywell Vista panel, Envisalink, EnvisalinkAdemco PI) because current wiring has multiple rooms on a single zone, but am considering reworking it. I see up to a couple seconds delay on wired door contacts is the reason I ask.
              Yes. They are either low end DSC PIRs, Bosch PIRs or Bosch dual mode devices. The motion to light delay is about a second. It looks like most of the delay is in the motion detectors themselves. You can see the lights come on within milliseconds of the PIRs indicator. We use all wireless door and window sensors, but they are also right at a second between a door opening and an Event being triggered.

              Comment


                #8
                Originally posted by rprade View Post
                Yes. They are either low end DSC PIRs, Bosch PIRs or Bosch dual mode devices. The motion to light delay is about a second. It looks like most of the delay is in the motion detectors themselves. You can see the lights come on within milliseconds of the PIRs indicator. We use all wireless door and window sensors, but they are also right at a second between a door opening and an Event being triggered.
                Thanks.
                -Wade

                Comment

                Working...
                X