So as we see the potential end of smart lighting with groovy, I am having a lot of trouble figuring out how to make routines do the same thing as smart lighting. I can get my motion sensors to turn on the lights, and turn off after a set amount of time, but I can’t figure out how to use the physical switch to turn it off.
With smart lighting you can override the routine and turn off the light by the physical switch. And you can turn on the light before the motion sensor is activated and the light will stay on.
What I found was that my Iris motion sensors turn on for thirty seconds and then back off when motion is detected.
Try moving your time delays to the (if) side. For example: I your motion sensor has not seen motion for one minute the turn off the switch. This also will stop your process from running every time there’s no motion.
With smart lighting you can override the routine and turn off the light by the physical switch. And you can turn on the light before the motion sensor is activated and the light will stay on.
I can not seem to get the routines to function the same way.
I had two thoughts. The first one was that you should test for motion being inactive for one minute when turning off, rather than using a delayed action, but that has already been pointed out. The second one is:
Edit the ‘On’ routine so that Dining Room Lights off is a ‘pre-condition’. As things stand the routine will be activated when your lights are turned off and if motion is active they will be turned straight back on again. By making the change it is only motion being detected that will actually make things happen. It is like telling Smart Lighting to only do something when a switch is off.
That should hopefully sort out what was causing issues when you tried turning the lights off by the switch.
A third thought is needed though. Something needs to stop the ‘Off’ routine running when it isn’t wanted (@Terri_Baker has already shown an interesting method exploiting the dimmer level). That is normally where the virtual switch comes in. You turn it on as an additional action in the ‘On’ routine. Then you make the ‘Off’ routine use that virtual switch being on as a pre-condition and have it turn it off as an action. There may be an edge condition in there somewhere where things can get out of sync but I haven’t thought deeply about it.
Thanks @orangebucket
The below is working great. I can turn on or off the light switch from the switch or app just like smart lighting.
Thank you all for your help!
Great, I also see from you that by setting a timer in the conditions, the routine is no longer local but becomes cloud. I do not understand why. Same thing even if in the conditions instead of the time you set a brightness
It will simply be that they haven’t added the necessary code to the hub firmware yet. It is quite likely they have to rewrite it.
The same thing happened with Smart Lighting. Not every ‘rule’ was available in the hub and there were also times when the same automation running in the cloud or locally behaved differently as they were implemented slightly differently.