Motion Lighting Lux re-check after certain time

I have quite a few Motion Lighting apps set up. Mostly they only switch on if a sensor is below a specified lux. Works great, 99% of the time but I have come across a scenario where it might be improved.

If the lux level is low enough to allow the trigger to turn on the lights, but motion continues in the room, the lights will stay on even if the lux level has gone above the trigger level.

This happened this morning in the Kitchen. SWMBO has been in there on and off all morning and the lights were still on even when the lux levels had gone above the trigger level and she was asking why the lights were still on.

Would it be possible to add an option for ML re-check the lux level every X minutes and if it was above the trigger level, switch the lights off even if motion was still active?

You could do this in Rule Machine fairly easily. Just create a Rule with both motion and illuminance as the conditions. If both aren't true, the lights turn off. If both are true, lights on.

I am not sure that the behavior you're describing is something my family would want. On a partially cloudy day, the lights would be turning on and off as each cloud passes by (as long as there is motion still.) Not sure how much they'd appreciate that behavior, especially with sharp knives in their hands prepping food...:thinking:

1 Like

Yes, I could move it to RM, but I just thought it might be a good addition to ML.

As to the case you mention, I think that would be covered by the correct choice of Lux level in the first place, so that the lights never went off if there was any need for them to be on.

What I was talking about was when it has gone from just after sunrise light levels (lux 30 to 40) when they first switched on to over 200 lux and bright sunshine outside.

In any case, I was only suggesting it as an option, not as a default, and it is not a regular occurance that I chain SHMBO to the kitchen sink like that :wink:

1 Like

Rechecking lux periodically might also be possible. Better would be to simply subscribe to illuminance events, and turn off when above a selected value. Could be an option for off, turn off if lux exceeds value.

Update: I've added this as an option for turning lights off, if lux exceeds some value.

4 Likes

Wow, thanks Bruce - 4 hours from suggestion to solution! You guys are awesome!!

You know, it's just way more efficient for something like this to just look at the code right then and add something simple like this, rather than to put it on a list and waste time deciding what to do later. Total time to implement is 15 or 20 minutes, 5 more to test. Not much to it.

5 Likes

Just a question for the original post. I don't use the lux very much but wondering. If the lux is below a set level, (let's just say 10) and that is low enough to trigger the light. Do the lights in the room not then bring the lux over the original 10 mark?

I often use an exterior light sensor to sense outside light and that gives me a good idea of how much ambient light is in different parts of the house. FYI I also use this to turn on a virtual switch. I can then use this switch in routines easily. I also have a few minute delay from turning on/off...which stops the partly cloudy days from mucking it up.

Yes, it can be an issue depending on the natural light in the room and the power of the lights. You do need to be careful when you select the lux level, and sometimes, like you, I have used my outside sensor to avoid the problem.

1 Like

Motion Lighting now supports turning off when illuminance exceeds some value.

3 Likes

@bravenel Just a quick note on this. It seems motion lighting continues to turn off an already off light everytime it get's a lux update.

app:632019-05-31 12:40:27.814 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 229

app:632019-05-31 12:39:53.639 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:39:48.015 pm infoTurning off

app:632019-05-31 12:39:48.010 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 239

app:632019-05-31 12:38:53.528 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:38:47.925 pm infoTurning off

app:632019-05-31 12:38:47.921 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 255

app:632019-05-31 12:37:53.383 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:37:47.736 pm infoTurning off

app:632019-05-31 12:37:47.733 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 271

app:632019-05-31 12:36:53.375 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:36:47.714 pm infoTurning off

app:632019-05-31 12:36:47.711 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 276

app:632019-05-31 12:35:53.143 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:35:47.486 pm infoTurning off

app:632019-05-31 12:35:47.473 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 282

app:632019-05-31 12:35:02.704 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:34:57.095 pm infoTurning off

app:632019-05-31 12:34:57.091 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 281

app:632019-05-31 12:34:53.070 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:34:47.408 pm infoTurning off

app:632019-05-31 12:34:47.403 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 282

app:632019-05-31 12:33:52.905 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:33:47.282 pm infoTurning off

app:632019-05-31 12:33:47.279 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 284

app:632019-05-31 12:32:52.779 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:32:47.137 pm infoTurning off

app:632019-05-31 12:32:47.134 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 283

app:632019-05-31 12:31:52.932 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:31:47.333 pm infoTurning off

app:632019-05-31 12:31:47.330 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 284

app:632019-05-31 12:30:52.512 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:30:46.907 pm infoTurning off

app:632019-05-31 12:30:46.903 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 288

app:632019-05-31 12:29:52.302 pm infoOverride ended by Bathroom Lights MBTH turned off

app:632019-05-31 12:29:46.748 pm infoTurning off

app:632019-05-31 12:29:46.745 pm infoLux level for Bathroom multisensor (Aeotec 6) MBTH is 286

Here are logs from switch

dev:5152019-05-31 12:41:53.751 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:40:53.491 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:40:34.020 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:40:33.447 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:39:53.461 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:38:53.351 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:37:53.201 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:36:53.221 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:35:52.962 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:35:02.511 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:34:52.905 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:33:52.742 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:32:52.610 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:31:52.772 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:30:52.365 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:29:52.154 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:28:54.987 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:28:52.284 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:28:52.101 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:27:51.971 pm infoBathroom Lights MBTH [[name:switch, value:off]]

dev:5152019-05-31 12:26:51.841 pm infoBathroom Lights MBTH [[name:switch, value:off]]

Harmless, but an easy fix...

Hello,
I've set something like this:


this is a led strip that is not a main light in this room. My intention is to turn on when is dark (below 20lux) and turn off when I turn on main light (more then 40lux) but app don't allow it because motion is still active.
obraz
I understand that this protect from toggling the light? Can I do it (turn off) led from this app or need to add RM/simple automation?

It's not clear what is right here. With your setting for turning on only with Lux over 20, and off with over 40, motion is going to turn it back on if it turns off from the lux alone. It's a rather narrow set of circumstances. You could certainly turn it off with a Simple Automation Rule based on the lux, but you'd still have the issue of motion turning it back on.

I do agree that it should turn the light off, and will make that fix for the next release.

thank you for feedback