Funny situation... How do I fix this? (lux sensors)

You can use rule machine and just add a delay with a cancel for the on/off, so if the lux varies above/below the threshold it will cancel the action.

Personally though since I use motion lighting for most of my lighting I don't have this issue. I do have the lux set in my motion lighting apps to control if the light comes on or not also.

3 Likes

I have a lux sensor and I copy the lux value into a virtual lux sensor every 5 minutes.
I then use the virtual lux sensor in my lighting rules.
Works well for me.
May work ok for you.

1 Like

That's an interesting use of that one! I'll give it a try. How would I go about copying the value?

I toyed with it until I got it right. I don't have lights automatically turn off using lux, but if there's motion in the room, it turns on if it's dark enough if lux<x. All of my lighting is based on motion and lux, so there is a combination of things that have to happen for the lights to turn back off. No one has to be in the room, for one thing. So If I felt it was too dark and the light didn't turn on, I check the setting and see where it's at and adjust accordingly. If a light turns on and it's bright enough, it's not an inconvenience. If it doesn't turn on and it's not bright enough, the HAF drops significantly.
:grin:

1 Like

That's great advice, thank you. Why didn't I think of multiple triggers for off... But, well, learning as we speak... :smiley:

1 Like

That's what Room Director is for. :wink:

1 Like

LoL! I knew you had something lurking... I'll check it out as well, thanks!

This is how I solved that problem, too! Nothing turns on without motion for me, and nothing turns off based on lux alone. You didn't really say how you have your automations set up (just lux?) or why this is a problem, so you might get more specific ideas if you share more about that. In my case, I actually added mode on top of this with mode partially controlled by lux (the rest by sunrise/sunset and time). Lights only turn on based on motion in specific modes, except in dark interior rooms where they turn on all the time (except sometimes during "night mode," which for me is sleep).

Otherwise, if you're already using a rule and have a specific threshold set up, adding a "deadband" would be one way to avoid this problem. For example,

IF (Lux < 500) THEN
  On: Lights
ELSE-IF (Lux > 700) THEN
  Off: Lights
END-IF

So, nothing happens if it quickly changes from one value to another near your threshold (or now two thresholds).

3 Likes

Well, that is clever... May have to copy that one... :wink: Thanks!

I actually have 2 lux sensors.
One in a room at the front of the house. One in a room at the back. Mainly because of where the sun rises and sets.
Both rooms are hardly ever used.
I then take the average of the lux of the 2 devices and copy into a virtual lux sensor.
This gives me a more stable value.
I also have a virtual switch that disables the piston between sunset and sunrise so that if a light is turned on in either room it does not affect the virtual lux sensor.

1 Like

I actually set up two sensors also on the east/west sides of the house. I had Hue sensors laying around so I just pointed them each one out a window on the east/west sides of the house. Took some tweaking to figure out the best placement, but one I did it works very well. This way also if a light is on in that room it has not effect on the lux sensor. Of course if I were to buy sensors I would just get the Hue outdoor ones.

1 Like

Take a look at Room Director, allows you to set multiple conditions to manage your room's actions. Click to set, easy to manage. And I think you know the author... :wink:

1 Like

My house faces true south. All of my windows are north and south facing. Typically the rooms average around 35-70 lux on a sunny day. This has been difficult to get set up right for that reason. Each room is very different depending on sunlight. Under 20 the lights turn on. Because of my unique situation, I have a rule that governs the kitchen to turn the big lights on if activity goes past 5 minutes. Then, it's obvious that something other than a drink of water is happening in there. Then the lights will turn back off once motion is quiet again. The rules are abstract enough that when motion is quiet, all the lights will turn off or dim according to time of day. It's worked very well for us. Although, I still need to do some tweaking as last night the big lights did not turn on as expected.

1 Like

Yeah the way your house is situated defiantly makes it more difficult to pinpoint the best settings. Most of the rooms in my house have windows on multiple walls, there are a lot of windows, but my house actually does face west so this helps. You might benefit from using one of the Hue outdoor sensors, although it seems you have already tweaked things enough were it works well.

2 Likes

Yeah, for the kitchen I have something similar, based on modes it lights up at certain levels when motion is detected, and stays on at periods on the afternoon, else goes back of. Works really nice actually. And now with the added "base" lighting on light sensor, this is getting smooth... Though I expect to have to tweak a bit, or i would be really surprised... :slight_smile:

1 Like

The lux sensors really helped me on days where its cloudy/raining, it defiantly takes a lot of tweaking though to figure out the best lux reading to turn lights on. Even then I don't always average the two sensors, because sometimes certain rooms depending on time of day and weather conditions may need lights to come on and others don't.

1 Like

Yeah, your hubby was in the lounge here complaining about the lights again, @april.brandt. Can you get that fixed so we don't have to listen to him ranting?

:wink:

1 Like

Yah ... I heard about it. You can't imagine how many pm's I received. I had to ask Bobby to give him a 30 day break.
:rofl:

1 Like

In webCoRE, I have a piston that sets two global boolean variables (@dark_outside and @dark_inside) based on the lux from a weather source. Then each piston that controls lights uses those as a condition. If there's motion in the kitchen and it's dark inside, turn on the light. If someone arrives and it's dark outside, turn on the porch light. If I find that things are turning on when it's too light or dark, I can adjust my settings in the one that sets the global variables instead of tracking down the setting in every piston that controls a light.

1 Like

I have 2 sensors. I put an average of those into a virtual illuminance device using a small RM rule. Then I trigger mode with an overlap to debounce (eg. day arrives at >150 and dusk arrives at <100). It works perfectly to put lights on by motion when dusk comes or it falls dark during the day.

1 Like

Download the Hubitat app