Automation puzzle - Keep light level above a certain level

Looking for ideas on how to keep the lighting level “dynamilcaly” over a certain threshold.
I have a Aeotec sensor with light level sensing
I have a fibaro dimmer

I want the light to be dimmed slowly up as the sun/daylight disappears, but not higher than a certain level.

Mabye a reactor sensor can monitur the lux value, but can it “add 10%” in some clever way in a loop until the lux level is above minimum? It would bees to be some delay in the system too because of the refresh of the sensor…

Should be fairly easy to set up. First, you define a variable whose value is determined by the current reading of the Aeotec sensor (here assumed to be Device #9 in your Z-Wave setup), inverted (subtracted from 100), boosted (multiplied) by 10%, rounded up, and limited to a maximum value of 100:

FibPlus := min(ceil ((100 - getstate( 9, "urn:upnp-org:serviceId:Dimming1", "LoadLevelStatus" )) * 1.1), 100)

NOTE: Use Reactor’s built-in “Expression Builder” to pinpoint the correct service URN: needed to extract the light sensor’s level! For the sake of illustration, the expression shown above was constructed to pull the current LoadLevelStatus from another dimmer.

Then later use that variable {FibPlus} in an Activity to set the brightness of the Fibaro dimmer. In theory, you could use Conditions and Restrictions to pulse your TRUE activity group every xx minutes during sunset, which as outdoor light levels diminish, should cause your dimmer to eventually reach 100%.

IMPORTANT: You may have to tweak the first ‘100’ and/or ‘1.1’ multiplier values to suit the actual numeric scale output by your light sensor, based on your own testing/results. Adjust the second ‘100’ –
it serves as the ‘maximum brightness’ allowed – in the expression as needed.

I have done something similar. It’s a Reactor Sensor that has two sections…

  1. Watches the time of day and cloud cover, to determine what “light level” we’re experiencing… I think there are 6 levels, ranging from HIGH to NIGHT. Whenever any of those go true, it makes an expression value change, anywhere from 0-100. So for example, midnight-4pm is NIGHT, and the value is 1%.
  2. All my dimmers are in the other section, and the logic basically says “If the expression value changes AND the light is on THEN change the light dimming to the expression value”.

It’s worked really nicely. You don’t realize how amazing it is until you stay somewhere else for a night, and the bathroom lights BLIND YOU when you go at night…

My Reactor Sensor is completely based on time, and occasionally cloud cover. I have wanted to venture into utilizing lux levels, but just haven’t gotten there.

2 Likes

I assumed i have to go into the expression builder for this, haven’t tried it yet.

Thanks guys, i’ll update on my solution later. :slight_smile:

1 Like