detecting light for indoor lighting triggers - a conundrum

Posted on
Thu May 24, 2018 8:20 am
WagnerOne offline
Posts: 108
Joined: Jun 12, 2009
Location: Chicago, IL

detecting light for indoor lighting triggers - a conundrum

I want to switch from a lat/long is daylight model to using a lux sensor to get realtime actuals on the light level to trigger lighting events in my home.

My conundrum is how to best do this in terms of functionality and economy.

I purchased an Aeotech Multi-sensor 6 intending to use it as such in addition to the other functionality offered by it. Thinking about it further, it seems like a waste depending it's implemented. Maybe I'm being cheap, but I'd like to get the max use of all the sensors in this thing I can.

First of all, of those of you that do lighting triggers based on a local, real-time light readings, how do you do it?

Do you have the sensor outdoors sensing outside, indoors sensing inside, indoors sensing outside or something else?

If it's indoors, it would have to be somewhere that wouldn't be influenced by indoor lighting, obviously. I'm not sure how to best implement this.

If it's outdoors, I would get the benefit of running both the lux and the temp sensor and possibly the motion sensor.

If it's indoors, pointing at a window, I'd basically be getting just the lux sensor value. But, if it's indoors, I can run it off mains instead of batteries. If it's outdoors, Aeotech states the batteries aren't in operating specs beneath 32F (which is the case here way to much of the year). I know that's a CYA of sorts, but still.

Thanks for any discussion or feedback.

Posted on
Thu May 24, 2018 8:49 am
noel1983 offline
Posts: 387
Joined: Oct 17, 2014

Re: detecting light for indoor lighting triggers - a conundr

Very interested in this, main comment would be won’t the light levels vary significantly in different rooms? Depending what triggers you’re looking to have as a result

I’d love to use lux to determine when motion activated lights should come on in various rooms.
Hallway is a lot darker than kitchen so a single outside lux value wouldn’t hit the spot.

I have neo coolcam motion sensors in each room but I haven’t been able to get the lux values to work properly on any of them so would definitely be interested in any cheap light sensors that work!

Sent from my iPad using Tapatalk

Posted on
Thu May 24, 2018 9:36 am
jalves offline
Posts: 510
Joined: Jun 16, 2013

Re: detecting light for indoor lighting triggers - a conundr

I've got several of these sensors and the answer to the question is "all of the above" :wink:

First: The sensors do provide Lux info on a regular basis. The interval depends on how you set up the sensor in Indigo. So all you need to do to use the info is to set a trigger when the lux goes below or above a certain value depending on what you wan to do.
Second: Locating a sensor outside will certainly tell you if its light or dark outside. Be sure you don't have it located where a light is going to give a false reading through.
Third: Having a sensor inside is useful if you just want to trigger inside lights according to some level of brightness in a particular room.
Fourth: When setting triggers, be sure to set some amount of hysteresis in them. In other words, if you have a turn-on threshold of lux going below 20, set your turn-on threshold for lux going above 25 (or whatever) so that you don't get into an on/off/on/off...etc cycle when lux is right at the threshold.

Hope this helps

Running Indigo 7.3.1 on a 27" iMac (mid-2017), 40G memory, 1T Fusion Drive, OS X 10.14.4

Posted on
Thu May 24, 2018 10:19 am
Different Computers offline
User avatar
Posts: 1859
Joined: Jan 02, 2016
Location: East Coast

Re: detecting light for indoor lighting triggers - a conundr

Faced this same issue and I manage it by having my lux sensors outdoors. It's not ideal, but it works OK. My larger issue is that my Monoprice lux sensors are oversensitive--They hit 100% lux when it is far less than fully bright out, and don't show any drop when it gets really cloudy, or even heavy rain.

Here's a hilarious MatPlotLib plugin chart that illustrates my problem. Not sure at all what that one dip in the middle of a day was--maybe a bird landed in front of the sensor.
Screen Shot 2018-05-24 at 12.17.50 PM.png
Screen Shot 2018-05-24 at 12.17.50 PM.png (132.74 KiB) Viewed 887 times

SmartThings refugee, so happy to be on Indigo. 10.13.6 on an i5 MBP w/Harmony Hub, Hue, DomoPad, Dynamic URL, Device Extensions, HomeKit Bridge, MatplotLib, Plex, uniFAP, Wunderground, Nanoleaf, LED Simple Effects, Airfoil Pro, Grafana.

Posted on
Thu May 24, 2018 4:07 pm
DaveL17 offline
User avatar
Posts: 4764
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: detecting light for indoor lighting triggers - a conundr

I have an Everspring light sensor located outside, under a balcony. Direct sun can't hit the sensor where it's located. I trigger on an illumination threshold as suggested above but I also added some timers. If the illumination drops below the threshold (turn lights on), I start a timer. If the timer is reached, the lights are turned on. If the light passes the threshold the other direction, I start a timer. If it stays that way, the lights are turned off. I *also* use sunrise/sunset so all this doesn't happen between sunset and sunrise. These timers virtually eliminate the "passing cloud" problem.

This is my illumination chart.

chart_illumination.png (18.48 KiB) Viewed 848 times

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu May 24, 2018 5:30 pm
lalisingh offline
Posts: 140
Joined: Mar 27, 2007

Re: detecting light for indoor lighting triggers - a conundr

WagnerOne wrote:
I want to switch from a lat/long is daylight model to using a lux sensor to get realtime actuals on the light level to trigger lighting events in my home.

From a Mobotix security cam. Very accurate lux values. Camera updates Indigo variable via REST every 5 minutes.
Cam.png (16.12 KiB) Viewed 830 times


Posted on
Fri May 25, 2018 1:36 am
GlennNZ offline
Posts: 539
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: detecting light for indoor lighting triggers - a conundr


I set outside lights based on sunset and lux trigger.

Used to use outdoor multi sensor but after months-years died and was mis-reporting lux; moved to close-by indoor sensor and adjusted targets and all good.

Basically an hour or two before sunset a trigger is run to check lux levels. If lower than set point will activate ‘night mode’ and outside tree lights.

So if bright summer’s day will delay this mode for a while until lux low enough, if miserable wet/winters day will activate before sunset based on lux.

Seems the best compared with a timer based solution and better than sunset/sunrise alone.


Posted on
Fri May 25, 2018 8:24 am
mikeL offline
Posts: 45
Joined: Apr 30, 2010
Location: Gatineau, QC

Re: detecting light for indoor lighting triggers - a conundr

I use two sensors. Both are Adafruit TSL2561 digital lux sensors connected to an Adafruit Huzzah ESP8266 WiFi-enabled microcontroller. The Huzzah communicates with Indigo using Karl Wachs’ Arduino plugin. This provides lux readings to Indigo every 60 seconds (the average of 5 readings every 12 seconds). Both sensors are indoors, mounted in the corners of a large window; one faces outside looking east, while the other faces inside looking west.

The outside facing sensor controls my exterior lighting. These lights turn on when the lux level falls below a threshold value and dayMode is ‘afternoon’, i.e., before sunset. After sunset (dayMode is ‘evening’), even if it’s still brighter than the threshold, the lights turn on at sunset + 10 minutes.

The inside facing sensor controls the brightness of interior lighting in my family room when dayMode is in (‘morning’, ‘afternoon’). Brightness is set as a percentage based on the difference between a max value and the lux value, so the brightness ramps up as the room gets darker. I set the max value so that the lights come on only on cloudy days.

In case you’re wondering, the sensors don’t seem to be affected by the lights they control. For example, the inside facing sensor still reads 0.0 lx when the family room lights are on full blast, at night (inverse-square law).

While it’s not perfect, the addition of lux sensors to Indigo has resulted in fewer situations where I’ve had to ‘manually’ turn on the lights.

Sent from my iPad using Tapatalk

Posted on
Mon May 28, 2018 10:13 am
WagnerOne offline
Posts: 108
Joined: Jun 12, 2009
Location: Chicago, IL

Re: detecting light for indoor lighting triggers - a conundr

Lots of food for thought in all these replies. Thank you!

Posted on
Sat Jun 02, 2018 1:59 am
jmdraper offline
Posts: 98
Joined: Sep 11, 2014
Location: Surrey, UK

Re: detecting light for indoor lighting triggers - a conundr

I also use a light level sensor in the Aeotec multi sensor to control whether the light in the hallway at the top of the stairs comes on during the day or not, as that part of the house can get dark during the day depending on weather and how many internal doors are closed. It works very well but did take quite a bit of fiddling to get it there. The conundrum I faced was that I am controlling a light in the hallway using movement and light levels measured in that hallway, so if the sensor takes a light reading when the light is on, you've got problems.

I set the reporting interval on the multi sensor to its lowest level (240 seconds = 4 minutes) and I set the motion time-out on the sensor to only 5 seconds, then I use a timer device in Indigo to control the light. Movement when that timer is inactive starts the timer, movement while it's active restarts the timer (i.e. extends the time the light is on) and a trigger detects that timer expiring and turns the light off. Then to add light level suppression (i.e. don't turn light on with movement if light level us above a threshold), I check the luminance value (with trial and error, I found a threshold of 15 worked for me). The final piece of the puzzle is to deal with light level readings taken while the light is on. I have another Indigo timer set to 4 minutes (same as the time between light level readings from the sensor), which is started by the same trigger that turns the light off when the movement timer expires. Then extra logic is added to the movement detected trigger and another trigger fired when the light device state becomes on, to check the light level and the light level timer and set light brightness accordingly. (I also have the light come on dim when the household is asleep so that you don't get blinded when you get up in the middle of the night to go to the toilet!).

The upshot is that if it's dark during the day in that part of the house, the light comes on with movement and this works even if the most recent light level shows it's bright but only because the light was on at the time.

If the details would be useful to anyone, I'd be happy to share.

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests