Problem with astro-binding and offset in rules


I have configured the astrobinding with an offset, but the offset will be ignored in the rules.

This is my thing:

astro:sun:home_xmas [geolocation=",,100", interval=60 ] {
		Type rangeEvent : rise#event [
		Type rangeEvent : set#event [

My rule:

rule "Switch ON xmaslight at eventing"
    Channel 'astro:sun:home_xmas:set#event' triggered START
    logInfo("xmas.rules", "Switch on event 1")

And for testing I have configured this items

DateTime         Sunrise_Time       "Sonnenaufgang [%1$tH:%1$tM]"                   { channel="astro:sun:home_xmas:rise#start" }
DateTime         Sunset_Time        "Sonnenuntergang [%1$tH:%1$tM]"                 { channel="astro:sun:home_xmas:set#start" }

My problem is, that the items shows the sunset and sunrise time with the given offsets, but the rule triggers at the real sunset (and not 30 minuts before).

I hope anybody can help me to find the failure in my configuration.

Have you tried to change the offset in PaperUI Astro binding event channel?

I think I wrote something to early.

Before I wrote this topic, I made an update from openhab and it seems nothing changed. After your suggestion I looked in the paperui and saw the correct values in the event. I open the logfiles again and saw, that the time is correct. It seems that I have looked on the wrong dates.

It was probably a bug that has now been fixed.

Don’t forget Astro generally calculates stuff for the day ahead just after midnight. Changes you make may not be effective until next day.

Hi all,
I have OH2.5.1-2 running on a RPi4B and have the same software setup as shown in the first topic entry. If I remove the offsets in my thing file everything runs fine. If I add the offsets 3 things happen: 1) The offsets are not registered by the Astro binding (PaperUI). 2) Triggers are still shown in the log file but without offset (of course). 3) No command is being sent to turn On the light. So, adding offsets seems to block the On command.
The trigger seen is:
2020-01-22 15:57:00.003 [vent.ChannelTriggeredEvent] - astro:sun:home:set#event triggered START

Anyone else seen this and have a suggestion?

Perhaps we could see the astro part of your things file

Why would you expect that to happen? Let’s guess there is a secret rule to do it. May we see? The triggering you use is sort of important here.

Sure can. No secret. See below.
No Log entries attached yet. I need to rerun with and without offsets. This will take 2 days, so be patient.

DateTime SunriseStart_Time  "SunriseStart [%1$tH:%1$tM]"  { channel="astro:sun:home:rise#start" }
DateTime SunsetStart_Time   "SunsetStart  [%1$tH:%1$tM]"  { channel="astro:sun:home:set#start" }

astro:sun:home [ geolocation="59.0,9.0", interval=60 ]
    Type rangeEvent : rise#event  [
    Type rangeEvent : set#event  [

rule "Light ON"
  Channel 'astro:sun:home:set#event' triggered START

rule "Light OFF"
  Channel 'astro:sun:home:rise#event' triggered START 

Looks good.
I recall at one time there was a problem with events triggers where triggered worked (and you could examine trigger type in rule) but triggered START did not. You would still see the appropriate events in events.log of course. I think this was fixed long ago.
Patience will be rewarded I hope!

I used Astro Binding when I first started with OH (1+ years ago), and if I recall right, Astro offsets in the things file showed up in the PaperUI Astro Thing momentarily. Now it does not. Hence, I do not expect them to take effect this time around either. So, if my code is good, then something else is not. Question is what? OH2.5.1 ? I’ll do the test anyway. We’ll see.

First Log result at today’s Sunset:
Astro triggers Light On.
BUT, by looking at the time difference between actual sunset being 16:09 (end of line 1) and Lights On command at 16:07, difference is 2 min and not the specified things file offset=30 min.
Something does not add up here?

2020-01-26 00:00:30.842 [vent.ItemStateChangedEvent] - SunsetStart_Time changed from 2020-01-25T16:06:00.000+0100 to 2020-01-26T16:09:00.000+0100

2020-01-26 16:07:00.004 [vent.ChannelTriggeredEvent] - astro:sun:home:set#event triggered START
2020-01-26 16:07:00.031 [INFO ] [pse.smarthome.model.script.Astro TST] - With Offsets
2020-01-26 16:07:00.062 [ome.event.ItemCommandEvent] - Item 'Light_On_Off' received command ON
2020-01-26 16:07:00.167 [nt.ItemStatePredictedEvent] - Light_On_Off predicted to become ON
2020-01-26 16:07:00.192 [vent.ItemStateChangedEvent] - Light_On_Off changed from OFF to ON

I wouldn’t guarantee the start/end calculations are actually identical.

Don’t forget to match up current Things with each set of events records.

I think you should restart binding between Things edits; a few bindngs are not so clever about in-flight updates and Astro is one of the older 2.x versions. It does no harm.
I’m not disputing there may be a newly introduced bug, but you will also find years of folk struggling with these offsets that usually gets resolved in the end.

OK thanks.
Without offsets in the things file all is OK!
Will try to reset Astro bindig.
Take care.