HomeKit how to automatically switch on lights if room gets dark?

palbiswas

macrumors newbie
Sep 5, 2019
3
0
0
Issaquah, WA, USA
I want to automatically switch on lights if room gets dark on a cloudy gloomy day. don't want to trigger based on motion - instead want to use light level. I installed a Philips Hue Motion sensor - which added a light level sensor in Home app - but not able to use that to trigger an automation. any suggestion?

time based automation works for sunset - but not sure how to handle cloudy days. additionally during fall and spring (when sunset time changes drastically), time based automation did not work quite well.
 

Itinj24

macrumors 6502
Nov 8, 2017
277
117
0
40
New York
Try searching the App Store for other Home apps. Most of them have more advanced automations. I believe the Eve app and some others can do automations based on temperature. Not sure I’ve seen one for light level tho but you can try searching the App Store.
 
  • Like
Reactions: palbiswas

cynics

macrumors G4
Jan 8, 2012
11,276
1,680
0
Need an app and devices that support those functions to create a scene.

Eve Elgato app + iHome Sensor + any light, plug switch whatever can do that specific task.
 
  • Like
Reactions: palbiswas

dotme

macrumors 6502a
Oct 18, 2011
903
69
0
Iowa
I want to automatically switch on lights if room gets dark on a cloudy gloomy day. don't want to trigger based on motion - instead want to use light level. I installed a Philips Hue Motion sensor - which added a light level sensor in Home app - but not able to use that to trigger an automation. any suggestion?

time based automation works for sunset - but not sure how to handle cloudy days. additionally during fall and spring (when sunset time changes drastically), time based automation did not work quite well.
I've had my home set up this way for over a year and it works great. The key is different "on" and "off" levels, so you don't have flap happening during the time when the light level is right at the trigger point.

There's a free app in the app store called Hesperus that, with a long-press on the light level, lets you type in a value. Most other apps give you a slider, and are useless for light levels because you generally want triggers in the 20-30 lumen range and sliders don't give anywhere close to that level of fine control. Hesperus lets you set the whole automation up, and when done, it appears in the Home app. (Like all new automations, it takes time to propagate to the hub unless you log out/restart/log into the hub again).

Light thresholds depend on your windows/setup but for mine, I set the "on" at < 25 lux, and "off" at > 36 lux and I've been generally very happy with the results. I use a Hue sensor, coupled with hue lights and a lutron caseta dimmer, all via Homekit.

Hope this helps.
 
  • Like
Reactions: palbiswas

palbiswas

macrumors newbie
Sep 5, 2019
3
0
0
Issaquah, WA, USA
thank you all for the suggestion.

I made it work using Eve app and Philips Hue motion sensor. however two issues I am having with this automation -

0) looks like Philips motion sensor updates light level value only when it senses motion. so this automation doesn't switch on lights on even if room is dark - it waits for a motion to trigger. so it, kind of, works as long as I move around in room while room gradually gets darker - but does not work if no movement is there.

1) what I observed, it works only when light level crosses over the threshold lux value I set. I set it to 20 lux. it works whenever light level goes down from 21 lux (or higher) to 19 lux (or lower). but it does not trigger if light level is already below 20 lux to start with.

@dotme - you are using "on at < 25 lux, and off at > 36 lux" - can it potentially go in a on-off loop? assuming the light level goes up from lower than 25 lux to more than 36 lux when it switches on lights.
 

dotme

macrumors 6502a
Oct 18, 2011
903
69
0
Iowa
looks like Philips motion sensor updates light level value only when it senses motion. so this automation doesn't switch on lights on even if room is dark - it waits for a motion to trigger. so it, kind of, works as long as I move around in room while room gradually gets darker - but does not work if no movement is there.
That hasn't been my experience - What are you setting for triggers/conditions on the automation? The trigger when viewed in the "Home" app should be "when {roomname} sensor light level changes". I added some conditions to mine (After 7am, before sunset-30, and only if someone is home). To explain, I have a separate automation that kicks the lights on 30 mins before sunset whether someone is home or not, but during the day I only want to activate lighting due to clouds/storms if the home is actually occupied. Bottom line though is that I see lights turn on when skies get dark even if the rooms themselves are not occupied (no motion)
what I observed, it works only when light level crosses over the threshold lux value I set. I set it to 20 lux. it works whenever light level goes down from 21 lux (or higher) to 19 lux (or lower). but it does not trigger if light level is already below 20 lux to start with.
I'm not 100% confident this is accurate. I wouldn't be surprised if the sensor only sends on "change" though, so if it's at a consistent 18, the lights may not trigger. But when 18 becomes 17, for example, then they should still turn on.
@dotme - you are using "on at < 25 lux, and off at > 36 lux" - can it potentially go in a on-off loop? assuming the light level goes up from lower than 25 lux to more than 36 lux when it switches on lights.
I was worried about that when I set it up, but it hasn't happened to me. I use warmer tones than daylight with my lighting, though. I don't know whether the Hue sensor takes that into account.
 
  • Like
Reactions: palbiswas