2024-12-14 09:01:43.063 [WARN ] [emeris.internal.EphemerisManagerImpl] - Erroneous day set definition dayset-school: No enum constant java.time.DayOfWeek.
2024-12-14 09:01:43.067 [WARN ] [emeris.internal.EphemerisManagerImpl] - Erroneous day set definition dayset-weekend: No enum constant java.time.DayOfWeek.
After some searching I suspect that the error lies in my ephemeris.config (which I have never touched, it’s just been there since pre OH 2.0). Can anyone tell me what is the correct format of dayset-school and dayset-weekend? Pasting my full ephemeris.config below:
You are looking at the ephemeris.config, which gets populated through the UI or the content of the configuration file ephemeris.cfg file and usually has “weird” characters in there. You should never edit .config files manually!
If you need custom daysets, you have to configure everything through the ephemeris.cfg file.
Thank you both! In the file /var/lib/openhab/org.openhab.ephemeris.cfg I had the exact same definition of dayset-weekend and dayset-school, I guess that’s the source then? And I guess it’s remnants of some old OH version. I’ll correct the syntax there according to the linked docs and hope the error goes away til the next time I restart OH
Hmm, didn’t really work out as planned. I’ll go through my steps, suspecting I’m in the wrong location here… What I did now was editing /var/lib/openhab/etc/org.openhab.ephemeris.cfg to the correct syntax, ie:
dayset-weekend=[SATURDAY,SUNDAY]
After the next reboot of OH, the configuration has reset itself to the weird syntax, ie:
dayset-weekend = (
“SATURDAY”,
“SUNDAY”,
)
…and also the exact thing in /var/lib/openhab/config/org/openhab/ephemeris.config. And so I got the errors in the log, complaining about erroneous day set definition.
Could it be that those definitions shouldn’t be there at all? If I understand the documentation correctly the dayset definitions should be in /etc/openhab/services/ephemeris.cfg, is it the case that they should ONLY exist there?
I didn’t. The file I edited was /var/lib/openhab/etc/org.openhab.ephemeris.cfg, I’m trying to establish what that file is supposed to contain, if the daysets should be there at all or if those rows are just remnants of some old OH version…
Well, no actually, I’d rather configure everything through UI, that’s what I’m doing with everything else
Starting to think the best option is to just delete all those lines altogether, the only thing I really want is to get my log file free from error messages…
Now I am confused.
Why are you dealing with the config files then at all?
Delete all config and cfg files and configure through the UI.
After you hit “save” a new ephemeris.config file will be created automatically, but that is just for info, don’t touch it
Because that’s where the error message seems to come from. I never created any file related to ephemeris since I never used it, I guess those files must have been auto created from some earlier version of OH? Guess I’ll simply go over all those .cfg files and check which could be deleted and which don’t…
You should never edit anything in $OH_USERDATA/config. Those config files are managed by OH itself and should not be edited manually. On an apt install $OH_USERDATA is /var/lib/openhab.
You should never see any .cfg files in $OH_USERDATA/config. These files will all have a .config extension.
Unfortunately, you can only configure Weekend Days as a dayset through the UI. To define new daysets or to define custom holidays you must use a file based config.
a. To configure a new dayset create/edit $OH_CONF/services/ephemeris.cfg. If you define a new dayset, you need to configure everything ephemeris related through the file. The contents of this file (or lack of contents) will override what’s done in the UI. The file should look something like:
b. To create custom holidays you need to create a Jolly Day XML file also placed in `$OH_CONF/services`. The name of the file doesn't really matters so long as it has the `.xml` extension. It should look something like:
dayset-school isn’t a standard dayset so this almost certainly is comming from $OH_CONF/services/ephemeris.cfg. So that’s the file you should edit. If you don’t care about this dayset, you can do the following:
Stop OH
Delete $OH_USERDATA/config/org/openhab/ephemeris.config and delete any other ephemeris file you may have added to this folder.
Delete $OH_CONF/services/ephemeris.cfg
Start OH
Navigate to Settings → Ephemeris and reconfigure your region.
If you do care about the school dayset:
Stop OH
Edit $OH_CONF/services/ephemeris.cfg using the syntax shown above. Make sure to include all the regional propertles.
Thanks for the detailed explanation! It’s quite clear to me that my installation has accumulated quite some trash during the years, seems there is a little cleanup needed…
Just to be clear, are the files in $OH_USERDATA/config based on a combination of .cfg files (from both $OH_USERDATA/config and /etc/openhab/services?) and settings made in GUI?
Yes with the caution that it’s either or, not both (for each individual file).
If you put a .cfg file in $OH_CONF/services, that file will override anything you do in the UI. Any changes you make in the UI where there isn’t a cfg file overriding it, will get saved to the config file in $OH_USERSDATA.
In both cases, it’s OH that populates the config files in $OH_USERDATA, not us humans.
Ok! And if I find things in /etc/openhab/services which don’t seem to have any corresponding settings in GUI (like pushover.cfg) then those settings belong to bindings (obviously Pushove binding in this case) which isn’t possible to configure in GUI?
Also still not sure where .cfg files in /var/lib/openhab/etc fits in all this, they seem to be files that comes with the distro? Many of them seems to be untouched since many years here though, could that be configurations that are no longer relevant?
All bindings that are a part of OH proper are configurable through the UI. For Pushover you’d create a Thing and that’s where you’d config the account info and such. That .cfg is probably old and, at least according to the docs, no longer used. Since it’s not being used it’s not causing any harm, but it’s also not doing anything.
Ephemeris I think is the very last thing that requires configuration from files, not counting some odd bindings on the marketplace perhaps. Bindings are all configured through Things.