I recently posted an issue with regards to “astro” that I am having with fresh installs on PI4+s using the current image. Image = openhabian-raspios64-latest-202408242032-crc54da0025.img.xz. Which I downloaded a few different times. I thought I solved it but not!
So starting over a New load, used bindings= astro, java, mapdb, rrd4j, basic ui. Set my location. and completed auto setup.
Then, In putty I verified with “date” command and in openhabian-config my location and time. All is good!
Created a thing (local sun) from the astro binding. Added local sun in the model with points “sun rise” and “sun set” only.
Then, Looking under Settings/items both sun rise and set are accurate 2024-10-13T07:30:00.000-0700 & 2024-10-13T18:26:00.000-0700, respectively. Also checking the OpenHab Log Viewer no errors or warnings and the correct date and time reported was created.
BUT if you click on each item under Settings/items you get a different value; rise 2024-10-13 15:30, set 2024-10-14 02:26 which the same values are reflected in the model.
I check the links and they look correct.
I have a working systems made earlier this year that works well. so I can only think there’s a bug in the current image. OR what am i doing wrong?
In Settings/items go to the item created by local sun, it dispays date and time of that item. Then click that item the date and time are different, you get a different values; which are the same wrong values reflected in the model. So my astro rules do not function as desired.
setup location in openHAB Main UI (Administration → Settings → regional settings → position)
setup time of the host (e.g. dpkg-reconfigure tzdata)
check that time in openHAB logs is correct (e.g. take a look at /var/log/openhab/events.log)
check that time for Java sandbox is correct (take a look at /etc/default/openhab, search for EXTRA_JAVA_OPTS and check whether there is a part for user.timezone (by default Java should use system timezone, but sometimes this does not work correctly, openhabian-config should set the correct timezone through EXTRA_JAVA_OPTS, but sometimes this also fails…)
Curious that I’ve recently updated my image to the new milestone and I began scratching my head with the Astro binding as well.
Lately the shutters automation has been failing occasionally. Either they don’t close or don’t open.
Today they took 8 minutes more to open, than the time I had in the item. I don’t use offsets so I’m not sure what’s up…
No errors anywhere in the log either.
Udo = Right now I am working with a virgin setup starting from scratch. To your point 1, Regional is set. **Reginal reports (GMT-8:00) America/Los_Angeles. your Point 2 yes! your point 3 never noticed before but the time is off ahead by 8 hours. I went into openhabian-config, system setting and corrected the time. rebooted and now the time is 9 hours ahead. your point 4 I added EXTRA_JAVA_OPTS=“-Duser.timezone=America/Los_Angeles” to the openhab file, rebooted and no change.
As it stands this virgin set up the log report says hour 22 when it’s hour 01, the date is correct.
Using putty, logging in start screen reports the correct time an date as does the date command.
At this point I have no rules
Recap new load only astro loaded with 2 items. At the Settings/items, 2 items sunset and sunrise to the right of each item has the correct date/time for that function. But click an item and the time seen is 9 hours ahead,
For 4 days now, I’ve loaded several SDs different PIs with same results. I have an older SD card loaded that has no time issues. ODD?? I wish I could find an older image say 6 months old.
To be clear where does the logs get its time date data?
Yes, openHAB is an application.
No, openHABian isn’t an OS at all
Instead, openHABian is a bunch of scripts to provide a comfortable way to setup openHAB and third party applications.
One can install openHABian on top of a debian-like GNU/Linux System (e.g. Ubuntu)
BUT… There is a ready-to-use Image for Raspberry Pi with preinstalled openHABian.
This image is based on Raspberry Pi OS lite and will - after initial expansion of the second partition - execute openhabian-config unattended automagically.
There are known problems using openHABian on Ubuntu. I’ve seen some reports that it works on Mint and it definitely works on Debian but stay away from Ubuntu with openHABian. Of course, openHAB itself works on all of these and more.