openhab-addons
openhab-addons copied to clipboard
[astro] missing events
Expected Behavior
As far as I understand, every rangeEvent channel which triggers START, should also trigger END
Current Behavior
This seems to be true for most rangeEvents, but not for eveningNight
and night
. Both channels do only trigger START
, but not END
.
Steps to Reproduce (for Bugs)
- setup a thing with "common" latitude/longitude (so it is to be expected to get eveningNight and night triggers)
- wait a day or so
- get event logs for the channels
Possible solution
The moment in time for each trigger is calculated at midnight for the upcoming day. But the former event is still "active". So maybe calculation for night/eveningNight event has to be done in a different way (e.g. don't change END time until the event got to END)
Your Environment
- openHAB4.1.1 release build
- openJDK17 headless
- Debian12-amd64 as LXContainer (Proxmox 8.1.5)
See https://openhabforum.de/viewtopic.php?p=60851#p60851 for reference
Reproduceable
eveningNight
always ends at 00:00 morningNight
starts at 00:00. night
covers both together.
I just checked and the ranges are calculated correctly. When scheduling the events, only the same day events are scheduled.
This is filtered here
So i would only expect the night
event not to end. As a workaround you can use the morningNight
End, it is the same moment in time.
You also mention the eveningNight
not raising end trigger. This is probably be because it is set at 00:00 midnight and is also regarded as a next day event. Some sort of race condition.
I wonder why there is a sameday filter. As removing that would fix this issue, but could also cause some weird behaviour as events are stacked?!
Edit: While thinking about it, the filte rmight be added due to some locations that have events that span multiple days and would fire multipel times?!