[SOLVED] After update, Xiaomi binding and devices removed

Tags: #<Tag:0x00007f6173c24468> #<Tag:0x00007f6173c24288>

Hey all,

Platform information:

  • Hardware: Raspi
  • OS: Raspbian GNU/Linux 9
  • openHAB version: 2.3.0-1

Issue of the topic:
After an update (apt-get upgrade) all of my bindings and items are deleted.

Updated:
perl-base:armhf (5.24.1-3+deb9u2, 5.24.1-3+deb9u3), libraspberrypi-bin:armhf (1.20180313-1, 1.20180417-1), libpackagekit-glib2-18:armhf (1.1.5-2, 1.1.5-2+deb9u1), libraspberrypi-dev:armhf (1.20180313-1, 1.20180417-1), libraspberrypi-doc:armhf (1.20180313-1, 1.20180417-1), linux-libc-dev:armhf (4.9.51-1+rpi3, 4.9.82-1+deb9u3+rpi1), libcurl3:armhf (7.52.1-5+deb9u5, 7.52.1-5+deb9u6), openssl:armhf (1.1.0f-3+deb9u1, 1.1.0f-3+deb9u2), git-man:armhf (1:2.11.0-3+deb9u2, 1:2.11.0-3+deb9u3), raspi-config:armhf (20180228, 20180518), dhcpcd5:armhf (1:6.11.5-1+rpt4, 1:6.11.5-1+rpt5), pi-bluetooth:armhf (0.1.7, 0.1.8), perl-modules-5.24:armhf (5.24.1-3+deb9u2, 5.24.1-3+deb9u3), git:armhf (1:2.11.0-3+deb9u2, 1:2.11.0-3+deb9u3), procps:armhf (2:3.3.12-3, 2:3.3.12-3+deb9u1), packagekit-tools:armhf (1.1.5-2, 1.1.5-2+deb9u1), apache2-data:armhf (2.4.25-3+deb9u3, 2.4.25-3+deb9u4), libprocps6:armhf (2:3.3.12-3, 2:3.3.12-3+deb9u1), raspberrypi-kernel:armhf (1.20180313-1, 1.20180417-1), libperl5.24:armhf (5.24.1-3+deb9u2, 5.24.1-3+deb9u3), raspberrypi-bootloader:armhf (1.20180313-1, 1.20180417-1), bluez-firmware:armhf (1.2-3+rpt4.1, 1.2-3+rpt6), packagekit:armhf (1.1.5-2, 1.1.5-2+deb9u1), libraspberrypi0:armhf (1.20180313-1, 1.20180417-1), gir1.2-packagekitglib-1.0:armhf (1.1.5-2, 1.1.5-2+deb9u1), openhab2:armhf (2.2.0-1, 2.3.0-1), apache2-bin:armhf (2.4.25-3+deb9u3, 2.4.25-3+deb9u4), perl:armhf (5.24.1-3+deb9u2, 5.24.1-3+deb9u3), wget:armhf (1.18-5+deb9u1, 1.18-5+deb9u2), libssl1.1:armhf (1.1.0f-3+deb9u1, 1.1.0f-3+deb9u2), apache2:armhf (2.4.25-3+deb9u3, 2.4.25-3+deb9u4), apache2-utils:armhf (2.4.25-3+deb9u3, 2.4.25-3+deb9u4), curl:armhf (7.52.1-5+deb9u5, 7.52.1-5+deb9u6), libcurl3-gnutls:armhf (7.52.1-5+deb9u5, 7.52.1-5+deb9u6), libssl1.0.2:armhf (1.0.2l-2+deb9u2, 1.0.2l-2+deb9u3

Is this a known error?
What can I do?

Thanks in advance.

Did you declare your bindings in the addons.cfg or on paper ui?

1 Like

On PaperUI

Bindings are easy to recover (you could simply re-install them from PaperUI)
Items are more difficult.

There were no logs that could give us a hint to what could be the root cause?

Check your /var/lib/openhab2/jsondb/ folder (and it’s backup) for files and their contents. This is where Things, Channels and Items are stored when you create then via PaperUI.

I have seen some similar posts and I don’t know what could be the root cause of this behavior.

Thanks for you answer.

After I reinstalled the binding, all works properly again. Some things (not items, sorry for that) have no values, but I think they will appear in some time.

So I think that the update just broke the binding. If you need any logs to clarify the root cause, I glady provide them.

which binding?

In the original post you mentioned that all bindings were uninstalled. One or more?

If you can upload some log info from the time of the upgrade process, it would be useful.

Sorry for the misunderstanding again - Was just the Xiaomi Binding.

In the event.log I see events like (at the update time):

2018-06-04 19:45:56.471 [hingStatusInfoChangedEvent] - 'mihome:gateway:xxx' changed from ONLINE to UNINITIALIZED
2018-06-04 19:45:56.513 [hingStatusInfoChangedEvent] - 'mihome:gateway:xxx' changed from UNINITIALIZED to UNINITIALIZED (HANDLER_MISSING_ERROR)

or


2018-06-04 19:45:58.899 [temChannelLinkRemovedEvent] - Link 'mihome_sensor_magnet_xxx_isOpenAlarmTimer => mihome:sensor_magnet:xxx:isOpenAlarmTimer' has been removed.
2018-06-04 19:45:58.902 [temChannelLinkRemovedEvent] - Link 'mihome_sensor_ht_xxx_humidity => mihome:sensor_ht:xxx:humidity' has been removed.

Nothing found in openhab.log (except the restart of all components).

There is another case where a user experienced the same: “Lost his (Xiaomi) Things” after upgrade to 2.3.

It seems that something causes the Xiaomi binding to get uninstalled during the upgrade to 2.3? but we don’t know why.

This results to Xiaomi related Things to disappear from PaperUI (that’s normal since when you uninstall a binding, its stuff will go away).

The Things (and Channel and Items) info are still stored (in the jsondb) since they are not deleted, so if you re-install the binding they will show up again.

Maybe it’s worth trying to replicate this case to debug it… I will try to test this

From which OH2 release did you upgrade from? (2.2.0 Stable or another?)

1 Like

See my initial post: openhab2:armhf (2.2.0-1, 2.3.0-1) :slight_smile:

1 Like

tried it… Xiaomi binding was kept installed…
I couldn’t replicate this :frowning:

1 Like

If there are any other things I can provide to help, just let me know.

did you use /etc/openhab2/services/addons.cfg during 2.2.0?
If you had configured the bindings = line in there and you allowed apt-get upgrade to deploy the new (empty) addons.cfg: this maybe? is the root-cause

1 Like

Never touched that one =/

1 Like

ok

I give up :slight_smile:

I don’t know what could cause the Xiaomi binding to get uninstalled during the upgrade. I have some ideas but since the solution is simple (re-install it) I won’t try them :stuck_out_tongue:

Glad you got your stuff back !

1 Like

today i cleared the cache & tmp on OH 2.2 and the > Xiaomi MI IO Binding < got uninstalled…

i reinstalled and all was fine again

After update to 2.3 MI IO Binding dissapered. I can not install it back as it is gone from the market.