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.

Program with motion duration

Featured Replies

Posted

Is there a way to write a program to take action if a motion sensor has been DOF for some period of time? I am moving here from the SmartThings environment where doing this sort of thing is trivial, but I can't find how to do it here with the Program feature. I am sure it can do it, but just differently. Help appreciated.

 

If:

motion sensor is switched off (assume that is what you mean by DOF)

then:

wait some period of time

do something

Depending on how much time you are waiting and what you want to happen if the sensor gets re-triggered during that time; it may require some more complex structure.

  • Author

Thanks @gzahar    UPDATE... I do need the more complex logic. I think I have something figured it that will work, but let me know if there is an easier way:

Program 1:  if Motion Starts then:  set Variables 1 = 1 AND turn on light

Program 2: If Motion Stops then:   Set Variable 1 = 0;  Wait x Minutes;  Run If Program 3

Program 3: If Variable 1 = 0  then:  Turn off light

This works like a champ.  If motion starts while Program 2 is waiting, then when Program 3 is triggered Variable 1 will have been reset to 1 and the light won't  go off, unless a new motion stop occurs to resent variable 1 back to 0. The delay needs to be long enough so that I see movement in the room or the motion sensor resets.

 

 

 

 

Edited by kewashi
test, fixed logic, posted to share

1 hour ago, kewashi said:

Thanks @gzahar    UPDATE... I do need the more complex logic. I think I have something figured it that will work, but let me know if there is an easier way:

Program 1:  if Motion Starts then:  set Variables 1 = 1 AND turn on light

Program 2: If Motion Stops then:   Set Variable 1 = 0;  Wait x Minutes;  Run If Program 3

Program 3: If Variable 1 = 0  then:  Turn off light

This works like a champ.  If motion starts while Program 2 is waiting, then when Program 3 is triggered Variable 1 will have been reset to 1 and the light won't  go off, unless a new motion stop occurs to resent variable 1 back to 0. The delay needs to be long enough so that I see movement in the room or the motion sensor resets.

 

 

 

 

Are you using only zwave, insteon, or both?What are you trying to do exactly? 3 programs for a simple action may be a bit much.

Simply turning a light on and off can be as simple as linking the sensor to the switch with the sensor set to only on mode. At that point your program would be

If motion is turned on

Wait 3 minutes turn lights off.

The more details you provide the more you can dial things in

Edited by lilyoyo1

  • Author

The motion sensor is zwave and the Light switch is Insteon. I have mostly zwave devices and most are still paired into my SmartThings hub. I moved one Zwave motion sensor over to use as a trigger for the two Insteon switches I installed in my office. The logic above seems to work, but I would like to try your suggestion if it works with Zwave motion sensors.

 

  • Author

By the way, when I paired my EcoLink Zwave motion sensor it gave me 9 different Zwave devices:

 Binary Sensor; Devices; Glass Break Alarm; Intrusion Alarm; Motion Sensor; Notify Sensor; Power Management; Tamper Alarm; Tamper Code Alarm

I assume that is normal. The Binary Sensor and Motion Sensor devices seem to give the same on, off result needed to use in triggers.

 

Archived

This topic is now archived and is 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.