Hello,
me again.
The template has gone through wonderfully for the last n days and has worked flawlessly. Today I wanted to adjust that so that Friday_night has a different time than weekdays.
I have added the following entry to ephemeris.cfg (and restart openhab):
country=de
region=th
dayset-weekday=Monday,Tuesday,Wednesday,Thursday,Friday
dayset-weekend=Saturday,Sunday
dayset-friday=Friday
dayset-sunday=Sunday
Then I created these items and assigned the appropriate times to the morning and night time:
DateTime TZ_Freitag_Nacht "Freitag Nacht" <time> (Tageszeiten) { tsm="NIGHT"[type="dayset",set="friday"] }
DateTime TZ_Freitag_Morgen "Freitag Morgen" <time> (Tageszeiten) { tsm="MORNING" [type="dayset",set="friday"] }
DateTime TZ_Freitag_Tag "Freitag Tag" <time> (Tageszeiten) { channel="astro:sun:local:rise#start", tsm="DAY"[type="dayset",set="friday"] }
DateTime TZ_Freitag_Vorabend "Freita Vorabend" <time> (Tageszeiten) { channel="astro:sun:local:civilDusk#start", tsm="TWILIGHT"[type="dayset",set="friday"] }
DateTime TZ_Freitag_Abend "Freitag Abend" <time> (Tageszeiten) { channel="astro:sun:local:set#start", tsm="EVENING"[type="dayset",set="friday"] }
Now Rule spits out error messages again:
2023-09-01 16:52:23.388 [DEBUG] [omation.rules_tools.TimeStateMachine] - Starting state machine in ten seconds...
2023-09-01 16:52:33.416 [DEBUG] [omation.rules_tools.TimeStateMachine] - Validating Item types, Item metadata, and Group membership
2023-09-01 16:52:33.462 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Freitag_Abend is valid
2023-09-01 16:52:33.474 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Freitag_Nacht is valid
2023-09-01 16:52:33.483 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Woche_Vorabend is valid
2023-09-01 16:52:33.492 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Default_Nacht is valid
2023-09-01 16:52:33.501 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Default_Abend is valid
2023-09-01 16:52:33.511 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Woche_Tag is valid
2023-09-01 16:52:33.520 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Woche_Morgen is valid
2023-09-01 16:52:33.529 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Freitag_Vorabend is valid
2023-09-01 16:52:33.538 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Wochenende_Tag is valid
2023-09-01 16:52:33.546 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Woche_Nacht is valid
2023-09-01 16:52:33.551 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Wochenende_Vorabend is valid
2023-09-01 16:52:33.558 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Default_Tag is valid
2023-09-01 16:52:33.564 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Freitag_Tag is valid
2023-09-01 16:52:33.570 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Wochenende_Nacht is valid
2023-09-01 16:52:33.576 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Freitag_Morgen is valid
2023-09-01 16:52:33.582 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Default_Morgen is valid
2023-09-01 16:52:33.588 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Wochenende_Morgen is valid
2023-09-01 16:52:33.593 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Woche_Abend is valid
2023-09-01 16:52:33.599 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Wochenende_Abend is valid
2023-09-01 16:52:33.606 [DEBUG] [omation.rules_tools.TimeStateMachine] - TZ_Default_Vorabend is valid
2023-09-01 16:52:33.622 [INFO ] [omation.rules_tools.TimeStateMachine] - All tsm Items are configured correctly
2023-09-01 16:52:34.021 [DEBUG] [omation.rules_tools.TimeStateMachine] - All tsm Items are configured correctly
2023-09-01 16:52:34.023 [DEBUG] [omation.rules_tools.TimeStateMachine] - Cancelling existing timers
2023-09-01 16:52:34.026 [DEBUG] [omation.rules_tools.TimeStateMachine] - Acquiring today's state start times
2023-09-01 16:52:34.128 [WARN ] [ore.internal.scheduler.SchedulerImpl] - Scheduled job 'ui.ba18028dd1.debounce' failed and stopped
org.graalvm.polyglot.PolyglotException: TypeError: (intermediate value).getMetadata is not a function
at <js>.:=>(<eval>:161) ~[?:?]
at <js>.getTodayItems(<eval>:161) ~[?:?]
at <js>.createTimersGenerator(<eval>:211) ~[?:?]
at <js>.:=>(/etc/openhab/automation/js/node_modules/openhab_rules_tools/timerMgr.js:66) ~[?:?]
at com.oracle.truffle.polyglot.PolyglotFunctionProxyHandler.invoke(PolyglotFunctionProxyHandler.java:154) ~[bundleFile:?]
at jdk.proxy1.$Proxy230.run(Unknown Source) ~[?:?]
at org.openhab.automation.jsscripting.internal.threading.ThreadsafeTimers.lambda$0(ThreadsafeTimers.java:85) ~[bundleFile:?]
at org.openhab.core.internal.scheduler.SchedulerImpl.lambda$12(SchedulerImpl.java:189) ~[?:?]
at org.openhab.core.internal.scheduler.SchedulerImpl.lambda$1(SchedulerImpl.java:88) ~[?:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:539) ~[?:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:264) ~[?:?]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635) ~[?:?]
at java.lang.Thread.run(Thread.java:833) ~[?:?]
If I delete the Friday items, the rule runs correctly again.
What am I doing wrong?