- Platform information:
- Hardware: VM
- OS: Ubuntu Server 20.04 LTS
- openHAB version: 3
I noticed that my rullershooter closes to earlier.
I use a rule to close the rollershutter, triggered by astro:sun:home:set#event.
Astro binding is configured by a .thing file. The channel rise has an earliest attribute set to 18:00.
I see 18:00 as schedule time in UI item’s view - so configuration seems to be good.
What I can think of is that maybe the offset=0 causes troubles? But the UI configuration also show this value, at least inside the UI.
I also checked the server’s time and timezone and I had set the correct timezone. But as the shutter closes at 15:23 (see logfile below), the timezone seems to be not the issue. The time itself is correct - does openHAB run some other time internally?
My understand about the astro binding and its channels is as follows:
The set#event has a START and a END trigger. The offset shifts these events either into future (negative) or to past where as Earliest and Latest set a hard-defined time.
astro.things:
astro:sun:home [ geolocation="<removed>,<removed>,<removed>", interval=60 ] {
Channels:
Type rangeEvent : rise#event [
offset=0
]
// this is not a trigger channel configuration!
Type start : set#start [
offset=0,
earliest="18:00",
latest="20:00"
]
astro.items
DateTime Sunset_Time "Sunset [%1$tH:%1$tM]" { channel="astro:sun:home:set#start" }
astro.rules:
rule "Sonnenuntergangs_Routinen"
when
Channel "astro:sun:home:set#event" triggered START
then
val telegramAction = getActions("telegram","telegram:telegramBot:071d582f96")
telegramAction.sendTelegram("(I) Routine: Sonnenuntergang")
logInfo("astro","Sonnenuntergangs-Routine gestartet")
// Rollladen schließen
RademacherBridge_RolleFenster.sendCommand(50)
end
openhab.log:
2022-02-18 15:23:59.710 [INFO ] [org.openhab.core.model.script.astro ] - Sonnenuntergangs-Routine gestartet
Solution
Thanks to the posts of Wolfgang_S and rossko57 I was able to correct my code and understand the astro binding better. But first things first…
The trigger channels are defined with:
Type rangeEvent : <trg_ch>#event []
My described understanding was not completely wrong, the basics are correct but what I didn’t know is that the binding comes with:
- common channels, that can be linked to items, and
- trigger channels that behave as described in the posted article of rossko57
Beside their naming, they have nothing in common.
Thanks for any idea, help or solution