Become a MacRumors Supporter for $25/year with no ads, private forums, and more!

palbiswas

macrumors newbie
Original poster
Sep 5, 2019
3
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

Contributor
Nov 8, 2017
3,110
1,543
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,895
2,093
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 65816
Oct 18, 2011
1,067
167
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
Original poster
Sep 5, 2019
3
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 65816
Oct 18, 2011
1,067
167
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

kcdk99

macrumors newbie
Jul 30, 2010
4
0
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.
You can’t trigger based on Lux status, so here’s what I did. I created an automation to start 30 minutes before sunset, and repeat every 2 minutes for 90 minutes. It’s assessing the lux every 2 minutes and then turning on the lights when the lux is at or below my set point (and then exiting the shortcut). Please note that I use the lux measurement on a Logi Circle 2 camera that reports at regular intervals as lux changes. Philips Hue motion sensors only appear to report lux when motion is detected, so if you’re using one of them, you’ll want to make sure it’s in a high-traffic area so the lux is reported frequently enough to be used in this automation.

Hope this helps!
  1. Create new automation
  2. Select “A Time of Day Occurs”
  3. Set it to 30 minutes to sunset, or whatever might work for you.
    1. You don’t want to set it too early that the automation runs for too long, but you need to set it early enough to catch the point when the lux drops below your set point in all situations (e.g. both sunny and cloudy days)
    2. Set any other parameters for your situation. Note that I use this for my entire house, so I don’t account for motion or device occupancy - Only the HomeKit delivered “someone is home” functionality. You could nest some additional “if” statements here to account for other conditions.
    3. Select Next
  4. Select the lights or scene you want to trigger. In my case, I also use arrive home for the evenings. Don’t click next yet.
  5. Scroll to the bottom and select “Convert to Shortcut”
  6. Set it up as shown in the screen capture below.
    1. Note that no value is needed in the “exit shortcut with” value
    2. 45 is probably more repeats than I need, but this just ensures that the shortcut doesn’t run out before the lux drops below 8.
    3. Also, I used loops with 120-second cycle time, but this could be shorter or longer depending on your device refresh and how quickly your room gets dark.
632EF139-8307-45AF-9BA7-8610BD29323B.jpeg
 
Last edited:

waw74

macrumors 601
May 27, 2008
4,277
691
You can’t trigger based on Lux status

You absolutely can,
and how to do it was given when the thread was new a year and a half ago

having things repeat like that in shortcuts isn't the most reliable.

get the eve app,
it lets you do a lot more with automations in home kit,
you don't need any eve devices, it works with all homekit devices.
It accesses the same backend as the home app, so it's all in sync. And the advanced automations will still run on your homehub.

you can set automations to trigger on ANY device status, if "lightbulb is at 47%", "color temperature of certain light is set at 5000k","temperature under x degrees"
you can also set conditions on your automatons, say you had a heater and a couple sensors in a dog house. "if motion sensor trips, and temperature sensor is under 50 degrees, then turn on heater"
 
  • Like
Reactions: dotme and Itinj24

Itinj24

Contributor
Nov 8, 2017
3,110
1,543
New York
+1 for the Eve app. All the automations created in the Eve app also show up in HomeKit and they can be edited in there. For example, I have an automation to turn on a ceiling mounted heater (connected to a Lutron Caseta switch) in my bathroom if the temperature is below 65 deg and motion is detected. So you can do “if” conditions and add multiple triggers. Same to turn on a light if Lux is below 5 and motion is detected and an exhaust fan with a humidity above 60%. The only thing I’m not a fan of is the end result has to be a scene, not a particular accessory. So you’d have to create a scene for the end result, even if it’s just one light bulb. You can go back into the Home app and edit this though.
 
  • Like
Reactions: dotme
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.