rule "Licht aan bij schemer"
when
Channel 'astro:sun:minus90:set#event' triggered START
then
gLights3.sendCommand(ON)
sendTelegram("jeroen","ik heb het licht in de kamer aan gedaan")
end
I can’t figure out what’s wrong. Could someone please help me?
Cannot see anything obviously wrong. What happens or doesn’t happen that you expected? Have you installed Astro binding? What messages does it leave for you in openhab.log?
The rule should turn on the gLights3 but it doesn’t. It also should send me a message with telegram. The rule was not triggered last night. I didn’t see anything in the log.
The item file wasn’t updated.
Okay, if there is no astro event in events.log there is nothing to trigger your rule.
Have you installed Astro binding? What messages does it leave for you in openhab.log at system startup? What is the current datetime you see in your Item Evening_Time?
astro:sun:minus90 [ geolocation="52.406995,6.624562", interval=60] {
Channels:
Type start : rise#start [
offset=-30
]
Type end : set#start [
offset=-60
]
}
I also changed the rule:
rule "Licht aan bij binnenkomst"
when
Channel 'astro:sun:minus90:set#start' triggered START
then
gLights3.sendCommand(ON)
sendTelegram("jeroen","ik heb het licht in de kamer aan gedaan")
end
Now the item has a value in the sitemap. But the rule isn’t triggered. It should trigger at 20:37 but nothing happend
I checked PaperUI if the thing was linked to the item:
Take care not to muddle events channels with state channels.
In your first post, the rangeEvent offset was about an event. The Item was linked to a state channel (of datetime type) which had no offsets. The rule was waiting for an event which should have had the offset (and so would not be at the time the Item said).
Okay, so guessing that you haven’t changed your Item, it is linked to a state channel that now has a -60 offset.
There is no longer any event offset on the event so it will not happen at the time the Item says.
But that doesn’t matter, because you have broken the rule trigger.
You cannot trigger rules from state channels, you must use an event channel like you did to begin with.
Event channels are different things to state channels and have their offsets (if any) specified separately.
rule "Licht aan bij presence"
when
Channel 'astro:sun:minus90:set#event' triggered START
then
if (gPresence.state==ON) {
gLights3.sendCommand(ON)
sendTelegram("jeroen","ik heb het licht in de kamer aan gedaan")
}
end