Adjusting Dimmer Level Based On Lux From Motion Sensor

Posted on
Thu Apr 28, 2016 6:52 pm
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Adjusting Dimmer Level Based On Lux From Motion Sensor

Hello All,

Has anyone had any success adjusting a dimmer switch light level based on the lux currently in the room. What I would like to do is have the lights in one of my rooms slowly brighten up as the the sun sets and the room becomes darker. Can this be achieved? I currently use Aeon Labs 5th Gen and Fibaro Motion Sensors.

Thanks in advance!

Posted on
Thu Apr 28, 2016 9:36 pm
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

All I could think to do would be this...wait until dark and then set the lights to the level you want to maintain the room at. Check the Lux level and make that the target.

The you'll have a scheduled check to read the Lux value, and if the value is less than the target value, increase the dimmer value and check again. Eventually the lights will brighten enough to meet the lux value desired.

This way...if the ambient light is higher than the desired lux value, no lights will be on. As the ambient lux value drops, the dimmer will begin ramping up to maintain it.

Someone with similar sensors might can get you screenshots of the settings, or can post the AppleScript or Python code to do it...I don't have anything set up at the moment to try this, but it's very similar to what I'd want to do myself when storms come through.

Posted on
Fri Apr 29, 2016 1:14 am
IndigoSam offline
Posts: 182
Joined: Apr 14, 2013

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

That's roughly what I would do, but with some slight variations.

If you put your target lux into a variable you could adjust this as you see fit. Either because you want to fine tune it over a couple of weeks, or because it is something you want to change often, so tie it into a control.

I wouldn't poll the multi sensor for current lux, it should raise a lux change event when it does change and you can build a trigger on this event. You may also want to stop trying to raise the light percentage once you are at 100%, purely to reduce network traffic.

Sam

Posted on
Fri Apr 29, 2016 7:49 am
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

IndigoSam wrote:
I wouldn't poll the multi sensor for current lux, it should raise a lux change event when it does change and you can build a trigger on this event. You may also want to stop trying to raise the light percentage once you are at 100%, purely to reduce network traffic.


I think I'd go with polling myself...then you determine how many times an hour it talks. I don't know how "talkative" that sensor can be with updates, but if you go on a change in the lux value, then you could potentially make a very noisy network if a fast moving cloud bank comes in. I see it possibly happening like this-

Code: Select all
Sensor: Hey its darker
Indigo: I fixed it
Sensor: It's lighter
Indigo: I fixed it
Sensor: I'm darker again
Indigo: I fixed it
Sensor: I'm lighter again
Indigo: I fixed it.

And so on...unless you have some ideas for smoothing out the logic. I'm always open to new ideas and things folks have learned.

I know some of my rooms can vary brightness multiple times per minute based on cloud coverage alternating with sunlight, time of day and shadows from the trees outside the windows swaying in the wind, etc.

With polling you could say every 5 minutes to check and then you know there's only 12 events per hour or so...

Posted on
Fri Apr 29, 2016 7:55 am
Sharek326 offline
User avatar
Posts: 377
Joined: Jul 20, 2014
Location: Lansford, PA

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

I'm not completely convinced I am actually getting accurate Lux readings from the sensor. For example it's currently 9:53 AM and it is my Kitchen Sensor. The room has multiple windows as well as a French Door. So a lot of natural light comes in. The sensor currently shows 8 Lux ....seems a bit low right?

Posted on
Fri Apr 29, 2016 8:03 am
srkinard offline
Posts: 320
Joined: Apr 10, 2016
Location: Austin, Texas

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

Sharek326 wrote:
I'm not completely convinced I am actually getting accurate Lux readings from the sensor. For example it's currently 9:53 AM and it is my Kitchen Sensor. The room has multiple windows as well as a French Door. So a lot of natural light comes in. The sensor currently shows 8 Lux ....seems a bit low right?


If it were mine, I'd place it in full sunlight and see what it reads, then total darkness and see what it reads there...then consider that the sensor's full working range.

That being said...unless you get variable lux readings without the lighting changing at all you can simply set the lights to the level you desire, make a note of the lux reading and then use that as the target to maintain via dimmer control.

I know the Arduino-based light sensors I've played with in the past can fluctuate on reading very often under stable lighting conditions, which is why I personally would not use a "lux change" as the trigger...I know it changes a lot. But your much more expensive sensor may smooth out changes and provide a much more stable value.

Posted on
Fri Apr 29, 2016 11:14 am
Different Computers offline
User avatar
Posts: 2533
Joined: Jan 02, 2016
Location: East Coast

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

I created a variable called "Darkness" and set it so 100 is totally dark and 0 is totally bright. That way it can used as the dim value for lights. And I can adjust it based on cloud cover, time of day, and sensor luminance values.

SmartThings refugee, so happy to be on Indigo. Monterey on a base M1 Mini w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKitLink, Grafana, Plex, uniFAP, Fantastic Weather, Nanoleaf, LED Simple Effects, Bond Home, Camect.

Posted on
Tue May 03, 2016 1:51 am
mlew offline
Posts: 33
Joined: Jan 08, 2016
Location: Lincs UK

Re: Adjusting Dimmer Level Based On Lux From Motion Sensor

reference the Fibaro units you can adjust the range they report Lux level change. I found factory setting is useless as it doesn't change as it needs to change by 200 lux before reporting any change. Check Parameter 40 and also 42 as this is report time.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 4 guests

cron