Closed softy2417 closed 2 years ago
Running on openhab 2.5 RC1/Docker: getting errors:
2019-12-12 10:16:24.687 [ERROR] [org.openhab.core.ephemeris ] - bundle org.openhab.core.ephemeris:2.5.0.RC1 (143)[org.openhab.ephemeris(74)] : The activate method has thrown an exception java.lang.IllegalArgumentException: No enum constant java.time.DayOfWeek.SATURDAY,SUNDAY at java.lang.Enum.valueOf(Enum.java:238) ~[?:1.8.0_232] at java.time.DayOfWeek.valueOf(DayOfWeek.java:109) ~[?:1.8.0_232] at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.addDayset(EphemerisManagerImpl.java:330) ~[?:?] at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.lambda$2(EphemerisManagerImpl.java:151) ~[?:?] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_232] at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_232] at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_232] at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_232] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_232] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_232] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_232] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_232] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_232] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_232] at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.modified(EphemerisManagerImpl.java:131) ~[?:?] at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.activate(EphemerisManagerImpl.java:126) ~[?:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232] at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232] at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?] at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [bundleFile:?] at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.createImplementationObject(SingleComponentManager.java:340) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.createComponent(SingleComponentManager.java:114) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:982) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getServiceInternal(SingleComponentManager.java:955) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.getService(SingleComponentManager.java:900) [bundleFile:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse$1.run(ServiceFactoryUse.java:212) [org.eclipse.osgi-3.12.100.jar:?] at java.security.AccessController.doPrivileged(Native Method) [?:1.8.0_232] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.factoryGetService(ServiceFactoryUse.java:210) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceFactoryUse.getService(ServiceFactoryUse.java:111) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceConsumer$2.getService(ServiceConsumer.java:45) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:508) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:461) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.getService(BundleContextImpl.java:624) [org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.scr.impl.manager.SingleRefPair.getServiceObject(SingleRefPair.java:86) [bundleFile:?] at org.apache.felix.scr.impl.inject.BindParameters.getServiceObject(BindParameters.java:47) [bundleFile:?] at org.apache.felix.scr.impl.inject.methods.BindMethod.getServiceObject(BindMethod.java:664) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.getServiceObject(DependencyManager.java:2308) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager.invokeUnbindMethod(DependencyManager.java:1919) [bundleFile:?] at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeUnbindMethod(SingleComponentManager.java:458) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:382) [bundleFile:?] at org.apache.felix.scr.impl.manager.DependencyManager$MultipleDynamicCustomizer.removedService(DependencyManager.java:294) [bundleFile:?] at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1242) [bundleFile:?] at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.customizerRemoved(ServiceTracker.java:1137) [bundleFile:?] at org.apache.felix.scr.impl.manager.ServiceTracker$AbstractTracked.untrack(ServiceTracker.java:997) [bundleFile:?] at org.apache.felix.scr.impl.manager.ServiceTracker$Tracked.serviceChanged(ServiceTracker.java:1176) [bundleFile:?] at org.apache.felix.scr.impl.BundleComponentActivator$ListenerInfo.serviceChanged(BundleComponentActivator.java:125) [bundleFile:?] at org.eclipse.osgi.internal.serviceregistry.FilteredServiceListener.serviceChanged(FilteredServiceListener.java:109) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:920) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEventPrivileged(ServiceRegistry.java:862) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.publishServiceEvent(ServiceRegistry.java:801) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.unregister(ServiceRegistrationImpl.java:222) [org.eclipse.osgi-3.12.100.jar:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:927) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager$3.unregister(AbstractComponentManager.java:892) [bundleFile:?] at org.apache.felix.scr.impl.manager.RegistrationManager.changeRegistration(RegistrationManager.java:135) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.unregisterService(AbstractComponentManager.java:969) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.doDeactivate(AbstractComponentManager.java:823) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.deactivateInternal(AbstractComponentManager.java:805) [bundleFile:?] at org.apache.felix.scr.impl.manager.AbstractComponentManager.dispose(AbstractComponentManager.java:584) [bundleFile:?] at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.disposeComponents(ConfigurableComponentHolder.java:716) [bundleFile:?] at org.apache.felix.scr.impl.BundleComponentActivator.dispose(BundleComponentActivator.java:510) [bundleFile:?] at org.apache.felix.scr.impl.Activator.disposeComponents(Activator.java:429) [bundleFile:?] at org.apache.felix.scr.impl.Activator.access$300(Activator.java:49) [bundleFile:?] at org.apache.felix.scr.impl.Activator$ScrExtension.destroy(Activator.java:292) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender$1.run(AbstractExtender.java:216) [bundleFile:?] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_232] at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_232] at org.apache.felix.scr.impl.AbstractExtender.destroyExtension(AbstractExtender.java:238) [bundleFile:?] at org.apache.felix.scr.impl.AbstractExtender.bundleChanged(AbstractExtender.java:132) [bundleFile:?] at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:908) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:213) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:120) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:112) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:168) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.publishEvent(Module.java:476) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.doStop(Module.java:634) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.stop(Module.java:498) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.decStartLevel(ModuleContainer.java:1675) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1594) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.SystemModule.stopWorker(SystemModule.java:270) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule.stopWorker(EquinoxBundle.java:147) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.doStop(Module.java:636) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.Module.stop(Module.java:498) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.container.SystemModule.stop(SystemModule.java:202) [org.eclipse.osgi-3.12.100.jar:?] at org.eclipse.osgi.internal.framework.EquinoxBundle$SystemBundle$EquinoxSystemModule$1.run(EquinoxBundle.java:165) [org.eclipse.osgi-3.12.100.jar:?] at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
I have cleaned the system of existing /userdata/org/openhab/ephemeris.cfg . After this process, the system came up without error messages. Then I re-entered settings in PaperUI and the error(and the file with the same content) comes up again. So same behaviour like reported by justclouds above also happens in 2.5.0 RC1
Originally posted by @softy2417 in #903 (comment)
Try triple ticks ``` on the lines before and after your logs or code.
I cannot reproduce this with a standard distro. Might be only occurring when using Docker...?
I can confirm, that this error doesn't pop up on my quickly reactivated openhabian running RC1. Following up openhab/openhab-core#903, the error on the Docker instance might be related to directories outside of /openhabian and req only a slight modification of the dockerfile.
Ok - thanks. I'd suggest to move it to the docker repo at least for the further analysis then.
slight modification of the dockerfile
Does it work with the official openHAB RC1 images?
I have cleaned the system of existing /userdata/org/openhab/ephemeris.cfg .
What are the contents of the file after saving your changes?
What configuration does Karaf show on the console when you issue the following command:
config:list "(service.pid=org.openhab.ephemeris)"
Test were done with the official image. Changed now to the official 2.5 stable. Errors attached.
content of /userdata/config/org/openhab/ephemeris.cfg:
:org.apache.felix.configadmin.revision:=L"1"
country="de"
dayset-weekend=( \
"SATURDAY,SUNDAY", \
)
service.pid="org.openhab.ephemeris"
config:list "(service.pid=org.openhab.ephemeris)"
----------------------------------------------------------------
Pid: org.openhab.ephemeris
BundleLocation: null
Properties:
country = de
dayset-weekend = [SATURDAY,SUNDAY]
service.pid = org.openhab.ephemeris
errors:
2019-12-16 10:47:23.336 [ERROR] [org.openhab.core.ephemeris ] - bundle org.openhab.core.ephemeris:2.5.0 (143)[org.openhab.ephemeris(62)] : The modified method has thrown an exception
java.lang.IllegalArgumentException: No enum constant java.time.DayOfWeek.SATURDAY,SUNDAY
at java.lang.Enum.valueOf(Enum.java:238) ~[?:1.8.0_232]
at java.time.DayOfWeek.valueOf(DayOfWeek.java:109) ~[?:1.8.0_232]
at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.addDayset(EphemerisManagerImpl.java:330) ~[?:?]
at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.lambda$2(EphemerisManagerImpl.java:151) ~[?:?]
at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:1.8.0_232]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:175) ~[?:1.8.0_232]
at java.util.Iterator.forEachRemaining(Iterator.java:116) ~[?:1.8.0_232]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:1.8.0_232]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:482) ~[?:1.8.0_232]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[?:1.8.0_232]
at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:1.8.0_232]
at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:1.8.0_232]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:1.8.0_232]
at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:485) ~[?:1.8.0_232]
at org.eclipse.smarthome.core.ephemeris.internal.EphemerisManagerImpl.modified(EphemerisManagerImpl.java:131) ~[?:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_232]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_232]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_232]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_232]
at org.apache.felix.scr.impl.inject.methods.BaseMethod.invokeMethod(BaseMethod.java:228) ~[bundleFile:?]
at org.apache.felix.scr.impl.inject.methods.BaseMethod.access$500(BaseMethod.java:41) ~[bundleFile:?]
at org.apache.felix.scr.impl.inject.methods.BaseMethod$Resolved.invoke(BaseMethod.java:664) ~[bundleFile:?]
at org.apache.felix.scr.impl.inject.methods.BaseMethod.invoke(BaseMethod.java:510) [bundleFile:?]
at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:317) [bundleFile:?]
at org.apache.felix.scr.impl.inject.methods.ActivateMethod.invoke(ActivateMethod.java:307) [bundleFile:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.invokeModifiedMethod(SingleComponentManager.java:836) [bundleFile:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.modify(SingleComponentManager.java:791) [bundleFile:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:709) [bundleFile:?]
at org.apache.felix.scr.impl.manager.SingleComponentManager.reconfigure(SingleComponentManager.java:673) [bundleFile:?]
at org.apache.felix.scr.impl.manager.ConfigurableComponentHolder.configurationUpdated(ConfigurableComponentHolder.java:435) [bundleFile:?]
at org.apache.felix.scr.impl.manager.RegionConfigurationSupport.configurationEvent(RegionConfigurationSupport.java:316) [bundleFile:?]
at org.apache.felix.scr.impl.manager.RegionConfigurationSupport$2.configurationEvent(RegionConfigurationSupport.java:118) [bundleFile:?]
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.sendEvent(ConfigurationManager.java:1709) [bundleFile:?]
at org.apache.felix.cm.impl.ConfigurationManager$FireConfigurationEvent.run(ConfigurationManager.java:1651) [bundleFile:?]
at org.apache.felix.cm.impl.UpdateThread.run0(UpdateThread.java:138) [bundleFile:?]
at org.apache.felix.cm.impl.UpdateThread.run(UpdateThread.java:105) [bundleFile:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
For me Ephemeris doesn't save any settings at all when I change them using Paper UI and Chrome 79.0.3945.79. It always keeps using the same values for dayset-school
, dayset-weekend
. I am able edit the country though.
Perhaps @cweitkamp or @clinique can help with this?
I'll move this back to openhab-core because I have the same issues when using the .zip distro. ephemeris.cfg
is stored in the userdata dir so there's nothing special about using it with Docker.
See https://community.openhab.org/t/wip-ephemeris-documentation/84536
Currently a new OH2 installation (OH2.5.M4 or later) will be delivered with the following default configuration in the
runtime.cfg
inside$OPENHAB_CONF/services/
folder:org.openhab.ephemeris:dayset-weekend = [SATURDAY,SUNDAY] org.openhab.ephemeris:dayset-school = [MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
[...] Additionally there is no proper way to define other daysets via UIs. [...]
They - the UIs - all have to implement #1031 first.
[...] You are able to add an
ephemeris.cfg
file and it will override existing configurations. But you have to be aware of that the latest edit will win - thus we maybe should recommend to remove the default configuration fromruntime.cfg
at the time one will add a different config file for Ephemeris service. [...]
That explains. I haven't been really using Ephemeris myself at all. :wink:
How do you edit these settings @softy2417? What ephemeris settings do you have in the runtime.cfg
and ephemeris.cfg
files in the conf/services
dir?
FYI - /conf - runtime.cfg has only comment entries and ephemeris.cfg doesn't exist there.
A /userdata/config/org/openhab/ephemeris.cfg is being created after adding i.e. "Germany" in Paper UI resulting in the entries described above.
The entries in runtime.cfg: org.openhab.ephemeris:dayset-weekend = [SATURDAY,SUNDAY] org.openhab.ephemeris:dayset-school = [MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY]
has not been created (runtime.cfg has only comments still org from 2.4 stable) After adding these 2 lines to /conf/services/runtime.cfg and a restart, the error in whole disappeared.
Problem on the update procedure seem to be the cause.
I did not see this issue on an openhabiansetup, but I need more time to reproduce the same circumstance.
OK seems we now know what's causing this and I can reproduce your issue also on the .zip distro as follows:
conf/services
userdata/config/org/openhab/ephemeris.config
But this seems to be a known issue which is why the Ephemeris configuration defaults were added to conf/services
. It might have been better if the weekend days configuration wasn't available at all via the UIs in 2.5.0. That might have prevented confusion and these issues.
Looks to me that default settings(whatever day) org.openhab.ephemeris:dayset-weekend = [SATURDAY,SUNDAY] org.openhab.ephemeris:dayset-school = [MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY] should be tattooed in /conf/services/runtime.cfg, otherwise these errors are "likely".
Anyway - your decision to close this issue or not.
Best Softy
A default configuration for new installations got added in https://github.com/openhab/openhab-distro/pull/984 but these changes aren't applied on upgrades.
I checked my own upgraded instance where I haven't made any Ephemeris changes and it doesn't have much configuration in userdata/config/org/openhab/ephemeris.config
:
:org.apache.felix.configadmin.revision:=L"1"
_felix_.cm.newConfiguration=B"true"
service.pid="org.openhab.ephemeris"
I can't find any open Ephemeris issue for addressing these remaining configuration issues so I wouldn't mind keeping this issue open. There will also be other users running into this. :slightly_frowning_face:
FYI is is possible to encode these at the OSGi Configuration Admin level: http://dywicki.pl/2015/02/apache-felix-configuration-admin-with-array-values/
Once values are prefixed in config file the Configuration
object will contain an Array
of given kind instead of usual String.
FYI, I'm also seeing this error on startup of "standard" (non-Docker) OH 2.5.1 (after cache clean). Also a number of posts on the community to mention this, too.
org.openhab.ephemeris:dayset-weekend = [SATURDAY,SUNDAY] org.openhab.ephemeris:dayset-school = [MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY] should be tattooed in /conf/services/runtime.cfg, otherwise these errors are "likely".
These I had set, too,
Figure I'd mention I found my where here after seeing this in my dockerized install. I've been running dockerized openhab for a while, so have gone through the normal (for docker containers at least) upgrade pattern of docker stop ...; docker rm ...; docker run ...
to pull in the latest version.
FYI, I also saw this error after upgrade from a non-docker 2.5.0 to 2.5.5 I tried the above modifications but the error remained. The solution for me was: stop OH, delete /var/lib/openhab2/config/org/openhab/ephemeris.config, restart the error had disappeared and the ephemeris.config was automatically re-created with the following content:
:org.apache.felix.configadmin.revision:=L"2"
dayset-school=( \
"MONDAY", \
"TUESDAY", \
"THURSDAY", \
"WEDNESDAY", \
"FRIDAY", \
)
dayset-weekend=( \
"SATURDAY", \
"SUNDAY", \
)
felix.fileinstall.filename="file:/var/lib/openhab2/etc/org.openhab.ephemeris.cfg"
service.bundleLocation="?"
service.pid="org.openhab.ephemeris"
I do get the same error in 2.5.7 running in a docker container. Any way to get this fixed by PaperUI, or only config file?
Is this still the case with latest release/snapshot?
Looking at the values read and written back to the disk I think issue is following:
1) Config Admin reads values using [SATURDAY, SUNDAY]
semantics.
2) Things work fine cause they are mapped properly over OH config layer as an collection.
3) After modification config gets written using (SATURDAY, SUNDAY)
, note change of brackets.
4) Config admin reads it properly using above semantics, but it doesn't pass over OH config layer.
Voila, you got recipe for loosing a config without loosing it at all. ;-) I observed this issue (non linear read/write) while working on other stuff.
Interesting. So the issue is in the EphemerisManagerImpl
that checks for [
and ]
but not for (
and )
. This should be easy to fix.
Interesting. So the issue is in the
EphemerisManagerImpl
that checks for[
and]
but not for(
and)
. This should be easy to fix.
It might be this, but it also might be caused by fact that value under given key is not a String
and not an Iterable
. If you have an array coming from config admin layer then its not matching conditions: https://github.com/openhab/openhab-core/blob/main/bundles/org.openhab.core.ephemeris/src/main/java/org/openhab/core/ephemeris/internal/EphemerisManagerImpl.java#L143L159. Given there is no else
you can't really know what really broke 2.5 setup and how.
I have done some tests and it seems that the config admin provides a Vector
which goes to the Iterable
branch or a String
(without brackets). If I change to []
instead of ()
, this is automatically converted to ()
. So it seems that some upgrade made it work. I'll close it here and please create a new issue if it comes up again.
If it works the default config file should be removed so users can use the UI to configure this. I.e. revert https://github.com/openhab/openhab-distro/pull/984
Running on openhab 2.5 RC1/Docker: getting errors:
I have cleaned the system of existing /userdata/org/openhab/ephemeris.cfg . After this process, the system came up without error messages. Then I re-entered settings in PaperUI and the error(and the file with the same content) comes up again. So same behaviour like reported by justclouds above also happens in 2.5.0 RC1
Originally posted by @softy2417 in https://github.com/openhab/openhab-core/issues/903#issuecomment-564923934