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 339 forks source link

Not update Xiaomi TH Sensor 2 (LYWSD03MMC) #468

Closed hong9life closed 2 years ago

hong9life commented 2 years ago

Hi, I am using v1.5.0 and Home Assistant 2021.9.4.

I have a problem with updating humidity and temperature from LYWSD03MMC on Home Assistant. In HA, temperature and humidity are fixed. The values are never changed and updated since the values are updated once.

Here with logs from HACS:

2021-09-21 21:57:25 DEBUG main SysInfo: {'installation_type': 'Home Assistant Container', 'version': '2021.9.4', 'dev': False, 'hassio': False, 'virtualenv': False, 'python_version': '3.9.6', 'docker': True, 'user': 'root', 'arch': 'x86_64', 'timezone': 'Asia/Seoul', 'os_name': 'Linux', 'os_version': '4.4.180+'} 2021-09-21 21:57:36 ERROR xiaomi_cloud Timeout while requesting MIoT api /home/device_list 2021-09-21 21:57:36 DEBUG main Login to MiCloud for XXXXXXX 2021-09-21 21:57:36 DEBUG xiaomi_cloud MiCloud step1 2021-09-21 21:57:36 DEBUG xiaomi_cloud MiCloud step2 2021-09-21 21:57:37 DEBUG xiaomi_cloud MiCloud step3 2021-09-21 21:57:43 DEBUG main Loaded from MiCloud 5 devices 2021-09-21 21:57:43 DEBUG gateway3 192.168.1.118 | Start main thread 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | Setup gateway device {'did': 'XXXXXXXX', 'model': 'lumi.gateway.mgl03', 'mac': 'XXXXXXXXX', 'wlan_mac': 'XXXXXXXXX', 'type': 'gateway', 'fw_ver': '1.4.6_0012', 'online': True, 'init': {'firmware lock': True}} 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | Setup ble device {'did': 'blt.XXXXXXX', 'mac': 'XXXXXXX', 'model': 1371, 'type': 'ble', 'online': True, 'init': {}} 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | Setup ble device {'did': 'blt.XXXXXX', 'mac': 'XXXXXXXXX', 'model': 1371, 'type': 'ble', 'online': True, 'init': {}} 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | Gateway time offset: -0.1916806697845459 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | Prepare Gateway 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | Version: 1.4.6_0012 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | MQTT connected 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | gateway <= True 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | XXXXXXX retain: {'battery': 100, 'temperature': 27.5, 'humidity': 58} 2021-09-21 21:57:44 DEBUG gateway3 192.168.1.118 | XXXXXXX retain: {'temperature': 27.9, 'battery': 100, 'humidity': 45} 2021-09-21 21:57:44 DEBUG mini_miio 192.168.1.118 | Send get_properties 128B, recv 128B in 0.0 sec and 1 try 2021-09-21 21:57:45 DEBUG mini_miio 192.168.1.118 | Send get_properties 128B, recv 128B in 0.0 sec and 1 try 2021-09-21 21:57:56 DEBUG gateway3 192.168.1.118 | gateway <= {'networkUp': True, 'networkPanId': '0x383C', 'radioTxPower': 7, 'radioChannel': 11} 2021-09-21 21:58:56 DEBUG gateway3 192.168.1.118 | gateway <= {'networkUp': True, 'networkPanId': '0x383C', 'radioTxPower': 7, 'radioChannel': 11} 2021-09-21 21:59:54 DEBUG gateway3 192.168.1.118 | XXXXXXX lumi.gateway.mgl03 <= {} [0.0] 2021-09-21 21:59:54 DEBUG mini_miio 192.168.1.118 | Send get_properties 128B, recv 128B in 0.0 sec and 1 try 2021-09-21 21:59:54 DEBUG mini_miio 192.168.1.118 | Send get_properties 128B, recv 128B in 0.0 sec and 1 try

The sensor values are correctly updated and displayed in Mi Home App..

@AlexxIT Can you help me to fix this issue?

ptbsare commented 2 years ago

Same issue here.

AlexxIT commented 2 years ago

Maybe you have some errors in the main Hass log?

hong9life commented 2 years ago

Maybe you have some errors in the main Hass log?

There is no log regarding Xiaomi Gateway 3 HACS. One thing I guess is that the values of temperature and humidity are fixed before I update the v15.0.0.

I tried to re-install but the result was same.

AlexxIT commented 2 years ago

Try to reboot gateway

hong9life commented 2 years ago

Try to reboot gateway

The result was same. I reboot for gate way and reinstalled the gateway.


Updated, there was update. I will update the logs tomorrow for what happens.

AlexxIT commented 2 years ago

What you mean about "reinstalled the gateway"?

hong9life commented 2 years ago

What you mean about "reinstalled the gateway"?

I am sorry for confusing. I meant that reinstall of the integration.

I think the values are correctly update after reboot the gateway and reinstall of the integration.

Thanks!