Xiaomi Gateway 3 integration stop working, not show temp.& hum. sensors anymore

Hello!
Custom integration Xiaomi Gateway 3: This morning all my xiaomi BLE temp. and Hum. sensors are down, UNAVAILABLE.
I checked:

  • Gateway is online, work normaly
  • gateway IP is correct
  • on my app Xiaomi Home all sensors work ok, show temperature and humadity
  • restart gateway, router, home assistant.
    without success

After reading the integration on github, I noticed that I have a problematic version 1.4.6_0043

On my phone, Xiaomi home i dont find log for update, only see this is latest verison.
I don’t know if gateway has been updated todaj morning, I don’t know which version I had yesterday on Xiaomi hub 3, when everything was working fine

I find log in home assistant :

2022-11-25 16:46:45.597 ERROR (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.5.9 | Can’t patch Bluetooth utility

2022-11-25 16:46:45.600 WARNING (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.5.9 | Firmware 1.4.6_0043 support is very limited!

2022-11-25 16:46:57.210 ERROR (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.5.9 | Can’t patch Bluetooth utility

2022-11-25 16:46:57.224 WARNING (MainThread) [custom_components.xiaomi_gateway3.core.gateway] 192.168.5.9 | Firmware 1.4.6_0043 support is very limited!

192.168.5.9 | Firmware 1.4.6_0043 support is very limited!

16:46:57 – (WARNING) Xiaomi Gateway 3 (custom integration) - message first occurred at 15:39:02 and shows up 3 times

192.168.5.9 | Can’t patch Bluetooth utility

16:46:57 – (ERROR) Xiaomi Gateway 3 (custom integration) - message first occurred at 15:39:02 and shows up 3 times

Let me say that everything has been working normally for 1 year now.
When the power went out, I just had to set the correct ip address for the xiaomi hub 3

I have 15 TH sensors and now have big problem, my automations are no longer working

Can you please help me ?

Thankyou !

5 Likes

I have the same problem. Yesterday every device went offline in the Xiaomi app (and HA) for ~10 minutes, there must have been some problem with the EU server. After it came back everything were fine for 2 hours but since then all my ble device are offline. The fw on the hub is the recommended stock v1.5.0_0102.

3 Likes

I update my Xiaomi gateway 3 to firmware v1.5.0_0102, but still all sensor UNAVAILABLE. No error in HA…

1 Like

now , your sensors work or not?

Same problem in France
Server UE

2 Likes

The same here in Austria. Server: de Gateway FW: custom v1.5.0_0102.

2 Likes

Everything working except ble sensors. HA can recognize but the states are unavailable.

2 Likes

Same here in italy, ZB Devices working as usual, ble suddenly stop working. Edit: FW version 1.5.0_0102

2 Likes

Same for me here
N.

2 Likes

Still nothing works how to solve the issue ???
All reconfigure to china server ?

Does anyone have information about what is wrong and when the problem will be fixed?

It looks like AlexxIT doesn’t have time to deal with this, he said in previous issues on github that he is involved in many other projects. Would be nice to have a BLE - MQTT bridge on the gateway, it would be much more reliable.

Same issue.
I even removed the integration from HA, reset, started again but unfortunately no solution.
And now I found this, seems to sort of a general issue.

using
Home Assistant 2022.10.3
Frontend 20221010.0 - latest
Xiaomi GW3, firmware 1.5.0_0102.
Zigbee OK.

All sensors working in the APP, however I find the app really slow to show historical data.

1 Like

I managed to solve it.

It seems the integration has nothing to do with the issue, it is a xiaomi app/server problem.

The app appeared to be updating states but it was using the phone’s bluetooth connection, the gateway wasn’t seeing the devices even though it was visible in the bluetooth child devices.

Try these steps:

  1. Remove the device from Xiaomi Home app
  2. Remove the battery from the device (may not necessary)
  3. Add it to the app as usually (top-right + sign - Add a device)
  4. In HA select the HUB from the integration page and choose the “Gateway reboot” command (may not necessary)
  5. Restart HA (may not necessary)
  6. Wait 5-10 minutest (or a bit more) until the device broadcasts a BLE message. After that, the states will be updated in HA.

You can check if the device connected to the gateway (not through the phone) by turning off the bluetooth on the phone and choose the device in the app. If the history or the current values are shown, it’s connected throught the gateway. Before these steps there was no data.

1 Like

In my case all in the app is working also the connection trough the Gateway. Loading of history is extremely slow and sometimes not working either.

Just also added an extra sensor (have spares) and in the app it is working but still not showing up in HA. (that was 30 minutes ago)

How do you reboot the hub from the integration page, don’t have such an option either. or looking over it (do have a reload but does nothing.

something will be on it. I connected 1 sensor directly to the HA via bluetooth, but if you want connect you need bindkey. If you want to get the key, sensor is no longer available ob xiaomi hub, so you need to pair again. And now temperature value show in HA. I found this out quite by accident. I have 23 sensors and it’s a lot of work. I will probably connect everything locally via bluetooth, or via esp32. I hate clouds and servers.

If the history is slow that means the phone trying to connect to the device directly via bluetooth so it’s not connected to the hub even if it’s there in the bluetooth child devices.

If you can’t reboot it manually you can do it like this:

  1. Setting
  2. Devices & Services
  3. under Xiaomi Gateway 3 click on the ip of the HUB
  4. click on “(…) devices”
  5. click on the HUB
  6. there is a “Command” dropdown menu where you can select the “Gateway reboot”

There may be a simpler solution, but this is what I know.

I suggest you to start the above steps from my previous comment from the beginning and go in order.

thanks for the extra info and found the reboot :slight_smile:
And removing and adding does seems to do the trick.
Adding a new device does not get it correctly. Really strange behaviour.
Reboot is not needed apparently but it will also not harm anything.

From the sensor that I removed and added again:
I get temperature, no humidity (sensor is available but no update) and I lost the battery info!

1 Like

I can confirm too.

  • Removed sensors from XIAOMI HOME
  • Added sensors to XIAOMI HOME
  • Reboot xiaomi gateway 3
  • restart HA
    After 20-30 min, show all temp. and hum.
    Update sensor work.

To improve on the “fix” proposed above, I was able to get the sensors to start reporting values by:

  1. Delete the Temperature sensor device from the Mi Home app
  2. Re-add the Temperature sensor device

Without rebooting either Xiaomi Gateway 3 or HA, the sensor values start showing up in HA again after a delay of 15 - 30 minutes.

Interestingly I only had to do it for the square Temperature & Humidity sensors, my round Temperature & Humidity sensor did not experience this missing metrics issue.

I had also the same issue with both Xiaomi mobile application and HA. It started ~3 days ago
.
I used the method of deleting and adding again the THS and it seems to work. For some sensors I had to remove the battery and re-execute the del/add trick

Thanks for the solution