Control Light on/off light with Motion or Door sensor

New to vera/pleg and first post in the forums.

I have my garage lights that i would like to turn on with a door opening or a motion sensor.

What happens is I open the door and it starts strobing the lights. All though i find this funny my wife does not. ;D
I have been trying different things and just can’t wrap my head around it. I’ve looked all over the pleg forum and can’t find what i’m looking for… Maybe because this should be easy and i’m making it harder than it should be…

This is not as important but id also like to be able to turn the light on manually and have it stay on but instead for example My bedroom light turns off with the no motion detected even though I turned the light on at the switch. I believe I have found a proper example for this but have not had time to digest it yet.,14709.msg111551.html

Any help would be much appreciated!!

Using PLEG for this does work, but it is complicated … you might want to try using the SmartSwitch plugin, it will do what you want but is much less complex to setup

Can you share more about using the smartswitch plugin too accomplish? trying to lower the learning curve coming from another platform where it was part of the actual programing. Thanks


I’m new to this but a couple of things draw my attention about the bedroom scene.

First, tjdit defined a trigger for no motion detection but decided not to use it in his conditions which I suppose is due to the trigger showing timestamps of “undefined” which I suppose means it has never actually being fired. Maybe some sensor misconfiguration or malfunction.

Then there is the absence of a condition to hold some logic about how the light was turned on(automatic vs manual) which has been suggested as a sequence expression where the lapse between the trigger to turn on the light and the actual change of the light to ON is less than, for example, 15 seconds(suggesting a very probable cause and effect). In his case, the condition would contain something like: MBLightOn; BedRoomLight < 15
The condition for the light to be turned off would then be something like: if it was turned on automatically AND there has been no motion sensed after the triggering motion AND 7 minutes have passed since it was turned on

The garage condition for turning on the light becomes true in two situations:

  1. If lights are off AND door is open
  2. If there is motion

So, I’m not sure how often the motion sensor is polling and if that is what may be interfering.