mikek Posted Monday at 11:48 AM Posted Monday at 11:48 AM I'm looking for some ideas on the simplest and cleanest and most reliable way to do the following: I have a motion sensor on my porch (https://www.getzooz.com/zse70-outdoor-motion-sensor/). When motion is detected, I have a program that turns on the porch lights (fast on, night only) and also sends me a notification. I have the dimmer switch for those lights right near the porch door (https://www.getzooz.com/zooz-zen77-s2-dimmer/). I want to utilize the double-tap feature of the switch to enable/disable the motion sensor programmatically (via parameter 1) when I am going in and out of the porch door so it ignores my presence. I'm not an expert programmer by any means, and I don't know how to specify the double-tap. I don't even know if that's the best approach, but I would like to somehow utilize that switch because of its convenience. Any and all advice would be appreciated. Quote
Guy Lavoie Posted Monday at 01:35 PM Posted Monday at 01:35 PM If you can detect the double tap as an event in a program, then you could have two programs, something like this: If switch double-tap on event Then set motion detector parameter 1 to <enable> If switch double-tap off event Then set motion detector parameter 1 to <disable> I don't know these devices, so I can't tell you what is settable or not by program statements. Quote
gregkinney Posted Monday at 05:20 PM Posted Monday at 05:20 PM (edited) Another approach would be using a variable. Add a second program: If control switch fast on and not fast off Then set variable to 1 Else set variable to 0 And then in your current motion program, you would add one line: And if variable is 1 Just make sure that if you want the motion to always be on unless you toggle it off, that you set the starting value for the variable to 1. Edited Monday at 05:21 PM by gregkinney Quote
mikek Posted Monday at 06:51 PM Author Posted Monday at 06:51 PM I configured the switch to enable the paddle to be used as a scene button and I confirmed via the button status that a double-tap is indeed recognized as "Fast On" (and that the light doesn't actually turn on). However, when I insert that into my program, either directly or as a variable, the program doesn't work (motion is not detected). I'm attaching a simplified version of the program that I'm using to test. Quote
gregkinney Posted Monday at 07:06 PM Posted Monday at 07:06 PM So before you added the "And $State_5 is 1" line, this program did correctly work each time that motion was sensed, correct? The only change you made was adding the line "And $State_5 is 1"? And if the answer to the above question is yes, can you confim that the current value of $State_5 is 1? Quote
mikek Posted Monday at 07:27 PM Author Posted Monday at 07:27 PM Answer to your first question is yes. It did/does work without this line. In fact, this is a copy of the program with a lot of the bloat removed just to facilitate testing. Yes, value is 1. Quote
gregkinney Posted Monday at 07:29 PM Posted Monday at 07:29 PM Did you save the variables and save the programs after you changed them? Quote
gregkinney Posted Monday at 07:33 PM Posted Monday at 07:33 PM Sorry, that's the end of my small amount of expertise. Hopefully someone better chimes in. Quote
tazman Posted Monday at 07:38 PM Posted Monday at 07:38 PM (edited) For the motion sensor it should probably use control instead of status so when motion is switched on. Edited Monday at 07:47 PM by tazman Quote
mikek Posted 21 hours ago Author Posted 21 hours ago Thanks, everyone, for your help. I finally figured out the problem - a conflict with another program. Regarding control vs. status, both work fine. Why/when would you choose one over the other, in this case, why did you recommend control? On 6/16/2025 at 3:38 PM, tazman said: For the motion sensor it should probably use control instead of status so when motion is switched on. 1 Quote
BamBamF16 Posted 20 hours ago Posted 20 hours ago (edited) Control is an event caused by actuation of a device only (not from a program or the AC). It may not necessarily cause a status change (switch is already on and you turn it on again). So it really depends do you want the program fired on an actuation event or only when status changes. So in this case the motion actuation is a control event and you want the program firing on the motion control is appropriate. Edited 20 hours ago by BamBamF16 1 Quote
oberkc Posted 12 hours ago Posted 12 hours ago "Control on" is triggered any time on is received, but not triggered on off/dim/bright/etc. If a device (motion sensor in this case) is already on, a control condition will still trigger a program evaluation even though no change in status occurred. An off command will not trigger a program execution. A control condition is true only during that point when the expected condition is received. "Control on" is false at all other times. "Status on" is triggered by ANY change in status, and is true at all times when the status is on. If the device is currently on and it transmits another "on" command, a status condition will not trigger since it is not a change in status. Use of control versus status is based upon the desired logical result. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.