We have moved at community.getvera.com

Author Topic: Switching on room lights with indoor light sensor  (Read 793 times)

Offline Automaton13

  • Sr. Newbie
  • *
  • Posts: 42
  • Karma: +1/-0
Switching on room lights with indoor light sensor
« on: March 16, 2018, 06:54:32 am »
There are a number of useful-looking indoor multisensors on the market, that can measure all sorts of things, as well as light levels. I'd like to be able to turn my room lights on when the light level drops below a set threshold, using a sensor in the same room. Sounds straightforward, but I can see a problem.

1) light level falls
2) room light switches on
3) light level goes up
4) room light switches off
5) go to (1)

The light would be continually switching on and off.

Unless someone knows better, or has done it successfully.




Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1464
  • Karma: +41/-36
Re: Switching on room lights with indoor light sensor
« Reply #1 on: March 16, 2018, 07:56:35 pm »
I have not started to work on a similar project but my thought for my living room is:
1) Light sensor to measure ambient light level.
2) Dimmer on my 4 can lights.
3) PLEG logic that looks at ambient light and when it falls below some level, turn on the lights at some level, maybe 25%.
4) The PLEG logic will then raise the light level more if the ambient falls again.
5) The PLEG logic would lower the light level if the ambient rises.
6) PLEG would turn off the lights when the ambient light goes back to some level.
7) PLEG would be inactive in Away, Night, and Vacation modes.
Vera 3, 1.7.1040, CT101, Everspring Motion, GE/Jasco Switch/Dimmer, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, LB60Z-1 bulb, Hue, Alexa, Zooz 4-1

Offline HSD99

  • Sr. Member
  • ****
  • Posts: 384
  • Karma: +21/-0
Re: Switching on room lights with indoor light sensor
« Reply #2 on: March 23, 2018, 11:02:59 am »
This function is called "daylighting" in commercial architectural lighting control systems. The idea is to maintain a constant light level in a space by measuring ambient light and adjusting artificial light sources to maintain the desired light level. As @Automaton13 points out, it is possible to create a positive feedback loop where the system will oscillate between the artificial lights on and lights-off.

There are a number of approaches to the problem. Make sure the light sensor sees the overall ambient light, i.e. don't point it directly at an artificial source. Second, you will need to build in time constants and filtering. The system should make gradual changes, not abrupt ones. The reporting frequency of the light sensor is obviously an issue.  You may need more than one light sensor to smooth out the system's behavior.  Time-of-day is also a factor. This is a non-trivial problem---you'll probably have to play around to find the balance that works for you.