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.

Motion sensor triggering a bell with a Wait - how to prevent multiple executions

Featured Replies

Posted

This seems like such a simple problem but I'm stumped.  I've got an Insteon motion sensor that watches my driveway.  It is set to only send On commands.  When it senses motion I want it to ring a bell once (the bell part is all working fine), which I do so like this:

 

        Set 'Kitchen.Den / Bell Relay' On
        Wait  4 seconds
        Set 'Kitchen.Den / Bell Relay' On
 
When motion is detected, I want it to run that sequence only once for any 30 second period.  I'm having trouble creating a program that suppresses any addition motion senses from ringing the bell within 30 sec of the first bell ring.
 
I won't confuse this by posting code for the various things I've tried; but needing to use the WAIT causes my If to be re-evaluated which messes up my attempts to set variables and such to stop subsequent bell rings - this seems like a simple problem so hopefully someone has a simple solution.
 
Thanks - djm

Hi djm - I would suggest 2 programs, no variables. The second program disables the first for the amount of time you specify to stop the motion sensor detection from starting the program over again.

 

MotionSensed

     If Motion sensor is switched on

     Then

         Run Program 'BellRelay' (then path)

     else

 

BellRelay

    if

    then

        Disable Program 'MotionSensed'

        Set 'Kitchen.Den / Bell Relay' On
        Wait  4 seconds
        Set 'Kitchen.Den / Bell Relay' On
        Wait ??? minutes or seconds (to stop it from happening for a while)  
        Enable Program 'MotionSensed
     else
 
The second program has no if clause and does not need it. You probably don't have to, but I would disable BellRelay so it doesn't run on its own, just when called by MotionSensed 
 

Paul

  • Author

Wow, I would have never thought of that.  

 

I some times think having general programming skills is a hindrance with the ISY since the statements work so differently than they would in your typical program language.

 

thanks for the help

NP, please let us know how that worked.

 

Its true that the ISY thinks much more like an industrial event driven controller, and can not afford the luxuries of a full development language.

 

The general 2 program approach outlined above is a common way to do things for me. I had to learn from others here on the forums to look at things this way. It does build up the number of programs, so program naming and folders become important to keep your sanity

 

Paul

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.