since hours im trying to configure Ephemeris. I configured it via the Ui to Germany, Baden-Württemberg, and weekends to SATURDAY, SUNDAY and the city to wn.
With the default holidays, its working fine now, but i wanted to add a custom holiday file. Therefore i downloaded the one from Actions | openHAB
and placed it here: /etc/openhab/services/Holidays_de.xml
The file is owned by user openhab and is set to ‘rw’.
In my Rules DSL file automation.rules i have the following:
rule "Ephemeris test"
when
Time cron "0 * * * * ? *"
then
logInfo("Ephemeris", "Ephemeris: " + Ephemeris.getNextBankHoliday('/etc/openhab/services/Holidays_de.xml'))
end
but the log then just mentions:
2024-02-19 18:10:00.981 [ERROR] [internal.handler.ScriptActionHandler] - Script execution of rule with UID 'automation-1' failed: Cannot instantiate configuration from URL 'file:/etc/openhab/services/Holidays_de.xml'. in automation
Has anybody any idea, how to get that to work?
And directly the next two question:
Is it possible to give a custom name, e.g.: schulferien? So this would allow to have multiple lists to distinguish between.
How would one define a time range in the xml file, e.g. 25.03.2024 - 05.05.2024 ? Is this possible or do i have to define each and every day? By reading jollday spec I absolutely do not understand how to do so.
rule "ephemeris message"
when Time cron "0/10 * * * * ?"
then
logInfo("Rules", Ephemeris.getNextBankHoliday("/etc/openhab/services/MyEntry_de.xml"))
end
Hello,
I’m using my own file for birthdays and placed it here “/openhab/conf/services/birthdays.xml” with OpenHAB 4.1.1 under Docker.
In JS the code to read the
great, thanks for your reply. I now just simply copied exactly what you have specified, and its now perfectly working and this is a superb starting point for me. Thanks also for question no 1 (also to @uk59821 ).
On jollyday related github issues there is also a question about vacation … it is unanswered.
I did not try it but it may be possible to do something like
I think 1 and 2 are answered above. 3 is not possible through Ephemeris as far as I know nor do I know of binding that supports caldav (only iCalendar).
You might be able to make something work through the HTTP binding and actions but it’s probably going to be a lot of work.