I doubt this would be caused by a configuration problem but to be sure check any custom ephemeris configs you have for corruption or weirdness.
Beyond the obvious, that it can’t find Jolly Day, I have no idea what could be the problem. If you are running the latest milestone or SNAPSHOT you should file an issue on openhab-core. If not you should try it out with the latest milestone or SNAPSHOT and see if the problem still persists. I can’t think of any way any configuration change you’ve made would cause this.
I dont have any custom ephemeris. The error message seems to trigger on startup. The log file shows that the TimeOfDay rule has been working fine since startup (more than 24 hours).
2021-06-20 23:11:41.127 [INFO ] [ab.ui.habpanel.internal.HABPanelTile] - Started HABPanel at /habpanel
2021-06-20 23:11:42.710 [INFO ] [e.automation.internal.RuleEngineImpl] - Rule engine started.
2021-06-20 23:11:46.170 [INFO ] [zwave.handler.ZWaveControllerHandler] - Attempting to add listener when controller is null
2021-06-20 23:11:51.349 [INFO ] [ve.internal.protocol.ZWaveController] - Starting ZWave controller
2021-06-20 23:11:51.351 [INFO ] [ve.internal.protocol.ZWaveController] - ZWave timeout is set to 5000ms. Soft reset is false.
2021-06-20 23:12:34.749 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de
.jollyday.impl.DefaultHolidayManager cannot be found by org.apache.aries.jax.rs.whiteboard_1.0.9
2021-06-20 23:12:34.763 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de
.jollyday.datasource.impl.XmlFileDataSource cannot be found by org.apache.aries.jax.rs.whiteboard_1.0.9
2021-06-20 23:12:34.783 [WARN ] [de.jollyday.util.XMLUtil ] - Could not create JAXB context using the current threads context classloader. Falling back to ObjectFactory class
classloader.
2021-06-20 23:12:34.905 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de
.jollyday.parser.impl.FixedParser cannot be found by org.apache.aries.jax.rs.whiteboard_1.0.9
2021-06-20 23:12:34.912 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de
.jollyday.parser.impl.ChristianHolidayParser cannot be found by org.apache.aries.jax.rs.whiteboard_1.0.9
2021-06-20 23:12:34.916 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de
.jollyday.parser.impl.IslamicHolidayParser cannot be found by org.apache.aries.jax.rs.whiteboard_1.0.9
2021-06-20 23:12:34.996 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Today is a default day.
2021-06-20 23:13:06.018 [INFO ] [openhab.model.script.Rules.TimeOfDay] - The current time of day is BED
2021-06-20 23:30:00.024 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Transitioning Time of Day from BED to NIGHT
2021-06-21 00:00:30.221 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Today is a default day.
2021-06-21 00:00:30.362 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Moved Default_Morning to today.
2021-06-21 00:00:30.381 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Moved Default_Bed to today.
2021-06-21 00:00:30.427 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Moved Default_Night to today.
2021-06-21 00:01:00.578 [INFO ] [openhab.model.script.Rules.TimeOfDay] - The current time of day is NIGHT
2021-06-21 00:01:00.683 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Today is a default day.
2021-06-21 00:01:30.708 [INFO ] [openhab.model.script.Rules.TimeOfDay] - The current time of day is NIGHT
2021-06-21 05:00:00.002 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Transitioning Time of Day from NIGHT to MORNING
2021-06-21 05:56:00.002 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Transitioning Time of Day from MORNING to DAY
2021-06-21 10:53:56.777 [INFO ] [el.core.internal.ModelRepositoryImpl] - Loading model 'livingroom.rules'
2021-06-21 18:46:00.002 [INFO ] [openhab.model.script.Rules.TimeOfDay] - Transitioning Time of Day from DAY to EVENING
I am running openhab 3.0.2-1 which is latest stable.
Your problems have nothing to do with the rule examples this thread is about.
This line, as a “global” definition -
populates your CurrentTime variable with a value only once, at rules file load time.
So far as I can see, you never update it, so yes it will stay the same.
This behaviour has not changed since OH2.
Wouldn’t you be interested in “now” at the time the rule runs?
When you’re ready, you might show us those.
I don’t know what your Zwave problems are about, but not related to this rule.
That metadata doesn’t look wrong but it’s hard to tell by just looking at the JSON like that.
If the metadata is present but not well formed then the rule will complain about that.
You can see which Items are being considered by the rule by turning up the logging to DEBUG when it runs. It will list all the Items it’s using for the day.
If you don’t get any errors and you don’t see your Item in the debug logs then for some reason the rule doesn’t see that Item at all. If you see errors then the error should tell you what’s wrong.
I’m trying to get the javascript version running on my OH3.1 system. But when executing the script imported from ephemTimeOfDay.yml io get this error in openhab.log:
2021-07-18 11:23:15.674 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID '1d2a859923' failed: org.graalvm.polyglot.PolyglotException: ReferenceError: "scriptExtension" is not defined
I cleaned /etc/openhab/automation before installing all files mentioned in the README.md at:
It appears that if you’ve installed the GraalVM JavaScript addon it replaces the default one. In other words, you can’t. If you do not plan on using the GraalVM JavaScript, don’t install it. If you do plan on using it you’ll have to rewrite the rule above to work with that.
You’ve also installed Jython and Groovy too. Do you have plans to use those? If not don’t install them. The more stuff you have installed the more opportunities there are for problems. Only install add-ons (and software for that matter) you intend to use. Don’t install stuff “just in case”.
Logging debug-info worked and one “Time of day”-item was indeed missing. Instead of messing about with metadata in the API-explorer, I just created the item again with info from your github. Now it works fine. Thanks