Good day,
i created a Home.rules file in /etc/openhab2/rules/
Now i wanted to create my first rule ever but it is not working, any help would be appreciated.
The idea is when the sun sets turn on a light.
The time of sunrise and sunset time is visible and and working in my BasicUI btw.
But if i am correct i need to use the “Range Event” for this.
Here is my code.
Items file:
String Sunset "Sunset" {channel="astro:sun:home:set#event"}
Group Office "Bureau Bjorn" <office> (Home, Eersteverdieping)
Switch Officebjornlicht "Lichtpunt Bureau Bjorn" <light> (Office, Lichten) {channel="nikohomecontrol:onOff:440e003a1939:15:switch"}
Things:
astro:sun:home [ geolocation="50.816807,4.893583,67.3", interval=60 ]
astro:moon:home [ geolocation="50.816807,4.893583", interval=60 ]
Rules:
rule "Test Astro"
when
Channel "astro:sun:home:set#event" triggered START
then
Officebjornlicht.sendCommand(ON)
end
Log:
2018-10-31 17:16:00.014 [vent.ChannelTriggeredEvent] - astro:sun:home:set#event triggered START
2018-10-31 17:16:00.022 [vent.ChannelTriggeredEvent] - astro:sun:home:daylight#event triggered END
2018-10-31 17:19:00.005 [vent.ChannelTriggeredEvent] - astro:sun:home:civilDusk#event triggered START
2018-10-31 17:19:00.010 [vent.ChannelTriggeredEvent] - astro:sun:home:set#event triggered END
My rule does not seem to trigger