Hey,
System:
Raspberry Pi 4B with Openhab 2.5.5
I want to use Openhab for what the Hue App is doing.
Example: Turn Light on from 0-8am, when lux under 1 with 1%, after 5 secs turn the light off.
I am here for now:
var Timer StevensFlur = null // Timervariable definieren
rule "Bewegungsmelder mit timeout"
when
Item StevenFlursensorPresence received update ON //changed // Bewegung wurde erkannt
then
if(now.getMinuteOfDay >= 00*60 && now.getMinuteOfDay < 08*60)
{
StevensFlur?.cancel
if
(StevensFlurlichtToggle.state != ON)
{
StevensFlurlichtToggle.sendCommand(ON)
StevensFlurlichtBrightness.sendCommand(1)
}
StevensFlur = createTimer(now.plusSeconds(5),
[|
if
(StevensFlurlichtToggle.state != OFF)
StevensFlurlichtToggle.sendCommand(OFF)
StevensFlur = null
] )
}
end
This works nice! But thats only a part of what i want to realize.
i just thought it would be as easy as change:
if(now.getMinuteOfDay >= 00*60 && now.getMinuteOfDay < 08*60)
to
if(now.getMinuteOfDay >= 08*60 && now.getMinuteOfDay < 21*60 && StevenFlursensorIlluminance.state < 1)
“StevenFlursensorIlluminance.state” was 0.9 by testing it and oh wonder it doesnt work like i thought, but it also did not produce an error.
hell, what do i miss here?
Special question:
is there a easy why for me, to fade the light out? from 8-21 i will leave the light on for 30 secs, would be nice if this would fade out. i tried the “universaldimmer rule” but i failed hard
@Udo_Hartmann maybe you can help me, i figured you out as the nerd of doom
Thanks guys!