Finally, I got rid of this AbstractManagedProvider warning

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 :slight_smile:

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 :stuck_out_tongue:)

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.

3 Likes

thx for your hint. When synchronizing Paper-UI and owm.things and restart the Warning was gone.(I remembered, i had the same problem too in the Astro-Binding, but forgot it.).
But it nearly takes half an hour 'til Things came online in Paper-UI

.

But the other errors still remain. And when making a change in the Thing-File (only insert or remove a space) an error occurs (see above) and the Things changed to offline, like here:

grafik

:thinking:

can you post the following info:

From the console (I am afraid that you have 2 OWM bundles installed…maybe from a previous *.jar installation):

openhab> bundle:list -s |grep openweathermap
217 x Active   x  80 x 0.10.0.201811171951    x org.eclipse.smarthome.binding.openweathermap

and your owm.things file

thx for your help. The console says:

openhab> bundle:list -s | grep -i openweathermap
224 x Active   x  80 x 0.10.0.oh240M6         x org.eclipse.smarthome.binding.openweathermap
openhab>

So it seems as it “nearly” look like yours. (I’m on OH 2.4 M6)

owm.things:

Bridge openweathermap:weather-api:api "OpenWeatherMap Account" [apikey="my-key 1-32", refreshInterval=30, language="de"] {
    Thing weather-and-forecast local "Local Weather And Forecast" [location="12.34567,8.123456,102", forecastHours=18, forecastDays=0]

}

see there

As you told above i adjusted the locationsettings in the owm.things file as they are in my paper-ui. And now no more Warning-Message " [WARN ] [mon.registry.AbstractManagedProvider] - Could not update element with key openweathermap:weather-and-forecast:api:local in ManagedThingProvider, because it does not exists." is spit out by the logger.

I think what one can see in Paper-UI is The Bridge (OpenWeatherMap Account) and the Thing inside (Local Weather and Forecast).
At the moment both are online:
grafik

What i learned from @cweitkamp is, that the parameter “forecastDays” in Things-File has to be set to zero, although i only have a free account.

But i think there are other problems too with the Binding. When making changes (e.g. forecastHours=24) in the Things-File the following Error-Messages are logged:

2018-11-22 21:02:21.023 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'owm.things'
2018-11-22 21:02:21.363 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler@e12e9d': Duplicate channels openweathermap:weather-and-forecast:api:local:forecastHours21#time-stamp
java.lang.IllegalArgumentException: Duplicate channels openweathermap:weather-and-forecast:api:local:forecastHours21#time-stamp
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:151) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:147) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannel(ThingBuilder.java:74) ~[?:?]
	at org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler.initialize(OpenWeatherMapWeatherAndForecastHandler.java:157) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:208) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh240M6]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh240M6]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
	
2018-11-22 21:04:23.560 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'owm.things'
2018-11-22 21:04:23.720 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler@e12e9d': Duplicate channels openweathermap:weather-and-forecast:api:local:forecastHours24#time-stamp
java.lang.IllegalArgumentException: Duplicate channels openweathermap:weather-and-forecast:api:local:forecastHours24#time-stamp
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:159) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:151) ~[?:?]
	at org.eclipse.smarthome.core.thing.util.ThingHelper.ensureUniqueChannels(ThingHelper.java:147) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.builder.ThingBuilder.withChannel(ThingBuilder.java:74) ~[?:?]
	at org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler.initialize(OpenWeatherMapWeatherAndForecastHandler.java:157) ~[?:?]
	at org.eclipse.smarthome.core.thing.binding.BaseThingHandler.thingUpdated(BaseThingHandler.java:208) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:?]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:?]
	at org.eclipse.smarthome.core.internal.common.AbstractInvocationHandler.invokeDirect(AbstractInvocationHandler.java:153) [101:org.eclipse.smarthome.core:0.10.0.oh240M6]
	at org.eclipse.smarthome.core.internal.common.Invocation.call(Invocation.java:53) [101:org.eclipse.smarthome.core:0.10.0.oh240M6]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]

After that the owm-Thing goes to unknown
grafik

later to “offline” and after half an hour or later it goes online again (I hope so - at the moment it’s unknown)

i seem to have the same problem …

openhab> bundle:list -s |grep openweathermap
213 x Active   x  80 x 0.10.0.oh240           x org.eclipse.smarthome.binding.openweathermap
openhab>
Bridge openweathermap:weather-api:api "Local OpenWeatherMap Account" [apikey="xxxxxxxxxxxxxxxxxxxx", refreshInterval=10, language="de"] {
    Thing weather-and-forecast local "Local OpenWeather And Forecast" [location="49.02,12.1", forecastHours=3, forecastDays=5]    
}
2019-01-06 15:20:45.286 [ERROR] [nal.common.AbstractInvocationHandler] - An error occurred while calling method 'ThingHandler.thingUpdated()' on 'org.eclipse.smarthome.binding.openweathermap.internal.handler.OpenWeatherMapWeatherAndForecastHandler@1a52ccf': Duplicate channels openweathermap:weather-and-forecast:api:local:forecastToday#time-stamp
2019-01-06 15:21:24.007 [me.event.ThingUpdatedEvent] - Thing 'openweathermap:weather-and-forecast:api:local' has been updated.

2019-01-06 15:21:24.067 [me.event.ThingUpdatedEvent] - Thing 'openweathermap:weather-and-forecast:api:local' has been updated.

2019-01-06 15:21:24.163 [hingStatusInfoChangedEvent] - 'openweathermap:weather-and-forecast:api:local' changed from UNKNOWN to ONLINE

2019-01-06 15:21:24.176 [vent.ItemStateChangedEvent] - Weather_Local_Measurement changed from 2019-01-06T14:20:00.000+0100 to 2019-01-06T14:56:00.000+0100

2019-01-06 15:21:24.182 [hingStatusInfoChangedEvent] - 'openweathermap:weather-api:api' changed from ONLINE to OFFLINE

2019-01-06 15:21:24.186 [hingStatusInfoChangedEvent] - 'openweathermap:weather-and-forecast:api:local' changed from ONLINE to OFFLINE (BRIDGE_OFFLINE)

2019-01-06 15:21:24.190 [vent.ItemStateChangedEvent] - Weather_Local_Current_Condition changed from Überwiegend bewölkt to Wolkenbedeckt

2019-01-06 15:21:24.195 [vent.ItemStateChangedEvent] - Weather_Local_Current_Temperature changed from 3.52 °C to 3.16 °C

2019-01-06 15:21:24.200 [vent.ItemStateChangedEvent] - Weather_Local_Current_Pressure changed from 1028.0 hPa to 1027.0 hPa

2019-01-06 15:21:24.206 [vent.ItemStateChangedEvent] - Weather_Local_Current_Humidity changed from 93 % to 99 %

2019-01-06 15:21:24.215 [vent.ItemStateChangedEvent] - Weather_Local_Current_WindSpeed changed from 2.1 m/s to 1.5 m/s

2019-01-06 15:21:24.218 [vent.ItemStateChangedEvent] - Weather_Local_Current_WindDirection changed from 250.0 ° to 260.0 °

2019-01-06 15:21:24.224 [vent.ItemStateChangedEvent] - Weather_Local_Current_Cloudiness changed from 56 % to 90 %

2019-01-06 15:21:24.238 [vent.ItemStateChangedEvent] - Weather_Local_Temperature_LastUpdate changed from 2019-01-06T15:11:22.235+0100 to 2019-01-06T15:21:24.140+0100

i still get updates though and its working as intended. in the paper ui, it claims to be offline as well