Every time that I started my OH2 service, I was getting:
2018-11-12 10:24:53.003 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key astro:sun:local in ManagedThingProvider, because it does not exists.
2018-11-12 10:24:53.004 [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key astro:moon:local in ManagedThingProvider, because it does not exists.
and it was pissing me off. There is no problem with the warning and the system worked fine. Rules where being triggered with Channel 'astro:sun:local:set#event' triggered START
etc
The root cause of the WARN was the following:
I have set manually in my $OPENHAB_CONF/services/runtime.cfg
the i18n locale settings (you can also set them in PaperUI -> Configuration -> System -> Regional Settings)
org.eclipse.smarthome.core.i18nprovider:language=en
org.eclipse.smarthome.core.i18nprovider:region=GR
org.eclipse.smarthome.core.i18nprovider:measurementSystem=SI
org.eclipse.smarthome.core.i18nprovider:timezone=Europe/Athens
org.eclipse.smarthome.core.i18nprovider:location=xx.xxxx,yy.yyyy,zz
and in $OPENHAB_CONF/things/Astro.things
astro:sun:local "Local Sun" @ "Astro" [geolocation="xx.xxxx,yy.yyyy,zz", interval=60]
astro:moon:local "Local Moon" @ "Astro" [geolocation="xx.xxxx,yy.yyyy,zz", interval=60]
Of course, the geolocation (<latitude>,<longitude>,[<altitude in m>]
) was different
This caused OH2 to try to update the 2 Astro Things (sun + moon) with the geolocation info from the i18n locale… BUT this cannot be done since I have a manually defined (not a Managed) Thing.
Synchronizing the geolocation in both files got rid of the WARN (which should go to DEBUG if you ask me )
And now, I get nice and clean:
2018-11-12 10:43:06.491 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2018-11-12 10:43:06.516 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled Positional job astro:moon:local every 60 seconds
2018-11-12 10:43:06.540 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:moon:local
2018-11-12 10:43:06.542 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled Positional job astro:moon:local every 60 seconds
2018-11-12 10:43:07.676 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2018-11-12 10:43:07.687 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 60 seconds
2018-11-12 10:43:07.724 [INFO ] [thome.binding.astro.internal.job.Job] - Scheduled Astro event-jobs for thing astro:sun:local
2018-11-12 10:43:07.729 [INFO ] [ding.astro.handler.AstroThingHandler] - Scheduled Positional job astro:sun:local every 60 seconds
(no warn after the scheduling)
Should I open an issue to move WARN to DEBUG ? @Kai (or maybe it is actually better to keep this ManagedProvider warning?)
The WARN doesn’t give any info on which parameter it is trying to set. That would be useful.
Ps: Relevant: Locale Question (runtime.cfg)
Ps2: You won’t see this WARN if you use only PaperUI since if you update the geolocation in your Regional Settings, your Astro (managed) Thing will be updated auto-magically as well.