XiaomiGateway3 icon indicating copy to clipboard operation
XiaomiGateway3 copied to clipboard

Can't patch Bluetooth utility with v2.0.6 and latest HA

Open Sol1in opened this issue 3 years ago • 14 comments

Hello, starting from upgrade to v2.0.x of Xiaomi Gateway, mesh groups stopped working properly. It seems that HA/XG3 cannot get state of the mesh group. I can turn on the light and it works, but almost instant it becaming looks like it is off in HA (but in fact the light is still on). If I switching it on and off fast - mesh-light turn off. No issues for exact lamps - only for mesh groups. I have several XG3 in my configuration, was tried to turn off Bluetooth Mesh Gateway on all but one but with no any changes.

I found this think in logs:

Logger: custom_components.xiaomi_gateway3.core.gateway
Source: custom_components/xiaomi_gateway3/core/gateway/base.py:77
Integration: Xiaomi Gateway 3 ([documentation](https://github.com/AlexxIT/XiaomiGateway3), [issues](https://github.com/AlexxIT/XiaomiGateway3/issues)) 
First occurred: 00:20:03 (2 occurrences) 
Last logged: 00:23:52

192.168.0.206 | Can't patch Bluetooth utility

There were no issues with old version of XG3 module. I upgrade XG3 to newest firmware but with no changes in described behaviour.

Sol1in avatar Feb 22 '22 07:02 Sol1in

Are you sure you are using a supported gateway firmware?

AlexxIT avatar Feb 22 '22 08:02 AlexxIT

I'm having the same issue after upgrading with the latest modded firmware mgl03_1.5.4_0052_mod20220221

itourinan avatar Feb 22 '22 09:02 itourinan

Why did you update the firmware?

zvldz avatar Feb 22 '22 09:02 zvldz

I saw in the HA log that the firmware I was using was limited so I updated it to the latest version.

After that error I downgraded it to v1.5.0_0102 and it's fine now.

itourinan avatar Feb 22 '22 09:02 itourinan

So I downgraded each of 4 XG3 to v1.5.0_0102, but still some of the BT Mesh Groups remain unavailable (random on each restart). Looks like HA is trying to get info only through one single XG3 and if the group is unavailable on it - it became unavailable in HA (in MiHome or Yeelight App it is still working). Seems like a bug.

Sol1in avatar Feb 24 '22 13:02 Sol1in

I have the same problem

2022-02-27 20:15:08  DEBUG    main          SysInfo: {'installation_type': 'Unknown', 'version': '2022.2.5', 'dev': False, 'hassio': False, 'virtualenv': False, 'python_version': '3.9.9', 'docker': False, 'arch': 'armv6l', 'timezone': 'Europe/Rome', 'os_name': 'Linux', 'os_version': '5.10.63+', 'user': 'homeassistant'}
2022-02-27 20:15:19  ERROR    base          192.168.1.52 | Can't patch Bluetooth utility
-----
2022-02-27 20:51:39  ERROR    base          192.168.1.52 | Can't patch Bluetooth utility

------------------
rlxlinux login: admin
Lumi Linux version 3.0
  _               _    _  _
 | |             |_|  | ||_|
 | | _  _  _____  _   | | _ ____  _   _  _  _
 | || || ||     \| |  | || |  _ \| | | |\ \/ /
 | || || || | | || |  | || | | | | |_| |/    \
 |_|\____||_|_|_||_|  |_||_|_| |_|\____|\_/\_/

For further information check:
https://www.aqara.com


BusyBox v1.22.1 (2021-12-31 12:23:22 CST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

======================================================
FIRMWARE........: 1.5.4_0052 #20220221
IP..............: 192.168.1.52
MAC.............: 54:EF:XX:XX:XX:XX
TOKEN...........: XXXXX
DID.............: XXXXX
KEY.............: XXXX

maury77 avatar Feb 27 '22 19:02 maury77

I have the same problem,too.

hsu32 avatar Jun 20 '22 08:06 hsu32

After that error I downgraded it to v1.5.0_0102 and it's fine now.

@itourinan Can you direct me to the instructions for downgrading the firmware?

nayaabkhan avatar Jul 19 '22 05:07 nayaabkhan

@AlexxIT any hope to add support for 1.5.4_0052? Or some easy to follow instructions to downgrade to v1.5.0_0102? Please

NicusorFlorinBaluta avatar Jul 25 '22 07:07 NicusorFlorinBaluta

I was successfully able to downgrade to v1.5.0_0102 using instructions here: https://github.com/zvldz/mgl03_fw/tree/main/firmware

nayaabkhan avatar Jul 25 '22 07:07 nayaabkhan

thanks man, i will try the same !

NicusorFlorinBaluta avatar Jul 25 '22 07:07 NicusorFlorinBaluta

After setting up the integration with HA, make sure to lock the firmware to prevent reflexive upgrading :)

Screenshot 2022-07-25 at 1 27 01 PM

nayaabkhan avatar Jul 25 '22 07:07 nayaabkhan

unfortunately i also did the stupid thing of upgrading the firmware of the window sensors so after downgrading the gateway, the sensors aren't picked up anymore

NicusorFlorinBaluta avatar Jul 25 '22 08:07 NicusorFlorinBaluta

@NicusorFlorinBaluta Support for 1.5.4 will not be available in the near future. Lots of changes. I don't have time for it yet. And there's not much of a profit in maintaining it.

AlexxIT avatar Jul 25 '22 18:07 AlexxIT

I tried a lot of things to lock the firmware, but it always autoupdate to 1.5.4 and stop working, and I downgrade manually, but now the BLE keeps failing even after the downgrade.

gartz avatar Jan 06 '23 02:01 gartz