mikek Posted 12 hours ago Posted 12 hours ago 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 10 hours ago Posted 10 hours ago 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 7 hours ago Posted 7 hours ago (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 7 hours ago by gregkinney Quote
mikek Posted 5 hours ago Author Posted 5 hours ago 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 5 hours ago Posted 5 hours ago 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 4 hours ago Author Posted 4 hours ago 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 4 hours ago Posted 4 hours ago Did you save the variables and save the programs after you changed them? Quote
gregkinney Posted 4 hours ago Posted 4 hours ago Sorry, that's the end of my small amount of expertise. Hopefully someone better chimes in. Quote
tazman Posted 4 hours ago Posted 4 hours ago (edited) For the motion sensor it should probably use control instead of status so when motion is switched on. Edited 4 hours ago by tazman 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.