kewashi Posted March 22, 2020 Posted March 22, 2020 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.
gzahar Posted March 22, 2020 Posted March 22, 2020 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.
kewashi Posted March 22, 2020 Author Posted March 22, 2020 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.
lilyoyo1 Posted March 22, 2020 Posted March 22, 2020 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
kewashi Posted March 22, 2020 Author Posted March 22, 2020 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.
kewashi Posted March 22, 2020 Author Posted March 22, 2020 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.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.