- Platform information:
- Hardware: Raspberry Pi 4
- OS: Armbian
- Java Runtime Environment: OpenJDK Runtime Environment Zulu17.44+53-CA (build 17.0.8.1+1-LTS)
- openHAB version: 4.0.3
- Issue of the topic: I have Ephemeris default holidays configured via
ephemeris.cfg
and they seem to work without issues. I want to add some extra holidays via$OH_CONF/services/holidays.xml
configuration file, but these holidays doesn’t seem to be taken into account. Launching the rule today should trigger that its a bank holiday or at least that’s what I’m trying to achieve. - Please post configurations (if applicable):
ephemeris.cfg:
country=es
region=m
city=mad
dayset-workday=[MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
dayset-weekend=[SATURDAY,SUNDAY]
/etc/openhab/services/holidays.xml:
<?xml version="1.0" encoding="UTF-8"?>
<tns:Configuration hierarchy="es" description="Spain" xmlns:tns="http://www.example.org/Holiday" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.example.org/Holiday /Holiday.xsd">
<tns:Holidays>
<!-- School holidays -->
<tns Fixed month="OCTOBER" day="13" descriptionPropertiesKey="School holiday" />
</tns:Holidays>
</tns:Configuration>
Test rule:
rule "Test rule"
when
Time cron "0 0 0 * * *"
then
logInfo("Test rule", "Ephemeris: " + Ephemeris.isBankHoliday)
logInfo("Test rule", "Ephemeris day: " + Ephemeris.getBankHolidayName)
end
- If logs where generated please post these here using code fences:
When running the above test rule, I get the following in the openhab.log file
2023-10-13 12:04:48.350 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de.jollyday.impl.DefaultHolidayManager
2023-10-13 12:04:48.364 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de.jollyday.datasource.impl.XmlFileDataSource
2023-10-13 12:04:48.395 [WARN ] [de.jollyday.util.XMLUtil ] - Could not create JAXB context using the current threads context classloader. Falling back to ObjectFactory class classloader.
2023-10-13 12:04:48.662 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de.jollyday.parser.impl.ChristianHolidayParser
2023-10-13 12:04:48.671 [WARN ] [de.jollyday.util.ClassLoadingUtil ] - Could not load class with current threads context classloader. Using default. Reason: ClassNotFoundException: de.jollyday.parser.impl.FixedParser
2023-10-13 12:04:48.694 [INFO ] [.openhab.core.model.script.Test rule] - Ephemeris: false
2023-10-13 12:04:48.704 [INFO ] [.openhab.core.model.script.Test rule] - Ephemeris day: null