Jump to content
View in the app

A better way to browse. Learn more.

Universal Devices Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Programing options for a motion sensor that is too sensitive

Featured Replies

Posted

I have a motion on the back of my house that is running though my ELK M1

I have an ISY program to turn a light on when motion is sensed.

The problem is the motion sensor seems too sensitive, not sure if bugs or birds are triggering it.

Is there options in a program to sense multiple motion events with a time limit to trigger the lights?

On 9/30/2022 at 9:16 PM, theedudenator said:

Is there options in a program to sense multiple motion events with a time limit to trigger the lights?

Create a integer variable and use several programs, such as:

Program MotionSense

If
    Motion is switched on
    And $iMotionCount < 5
then
   $iMotionCount += 1
   Run Program MotionLightExpireMotion (if)
   Run Program MotionLightOn
else
   (none)

Program MotionLightON

If
     $iMotionCount = 5
then
    turn light on
else
    (none)

Program MotionLightExpireMotion 

If
   $iMotionCount > 0
then
   wait 10 seconds
   $iMotionCount -= 1
   Run Program MotionLightExpireMotion
else
   Turn Light Off
 

Disclaimer:  I don't have an ELK M1 and don't know how often motions can retrigger.  The wait and motion count above also may need adjustment based on that answer and personal preference. 

When I started writing this example I assumed it would use a State variable rather than an integer variable, but the solution is much more complicated using a state variable.   Since the 2nd and 3rd programs only have an integer variable in the If statement they will never run unless called by another program.

The first program is triggered on motion and only continues to accumulate the value if the motion value is less that 5.  Since the second and third program won't run on their own, it runs them.

The second program has one job only when the motion count gets to 5 it turns the light on.

the third program expires motion and anytime the value reaches 0 turns the light off (it may not be on but this minor inefficiency shouldn't cause problems, a fourth program could be used to turn off the light when the variable returns to 0 but it would need to be run from the else that currently turns the light off.)

   

Edited by MrBill
fix the typo pointed out by @larryllix

40 minutes ago, theedudenator said:

I am a bit lost on how this is made, and how does it count?

$iMotionCount < 5

$iMotionCount =+ 1

Probably would be listed as
$iMotionCount += 1

Edited by larryllix

10 hours ago, theedudenator said:

I am a bit lost on how this is made, and how does it count?

$iMotionCount < 5

as pointed out by @larryllix I typo'd the numeric operator, but to add to what he said let's take a second look, I've empathized where the motion count goes up and down.  So the first program counts motion the second program handles the actually switching, and the third program expires the motion.

Program MotionSense

If
    Motion is switched on
    And $iMotionCount < 5
then
   $iMotionCount += 1
   Run Program MotionLightExpireMotion (if)
   Run Program MotionLightOn
else
   (none)

Program MotionLightON

If
     $iMotionCount = 5
then
    turn light on
else
    (none)

Program MotionLightExpireMotion 

If
   $iMotionCount > 0
then
   wait 10 seconds
   $iMotionCount -= 1
   Run Program MotionLightExpireMotion
else
   Turn Light Off

Edited by MrBill

Guest
This topic is now closed to further replies.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.