I'm not sure I'm using the "Wait for Condition" correctly.
Basically what I want is for light to come on when motion is detected and for it to turn off when motion becomes inactive. In the screenshot, note that the virtual locks are just wifi plugs that I'm triggering via Alexa routines. "locked" is "on" and "unlocked" is off.
What happens when the set duration elapses and the motion sensor's status doesn't change? Does it proceed to the next step?
The problem I'm having is the light comes on but doesn't always turn off when it's supposed to.
Yes, when the motion sensor has become inactive and stayed inactive for 20 minutes, it will move on to the next action. Turn on Event, Trigger and Action logging for the rule so you can see what is going.
Ah I see.
What if I wanted the system to wait for inactive status for a maximum of 20 minutes before moving to next step. Is "timeout" the option to select here?
I basically want the lights on for 20 minutes or until there's no motion detected, whichever is shorter.
So, if there is motion beyond 20 minutes you still want the lights to turn off?
Usually, for motion activated lights, what you want is for motion to turn the lights on, then the lights to stay on until there is no motion for x minutes. In my house the highest x is 5 minutes, and most are 1 or 2 minutes. As long as there continues to be motion, the lights stay on (someone is moving around in the area). Once there is no motion for x, the lights turn off.
Check out built-in app Motion Lighting.
Thank you that's very insightful and makes much more sense. I changed it per your suggestion and it's working as I want it to.
PS: Can't use the motion lighting app because I'm controlling wifi devices that are being handled through Alex routines. Once I switch to zwave/zigbee outlets, i could probably simplify this a lot more and use that app instead
Are you using a custom driver? If so, it would be easy to add switch capability to it (which adds on/off commands). Those commands would just call the lock/unlock commands that are there already.
No I have them connected through the etekcity and smartlife apps/cloud services then linked to Alexa routines.
I tried to look into custom drivers and fimrware but seems it involves soldering the wifi plugs to get the custom firmware on there.
If there's an easy software only way to get the wifi plugs to be controlled locally, I'd be very ecxited to learn
What is the device in Hubitat that you are using with Alexa?
I have virtual locks setup in hubitat that are linked to the wifi plugs via alexa routines.
When the virtual lock locks, it triggers "on" routine and when it unlocks it triggers "off" routine. I did virtual locks because at the time, I couldn't figure out why virtual motion sensors weren't being found by Alexa but I could change it if need be now
Check out this Virtual Lock driver in our public repo:
I have added Switch to that, and you can turn it on or off. On = lock, off = unlock. This will allow you to control your virtual locks as if they were switches, so you could use other apps....
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.