Luminosity - when to switch on the lights

I suspect this is going to show my ignorance, but I've wondered about this before.

At the moment, I have some dumb sensors for my entrance hallway. It's connected directly to the light with 2 adjustments, time and luminosity.

When movement is detected (IR), if it's dark enough the light comes on. Simple.

I don't understand how the photo cell isn't affected by the light itself. I. E. It's dark enough to have the bulb come on, fair enough, but once the light's on, how does it distinguish between the area being bright enough because of the bulb, compared to having enough light from the window?

Poorest explanation, ever.

Ultimately I'm slowly replacing all of my lights with zigbee modules. I have seperate motion sensors on all areas. My goal would be to install something smart which can be used to determine whether or not to 'call for light' in that area.

If I purchase some sort of luminosity sensor to stick in an area, I can't figure out logically how this would work in practice.

Hi @djh_wolf ,

The PIR sensor is affected by the light bulbs being on. However, the sensor only has a 'switch on if' function and not a turn off when light level above L. It will just time out turn off the light and turn it on again. I have one hallway where the lights come on after a power out and then the PIR never sends the on-command (checked the logs). I have to manually turn off the lights and then all starts working as intended again. You can also put a light in your room to test this behavior.
I still use my 'old' not smart PIR sensors as they are good quality and put their outline into a switch input of a smart dimmer module. Works like a charm even when there is a problem with your hub as the control is direct (except of the power out situation sometimes but those are rare in the Netherlands). Using the hub I can control the light levels depending on time of day and do a presence simulation when away,

Cheers Rene

For this reason I have an external light sensor which is not affected by any lights at all. In every room there is a light sensor mounted on the window facing out. This way light in the room has near zero influence on the data from a sensor. Few light sensor are mounted in the rooms but not in direct line with lights. All thresholds are experimental (took few iterations for fine tuning values). So far everything works very well for lights and curtains. Basically there is no need to control stitches manually. Everything is near 100% automatic.

3 Likes

In general, the sensor can’t distinguish, since light is light.

As you’ve mentioned, not really an issue for turning the light on.

What is your goal for the trigger or conditions under which the light should turn off?

bingo, that's how it works, thanks! which means that the light will never switch off if it's triggered when dark, then subject to constant movement, but 3 hours later is under blazing sunshine - still no switch off event.

great idea.

Ideally, the conditions for switch-off would be when movement has ceased for x amount of time OR if it's bright enough anyway. I also wished to allow the bathroom light switch to turn on, but dimmed if it's pitch black.

I guess it's possible with some clever positioning of sensors.

Thanks all!

The way I do something similar is with a multi-sensor. The wall light switch is commanded on when motion is detected if it is dark. When motion stops for several minutes the light turns off. I also respect the physical wall switch as using it overrides the automation.

I wrote an automation (well it is a custom app now, but it used to run in Webcore just fine), that uses an indoor light sensor and a virtual dimmer to set a light level for the room scenes.

Basically, each scene has a light level as part of it, which changes the virtual dimmer level setting for the scene. The level dimmer is simply the setpoint for the room light level for a scene. Every time the light sensor changes, it causes the automation to calculates what the levels for the lights should be to hit that target, then it does a checkback to see if it hit target. If not, it does small adjustments to levels and checks back until it hits the target. I make an initial change in level that is bigger if the light level is far from target, and smaller if closer to target. It gets it close, then the governor takes care of the fine adjustments to get to target. If I turn off the virtual dimmer, it deactivates auto light levels from calculating.

I didn't want all my lights to be same level, so it calculates a low, medium, and high level and saves those values to a data driver (but those attributes could just be hub variables). Then in my scenes, I use those variables as the levels, either low, medium, or high. The values change together when adjusted. High level is calculated, then medium is 60% and low is 40% of the high light level value.

The result is that with the morning and evening scenes, it reacts to the changes as the sun sets or rises. It will bring up the lights as it gets darker, and push them down as it gets lighter in the morning. My day scene sometimes brings the lights up a bit if it very cloudy or raining. It is gradual so I never notice any lights dimming. After dark, it just keeps the lights at the level I want for the scene, which usually maxes out to the highest settings. I can also change the virtual dimmer on a dashboard, which will change the light level of the room on demand for any scene, and the lights all keep their relative brightness, to keep the ambiance of some lights being dimmer than others.

In this case, I want the light sensor to pick up that the lamps are changing the inside light level, as that is what I govern to. However, not all light sensors act the same. I have found the Fibaro ZWave multi-sensor reacts to very small changes in ambient light. Others do not seem to change much at all and could not be used for this.

My app is very specific to my use case, so things are hard-coded into it based on my house. I didn't make it to be a generic app anyone can use, but with a bit of tinkering in the Groovy code it could be used by anyone. I can post the code if anyone has an interest in playing with it.

1 Like

I always wondered about internal luminance sensors (integral to the motion sensor) being affected by the lights that they'd turned on. I have 3 or 4 rooms using Fibaro motion sensors, only two use the internal lux sensor (they seem to work fine). For the other 2 (and all my other rooms where I'm using a standard intruder alarm PIR for motion), I do things a little differently. For each room I have a hub variable boolean (roomDark); a rule sets that true when either the external lux level falls below a specified value or the curtain in that room closes, then false when the external luminance rises (so long as the curtain/shade is open). The room lighting instances triggered by motion are limited if the roomDark is false.

I gave up, lol.
Motions and sunrise/sunset offsets.
If it's particularly cloudy, I flip a switch.

1 Like

Not sure if this would work for you but I have a bit of a complex set of rules for my master bedroom lights. Part of it involves luminosity. I have a Required Expression of the Mode being Day or Evening (I also have Early Morning and Night) and the Luminance of a bedroom sensor being <= 30. Then the triggers are just motion on either of 2 motions sensors in the room or if the bedroom door is open or closed. The actions will then switch the lights accordingly.

I’ve been using auto dimmer for years to change lighting levels based on outdoor ambient levels.
It’s available in our example repo

3 Likes

Is there some sort of online database for outdoor ambient light level by zip code, such as there is for weather?

I don't know, but I've been using Hue Outdoor Motion sensors to fetch LUX readings for close to 10 years now...

2 Likes

I also use a Hue Outdoor sensor for lux levels. Works great. I use it to set a hub variable that holds the dimmer level I want.

1 Like

Not sure how that’s possible as the light level is dependent on weather regardless of location. That was my primary reason for using lux level from an external sensor as opposed to sunrise/sunset with offset (for lighting and my CCTV cam settings)

1 Like

Not a fan of battery devices.

1 Like