Avmfritz Binding - Getting warnings on existing channels and things on startup [Solved]

Hi all,

I am getting the warnings below in my openhab.log and I assume that this might be due to duplicate configuration approaches. I have normally everything defined in the things and items files but due to configuration issues in the beginning with the new devices, I also used the discovery mode in the PaperUI. Maybe there are now two sets of configurations - one set in the OpenHAB repositories which was stored there by the discovery method via PaperUI and now the configuration set in the config files.

But this is just my guess!!!

Probably I am totally wrong and someone of you knows better and can guide me how to clean up my configuration to remove these entries. But I would like to keep the config files method :wink:


...

11:55:50.236 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ItemChannelLink" with key "aktMShFkDBGstat -> avmfritz:HAN_FUN_CONTACT:arrakis:113240349263_1:contact_state". It exists already from provider "GenericItemChannelLinkProvider"! Failed to add a second with the same UID from provider "ManagedItemChannelLinkProvider"!
11:55:50.238 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ItemChannelLink" with key "aktMShFkDBLstat -> avmfritz:HAN_FUN_CONTACT:arrakis:113240195590_1:contact_state". It exists already from provider "GenericItemChannelLinkProvider"! Failed to add a second with the same UID from provider "ManagedItemChannelLinkProvider"!
11:55:50.239 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ItemChannelLink" with key "aktMShFkOGBstat -> avmfritz:HAN_FUN_CONTACT:arrakis:113240419288_1:contact_state". It exists already from provider "GenericItemChannelLinkProvider"! Failed to add a second with the same UID from provider "ManagedItemChannelLinkProvider"!
11:55:50.241 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ItemChannelLink" with key "aktMShFkDBRstat -> avmfritz:HAN_FUN_CONTACT:arrakis:113240563561_1:contact_state". It exists already from provider "GenericItemChannelLinkProvider"! Failed to add a second with the same UID from provider "ManagedItemChannelLinkProvider"!

...

11:55:51.488 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ThingImpl" with key "avmfritz:HAN_FUN_CONTACT:arrakis:113240563561_1". It exists already from provider "GenericThingProvider"! Failed to add a second with the same UID from provider "ManagedThingProvider"!
11:55:51.491 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ThingImpl" with key "avmfritz:HAN_FUN_CONTACT:arrakis:113240201078_1". It exists already from provider "GenericThingProvider"! Failed to add a second with the same UID from provider "ManagedThingProvider"!
11:55:51.495 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ThingImpl" with key "avmfritz:HAN_FUN_CONTACT:arrakis:113240419288_1". It exists already from provider "GenericThingProvider"! Failed to add a second with the same UID from provider "ManagedThingProvider"!
11:55:51.496 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ThingImpl" with key "avmfritz:HAN_FUN_CONTACT:arrakis:113240349263_1". It exists already from provider "GenericThingProvider"! Failed to add a second with the same UID from provider "ManagedThingProvider"!
11:55:51.499 [WARN ] [core.common.registry.AbstractRegistry] - Cannot add "ThingImpl" with key "avmfritz:HAN_FUN_CONTACT:arrakis:113240195590_1". It exists already from provider "GenericThingProvider"! Failed to add a second with the same UID from provider "ManagedThingProvider"!
...

Thanks for any advice!

Cheers
Justus

After removing the duplicate items/things from PaperUI uniinstall the binding then reinstall it. After that stop OH and clean the cache using the following commands:

sudo systemctl stop openhab2

sudo openhab-cli clean-cache

sudo systemctl start openhab2

EDIT: If needing to clean the cache and using Docker you will need to use the following:

stop docker container

delete the content of cache and tmp file (only the content not the actual file) located in:

openhab/userdata/cache and openhab/userdata/tmp

start docker container

You can also see this link:

1 Like

Things work like a charm but the channel links are still there. I am running OH as a Docker container hence the start/stop and cache cleaning commands do not work. Probably this is the reason … I will have to figure out first how to clean the cache in a Docker environment before I can tell if the channel links also disappear using this method.

I have no experience with docker but @rlkoshak uses docker and I’m sure he can give you some good advice.

Found this tutorial from Rich:

I stopped the Docker container and delete the cache and the tmp directories on the persistent storage and will restart now …

Guess docker uses the old school way.:smirk:

sudo rm -rf /var/lib/openhab2/cache/* && sudo rm -rf /var/lib/openhab2/tmp/*

After this I could remove the channel links and restart and now the warnings are gone!

Problem solved. Thanks for supporting me!!!

Awesome, glad it’s working.:+1:

If you would, please mark the topic solved by clicking the square box on the post that provided the solution and edit the title to start with [Solved].

Thanks

Done but please add to your post that the stop / delete cache / start looks different and works:

stop docker container

delete all data below openhab/userdata/cache and openhab/userdata/tmp

start docker container

1 Like

Done.:+1:

Thanks

Sorry to bother you again … something got wrong with the bold marking in your post :wink:

Docker is wholly encapsulated. There is no way to execute openhab-cli unless you are inside the container itself. Since you really are not supposed to be going into a container in the first place so openhab-cli isn’t installed in the container.

Hi Rich,

that is why I asked H102 to update his post how to clean the cache in the docker environment :wink:

I know, it has something to do with the /'s and I can’t change it.:roll_eyes:

Mmmh, it worked in my post …

… try …

** delete all data below ** ’ first_code_part ’ ** and ** ’ other_code_part ’

The spaces are on purpose to show the asterikses and it is the other ’ ’ than the one used …