Xiaomi Binding shows all things twice, lots of duplicates


I setup my Xiaomi Things file as described in the documentation but I noticed that all things show up twice in the Paper UI things list. All sensors and also the gateway itself shows twice.

I cannot find a mistake in my things file and all things show up as ONLINE so apparently it works.
How can I get rid of the duplicates? Or why are they there?

Here is an example of a waterleak sensor.
In the things file I gave it the name “Water Leak Sensor #3.1” and one of the things has this name, then there is the duplicate with the same ID 158d0002334485 with a generic name.

I use openHAB 2.4.0 Release Build

Check PaperUI and make sure you do not have simple mode turned on. If so turn it off and delete the your duplicates.

If the duplicates do not get removed look in /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.thing.link.ItemChannelLink.json and make sure there isn’t a Link hanging around.

Also, for items check: /var/lib/openhab2/jsondb/org.eclipse.smarthome.core.items.Item.json

If you need to edit these files make sure to stop OH first.

I checked PaperUI and under “Configuration -> Item Linking” Simple Mode is OFF, I never touched this setting…
The two files you mentioned are both empty in my case, they only contain “{}”

I deleted the duplicates now manually one by one, hopefully they will not come back.

What I noticed is that the channel of those things differ.
The things I defined in my things file have the ID of the bridge included in the channel, you can also see it in the screenshot, the generic ones do not have the bridge ID in the channel:


Does this give any clue?

And another update, I just restarted the OpenHab2 server and the duplicate Water Leak Sensor appears again in the Inbox…
Simple Mode is OFF and the thing is already present in my things list…although with another channel as I mentioned.

That is good.

It’s recommended to create the Thing via PaperUI for version 2 bindings and use files for items. Try deleting the Things files, use PaperUI for the Thing and use files for your items.

This is the first time I hear about this, all binding documentations describe how to create things files…
I now removed my things and added all gateways and devices only via Paper UI :+1:

Most of the documentation gives both examples for those that prefer files only but looks like Xiaomi doc’s need updating. :upside_down_face:

Glad you got it working. :+1:

If the duplicates are gone please click the square box on the post that provided the solution to mark the topic as solved.


1 Like