rule "Switch ON xmaslight at eventing"
when
Channel 'astro:sun:home_xmas:set#event' triggered START
then
logInfo("xmas.rules", "Switch on event 1")
knxXmasOutdoor.sendCommand("ON")
end
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.
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.
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
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!
Thanks,
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.