Hi openHAB community,
I would like to share my findings for my very particular scenario.
If you encounter the situation, that scheduled rules are heavily delayed (by hours) on a Raspberry Pi, consider the following:
Preamble: My router gets switched off in the evening when going to bed (around 22h).
The Raspberry, where OH3 is deployed, gets switched off automatically around 23:55 and is started at 5:00. The router gets switched on when I wake up via Openhab when I switch off the Flight Mode on my phone. During this timeframe, the Raspberry is connected to the internet via a GSM modem attached to it (don’t ask me why )
As the Raspberry does not have a RTC (real-time clock) the time (when started) is set to whatever time it was when the Pi shut off (in my case 23:55).
The time is synced when the Raspberry has Internet connectivity, which happens AFTER OH3 was started, because openHAB activates the GSM stick.
After migration from OH2 to OH3 I found out, that my scheduled rules (pre shutdown) were not triggered any more.
Therefore, I have created two scheduled rules (for testing purposes) that should trigger around 7:10 and 7:15. But those rules were triggered somehwere around 12:45 and 12:50.
So I figured that it had something to do with the wrong time on startup.
This wasn’t a problem in OH2, because OH2 used Quartz for scheduling which does something differently (apparently) than the scheduling in the NGRE.
Now, I have installed a RTC module for my Raspberry and the rules are executed on point.
My first consideration was to delay the start of Openhab until the time was synced (which is now easier in Debian Buster with Wants=time-sync.target in openhab.service),
see https://raspberrypi.stackexchange.com/questions/94635/how-can-i-delay-the-startup-of-systemd-services-until-the-datetime-is-set-no-rt.
Just wanted to let you know of this very special scenario.
- Platform information:
- Hardware: Raspberry Pi 4B 4GB
- OS: Raspbian / Debian 10 (Buster)
- Java Runtime Environment: OpenJDK 11.0.10 2021-01-19 LTS
- openHAB version: OpenHAB 3.0.1 Release Build