AlexxIT / XiaomiGateway3

Home Assistant custom component for control Xiaomi Multimode Gateway (aka Gateway 3), Xiaomi Multimode Gateway 2, Aqara Hub E1 on default firmwares over LAN
https://github.com/AlexxIT/Blog
MIT License
2.42k stars 340 forks source link

BLE don't work in ZHA mode (component v0.8) #94

Closed Sleinous closed 3 years ago

Sleinous commented 3 years ago

These Xiaomi temperature and humidity sensors have been working fine since early releases of this integration. However end of last week all 4 thermometers dropped off the radar in Home Assistant and i'm unable to add them back in now (even with the new method of re-adding Gateway & token etc)

All 4 thermometers (BLE LYWSDCGQ/01ZM) are correctly detected in Mi Home app and also seen by Xiaomi Gateway 3 BLE Mesh

I didn't notice the exact date these stopped working so not sure if it's releated to a recent update of inetgration, anyone else experiencing this issue now ?

(Xiaomi Gateway 3 FW is still 1.4.6_0012)

AlexxIT commented 3 years ago

You can enable debug mode and show logs.

Sleinous commented 3 years ago

This is all i'm seeing in Xiaomi Gateway 3 logs each time :

2020-11-02 16:08:37 DEBUG gateway3 192.168.2.81 | Prepare Gateway 2020-11-02 16:08:37 DEBUG gateway3 192.168.2.81 | Run socat 2020-11-02 16:08:45 DEBUG main Loaded from MiCloud 10 devices

AlexxIT commented 3 years ago

Have you later something?

Sleinous commented 3 years ago

Unfortunately not, still same three lines I double checked and all 4 thermometers are showing up in BLE Mesh in Mi Home app, I manage two other HA installs in separate locations and both of these are down too but I don't even see the thermometers in BLE mesh anymore on Mi Home so no surprises there (seems to be a separate issue)

Sleinous commented 3 years ago

Issue identified : Fully uninstalled ZHA & Xiaomi Gateway 3 from HACS, reboot, reinstalled 0.7.0, all good again. Have attempted upgrade to 0.8.1 now issue reappears Not sure what happened but am now going to try a full install straight to 0.8.1

SpeedBlack commented 3 years ago

Hello all,

Thanks Sleinous ! I have exactly the same problem! But as I started with this integration I didn't understand what was wrong! I uninstalled version 0.8.0 and installed 0.7.0 and it works.

Home Assistant : 0.117.1 Gateway : v1.4.6_0012

Sleinous commented 3 years ago

No worries, i'm currently back tracking to try & help to see when this issue appeared - I just crossed off 0.8.0 & 0.8.1, am now testing 0.7.2

EDIT : Issue first appeared in 0.8.0 (I just installed 0.7.2 and can see my BLE temp & humidity sensors again) I believe the Firmware update lock appeared in 0.8.0, didn't notice any other changes so to speak - unfortunate because the FW lock was very useful

AlexxIT commented 3 years ago

Sorry. My bad. With component v0.8.0-0.8.1 in ZHA mode - BLE don't work! Will fix it in next release.

Sleinous commented 3 years ago

No worries :)

SpeedBlack commented 3 years ago

No worries too :). Thanks for your job !!

froggyfly commented 3 years ago

Emmm.... I'd like to say, My BLE at ZHA mode works good now, Like Sleinous and SpeedBlack said, BLE at first didn't work after upgraded to version 0.8 on ZHA mode, Try to restart and reinstall, no used. I'm not sure which operations let me solve this problem, I tried to recall the last operation, maybe this can be useful,

I first deleted gateway3 and Zha integration, Restart the homeassistant and gateway, Added gateway3 integration at normal mode, BLE device work well. Then I delete this integration, I add it to Zha mode again, Add the Zha integration, the third-party ZigBee devices that have been added before will appear, and the BLE device work.

I'm not sure it's completely useful, but my gateway is running in V 0.8, Zha mode, and ble devices are running normally

Sleinous commented 3 years ago

Fixed in 0.9.2, issue can be closed Thanks again for speedy fix @AlexxIT