Xiaomi Mi Smart Home Binding: Bridge goes offline in OH3 M2

Thanks for the hint - it works fine for me now. However I use the MiHome Device ID instead of the MAC adress - also seems to work permanently so far

thanks! this worked also for me. I could not type in the thing configuration window, so I included one extra line in the code in the configuration section, now it looks like:

configuration:
ipAddress: 192.168.1.61
serialNumber: 286cxxxxxxxx
port: 9898
key: CA5…

3 Likes

Thanks a lot for the hint but it’s still going offline after exactly 5 minutes in my case… Do you know if there is still work being done on the binding to find the root cause?

Sorry, I don’t know if anybody is working on the binding. In fact, in OH2 it was also needed to have the MAC in the Thing definition. Just for reference, find the complete Code, maybe it helps:
UID: mihome:bridge:XiaomiBridge
label: Xiaomi Mi Smart Home Bridge
thingTypeUID: mihome:bridge
configuration:
ipAddress: 192.168.1.61
serialNumber: 286cxxxxxxxx
port: 9898
key: CA5…

1 Like

Is it working for you in OH3 ?

yes, since I included the serial, it works normal, no disconnections

1 Like

Update : after 24h it did not lost its connection :slight_smile:
Thanks a lot for your help!

1 Like

Hi together,

I also use the Mi Home Binding on OP3 and after 5min. the connection from the Bridge goes offline.

I have configured the Brigde as follow:
UID: mihome:bridge:412b…
label: Xiaomi Home Bridge - WZ
thingTypeUID: mihome:bridge
configuration:
ipAddress: 192.168.178.21
location: Wohnzimmmer
serialNumber: 78…-…
port: 9898
key: F87818…

2021-03-10 08:17:31.412 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘mihome:bridge:412bdfcdbb’ changed from UNINITIALIZED to INITIALIZING
2021-03-10 08:17:32.474 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘mihome:bridge:412bdfcdbb’ changed from INITIALIZING to ONLINE
2021-03-10 08:27:03.313 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘mihome:bridge:412bdfcdbb’ changed from ONLINE to OFFLINE
2021-03-10 09:00:08.370 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘mihome:bridge:412bdfcdbb’ changed from OFFLINE to ONLINE
2021-03-10 09:05:08.462 [INFO ] [ab.event.ThingStatusInfoChangedEvent] - Thing ‘mihome:bridge:412bdfcdbb’ changed from ONLINE to OFFLINE

The Workaround with Serial did not work for me. Can anybody help

Have you tried the workaround I suggested, i.e. backup OH3, remove it, install OH2.5 and then re-install OH3 over the existing 2.5 version?

Also, I know this is not really helpful, but in the meantime I have replaced the Xiaomi Gateway with the DeCONZ gateway and binding - much more stable and besides also replaced two Hue bridges I had…

Hi Pezzi42,

not this workaround I did not try.
I have a complete new OP3 Installation, which is running good instead of Xiaomi.
Also no DeCONZ.

I have a HUE Bridge, but not sure what you mean. Can I use the HUE bridge with Xiaomi Plugs ans Sensors?

note:
I have in parallell an openhabian (RasPi) runnning V. 2.5
Can is extract the config from there?

The DeConz is an entirely new piece of hardware which you have to purchase - and this hardware enables you to use both Hue lights and Xiaomi sensors with just one piece of hardware.

But if you have a Raspi running 2.5, you can install the Xiaomi binding there and then use the remote binding to connect the oh3 installation to the 2.5 installation - that worked well for me too, in the beginning

Okay thanks…
Unfortunatly Did not work for me.

Do anyone know the reason why it goes offlne after exact 5 min?

Back again with some news and findings.

In the documentation there is following sentences:

At least every 10 seconds you should see a message coming in from the gateway which looks like {"cmd":"heartbeat","model":"gateway","sid":"xxx",“short_id”:“0”,“token”:“xxx”,“data”:"{"ip":"xxx\"}"}

I have tried with OP2.5 and OP3.1.0

On the OP2.5 every 10 seconds I got this line.
On OP3 it comes up only, if I activate the Xiaomi Bridge.

So I believe something with the Server is maybe not working. wrong IP Settings Multicast ect.
Do anyone have an idea. I think there is no heatbeat, and after 5min it will go offline.
But I do not know why the Bridge is not sending the heatbeat to OP3

I already read the link - 87211
But I do not see any helpful ideas

Hi,

I thought I’d share this. I had the same problem in OH3 with one of the 3 Xiaomi gateways I run (and it was always perfectly visible in OH2).
I had tried the suggestions listed above but finally realized I made the mistake of trying the MAC address as Serial Number, keeping the “:” of the MAC address…

Removing the colons (":") fixed my problem.

I mention it in case someone else would have been doing the same “mistake”… Note that the 2 other gateways are perfectly fine in OH3 without a serial number.

3 Likes

Thank you guys for the help, setting the MAC solved my issue as well!

1 Like

Thanks it worked. Mac address whithout : in Serial Number of the bridge. :+1:

My new install is on Openhab 3.2.0

It still has this issue, where adding the serialNumber seems to fixed it.

We should report it as a bug. I will see what I can do in github.

Thanks,
Joe

1 Like

This doesn’t work with me unfortunately.
I’m running OH3.2.0-stable and the bridge goes offline every 5mins.
I can’t put in the serialNumber in the GUI directly, that input field is grey with my installation - I put it in “Code” and then it appears in the Thing-configuration in grey:

UID: mihome:bridge:xiaomi
label: Xiaomi  Bridge
thingTypeUID: mihome:bridge
configuration:
  ipAddress: 192.168.xx.yy
  serialNumber: 123456789012
  port: 9898
  key: *****

Do I miss something?

Looks correct to me. Here is my for reference. 2 suggestions:

  1. Maybe not edit the ID when creating the Thing?
  2. lower case the serial number?

Other than that, it looks exactly the same as mine.

2 Likes

Ok. THAT did the trick. I don’t know why, :man_shrugging: but yeah, after

  1. Scan for the gateway
  2. dumb “add as Thing” for it
  3. dumb “add as Thing” for all devices

=> it’s still online after 5mins. Even without pasting the developer key into the bridge-Thing?

so - never rename the Xiaomi-Things… I guess!