I recently installed motion sensors to automatically turn on hallway and kitchen lights when someone walks in. They work great at night but during the day they keep turning on the lights even when there is plenty of natural sunlight.
I have checked the settings but I am not sure if it is an issue with the sensors themselves or if I need to add some kind of daylight sensor/override.
Has anyone here set up motion sensors so they only work in low light conditions? What is the best way to fine tune them so I am not wasting electricity during the day?
Thanks in advance for any suggestions
Hi James,
I am using generic PIR motion sensors one of them is a Sonoff and yes, they are controlled through OpenHAB. Right now I am just using basic rules to trigger the lights but I haven’t added any lux/light level condition yet.
If you or @denominator have suggestions on how to set up that daylight check in OpenHAB, I do appreciate it.
Thanks for the tip,
I have not used the Astro binding much yet but checking the sun elevation sounds like exactly what I need. I will try setting a rule so the motion sensor triggers only when the elevation is below zero.
And yes, having a built-in time of day channel in Astro would make these kinds of conditions much simpler to set up.
If it’s just this one motion sensor or a small set of motion sensors, this suggestion by @jimtng is going to be the least work overall.
If you have lots more things you want to control based on the time of day, the Time Based State Machine is going to be useful for you. Just note that the tutorial @denominator linked to is a bit old at this point. Since then OH has gained new features that made some stuff that used to have to be done in rules now part of OH itself, such as being able to trigger a rule at the time or datetime in a DateTime Item.
You also might consider adding a motion sensor with an exposed illuminance item that could also be used to override the astro binding or other time cron lock out approach for low light conditions even say during a dark and cloudy day where the amount of sun light may not be sufficient for the area the lighting illumnates.
… if it works well. I’ve got a few Shelly BLU Motions, which do declare lux values, but those only get updated when motion is detected (no problem so far) and they’re inconsistent. In the same room, one reads 116 lux, the other one 28 lux.
But they’re in a room without windows. I think they update the lux value that was ‘applicable’ right before the motion, and thus by the time the second device detected motion, there was more light (since they switch the ceiling light). If you use them in a light in which there already is sunlight, that aspect might work better.
I have light sensors, either built into the motion sensor or separate, it doesn’t really matter. I also set up 2 dummy items as threshold ON and threshold OFF. So, for example, if light level 0 is night and light level 60 is with the lights on, I set the threshold ON = 50 and OFF = 65 to avoid an ON-OFF-ON flip-flop. If the light drops below 50 the lights switch on and the level then increases to 60 but the light doesn’t turn off until the ambient light increases further to 65. The threshold levels are controlled by sliders on my UI. I also have a dummy switch named AUTO to override everything. So my rule is basically