I've setup a set of lights in an RL app to activate with both a switch and a motion sensor. The way I want it to work is if the switch is turned on, activate the lights, and disable the motion sensor. This way the switch being on acts as an override / on is on. I tried to accomplish this through disabling activation when the switch turns on and reenabling when the switch turns off. However, turning off the lights only works ~75% of the time and I think there is a race condition to re-enabling the switch when I turn the switch off and taking that as a de-activation event. Here is an example from the logs where you can see it looks like the app attempted to shut off the lights 0.007s before the shut off was re-enabled. Is there another way to go about this? It seems like this is the type of use case you would want to use the disabling activation feature.
Here is an example where it worked properly:
I have exactly this setup myself. For the most part it works well. There can be a few times where it doesn't work the way I would like, but that is more down to how I have set it up.
I agree though, some screenshots would help.
Put simply, my setup in each room uses a virtual switch to control whether motion lighting is active or not with button controller and other rules used to control the virtual switch, including buttons that manually set the lighting scene, turning off the motion lighting at the same time.
Room Lighting Setup
The rules for my Hue Tap Dials are in Node Red and a bit of a pain to screenshot, but basically they just call Maker API and turn off the virtual switch when scene button's are pressed and turn it back on when the 4th button is pressed, which also turns the lights off.
In my bedroom I also have a Samsung / Aeotec button to manually control motion lighting without adjusting the lights themselves:
Samsung Button Rule
Could it be you have the switch included in the list of devices being controlled by the Room Lighting instance, like I think @libra_sun_2000 was suggesting earlier as the potential issue?
2 Likes