XiaomiGateway3
XiaomiGateway3 copied to clipboard
After a certain time my zigbee devices disappear in ZHA
Hi AlexxIT!
I use the lumi.gateway.mgl03 ZNDMWG03LM. I successfully updated firmware via telnet 1.5.0_0102 In the gateway config Mode ZHA or zigbee2mqtt [ADV] After a certain time my zigbee devices disappear in ZHA, I have tried to switch between my home and zha mode , also restart the gateway, but nothing works for me
2021-11-28 01:59:55 DEBUG gateway3 192.168.1.135 | Setup gateway device {'did': '374468839', 'model': 'lumi.gateway.mgl03', 'mac': '0x842e14fffe4e1efd', 'wlan_mac': '', 'type': 'gateway', 'fw_ver': '1.5.0_0102', 'online': True, 'init': {'firmware lock': True}} 2021-11-28 01:59:55 DEBUG gateway3 192.168.1.135 | Setup ble device {'did': 'blt.4.16ejguo4cgg00', 'mac': '', 'model': 1371, 'type': 'ble', 'online': True, 'init': {}} 2021-11-28 01:59:55 DEBUG gateway3 192.168.1.135 | Setup ble device {'did': 'blt.4.16emahfo0gg00', 'mac': '******', 'model': 1371, 'type': 'ble', 'online': True, 'init': {}} 2021-11-28 01:59:55 DEBUG gateway3 192.168.1.135 | Prepare Gateway 2021-11-28 01:59:56 DEBUG gateway3 192.168.1.135 | Version: 1.5.0_0102 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | Init ZHA or z2m mode 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | Patch Bluetooth 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | MQTT connected 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | gateway <= True 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | Gateway time offset: -0.6936109066009521 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | a4c13804e3ba retain: {'humidity': 57, 'temperature': 10.5, 'battery': 100} 2021-11-28 01:59:57 DEBUG gateway3 192.168.1.135 | a4c138b4b69d retain: {'battery': 100, 'humidity': 37, 'temperature': 19.0} 2021-11-28 02:00:50 DEBUG gateway3 192.168.1.135 | Process BLE Fix {'did': 'blt.4.16emahfo0gg00', 'eid': 4102, 'edata': '3c02', 'pdid': 1371, 'seq': 154} 2021-11-28 02:00:50 DEBUG gateway3 192.168.1.135 | Process BLE {'dev': {'did': 'blt.4.16emahfo0gg00', 'mac': 'A4:C1:38:04:E3:BA', 'pdid': 1371}, 'evt': [{'eid': 4102, 'edata': '3c02'}], 'frmCnt': 154, 'gwts': 1638061249} 2021-11-28 02:01:49 DEBUG gateway3 192.168.1.135 | Process BLE Fix {'did': 'blt.4.16emahfo0gg00', 'eid': 4100, 'edata': '6900', 'pdid': 1371, 'seq': 156} 2021-11-28 02:02:39 DEBUG gateway3 192.168.1.135 | Process BLE Fix {'did': 'blt.4.16ejguo4cgg00', 'eid': 4102, 'edata': '6f01', 'pdid': 1371, 'seq': 178} 2021-11-28 02:02:39 DEBUG gateway3 192.168.1.135 | Process BLE {'dev': {'did': 'blt.4.16ejguo4cgg00', 'mac': 'A4:C1:38:B4:B6:9D', 'pdid': 1371}, 'evt': [{'eid': 4102, 'edata': '6f01'}], 'frmCnt': 178, 'gwts': 1638061358} 2021-11-28 02:03:19 DEBUG gateway3 192.168.1.135 | gateway <= {'free_mem': 3840, 'ip': '192.168.1.135', 'load_avg': '1.63|1.68|1.77|3/88|11172', 'rssi': 52, 'run_time': 16462, 'setupcode': '563-32-552', 'ssid': 'Capellanes', 'tz': 'GMT1'} 2021-11-28 02:03:19 DEBUG gateway3 192.168.1.135 | Gateway time offset: -0.7157609462738037 2021-11-28 02:03:38 DEBUG gateway3 192.168.1.135 | Process BLE Fix {'did': 'blt.4.16ejguo4cgg00', 'eid': 4100, 'edata': 'be00', 'pdid': 1371, 'seq': 180} 2021-11-28 02:03:41 DEBUG gateway3 192.168.1.135 | Process BLE Fix {'did': 'blt.4.16ejguo4cgg00', 'eid': 4106, 'edata': '64', 'pdid': 1371, 'seq': 181} 2021-11-28 02:03:41 DEBUG gateway3 192.168.1.135 | Process BLE {'dev': {'did': 'blt.4.16ejguo4cgg00', 'mac': 'A4:C1:38:B4:B6:9D', 'pdid': 1371}, 'evt': [{'eid': 4106, 'edata': '64'}], 'frmCnt': 181, 'gwts': 1638061420}
Need more details
What more information can I give you? I use the latest version of the plugin v1.6.2, home assistant is updated to the latest current version, the wifi network works perfectly, in zha i have this error
Logger: homeassistant.config_entries Source: util/json.py:39 First occurred: 13:55:13 (1 occurrences) Last logged: 13:55:13
Error setting up entry socket://192.168.1.135:8888 for zha Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/util/json.py", line 33, in load_json return json.loads(fdesc.read()) # type: ignore File "/usr/local/lib/python3.9/json/init.py", line 346, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.9/json/decoder.py", line 337, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "/usr/src/homeassistant/homeassistant/config_entries.py", line 304, in async_setup result = await component.async_setup_entry(hass, self) # type: ignore File "/usr/src/homeassistant/homeassistant/components/zha/init.py", line 102, in async_setup_entry await zha_gateway.async_initialize() File "/usr/src/homeassistant/homeassistant/components/zha/core/gateway.py", line 133, in async_initialize self.zha_storage = await async_get_registry(self._hass) File "/usr/src/homeassistant/homeassistant/components/zha/core/store.py", line 143, in async_get_registry return cast(ZhaStorage, await task) File "/usr/src/homeassistant/homeassistant/components/zha/core/store.py", line 138, in _load_reg await registry.async_load() File "/usr/src/homeassistant/homeassistant/components/zha/core/store.py", line 94, in async_load data = await self._store.async_load() File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 112, in async_load return await self._load_task File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 121, in _async_load return await self._async_load_data() File "/usr/src/homeassistant/homeassistant/helpers/storage.py", line 139, in _async_load_data data = await self.hass.async_add_executor_job( File "/usr/local/lib/python3.9/concurrent/futures/thread.py", line 52, in run result = self.fn(*self.args, **self.kwargs) File "/usr/src/homeassistant/homeassistant/util/json.py", line 39, in load_json raise HomeAssistantError(error) from error homeassistant.exceptions.HomeAssistantError: Expecting value: line 1 column 1 (char 0)
another strange thing is to see this message in logs gateway "2021-11-28 14:07:18 DEBUG base 192.168.1.135 [BASE] MQTT connected" but option "Mode ZHA or zigbee2mqtt [ADV]" is not check
If i deactive mode "Mode ZHA or zigbee2mqtt [ADV]" and restar and active again "Mode ZHA or zigbee2mqtt [ADV]" i have this logs
2021-11-28 14:23:27 DEBUG base 192.168.1.135 [BASE] Start main loop 2021-11-28 14:23:29 DEBUG base 192.168.1.135 [BASE] Prepare gateway gw3 with firmware 1.5.0_0102 2021-11-28 14:23:29 DEBUG base 192.168.1.135 [BASE] 54ef44cbc395 (lumi.gateway.mgl03) setup Wi-Fi ZNDMWG03LM: alarm, command, data, gateway 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [MIOT] 54ef44cbc395 (lumi.gateway.mgl03) read {'mi_spec': [{'siid': 3, 'piid': 1}, {'siid': 3, 'piid': 22}]} 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [BASE] 0x04cf8cdf3c74c8ba (0x4625) setup Zigbee lumi.switch.b1naus01: 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [BASE] a4c138b4b69d (1371) setup BLE LYWSD03MMC: temperature, humidity 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [BASE] a4c13804e3ba (1371) setup BLE LYWSD03MMC: temperature, humidity 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [BASE] Patch Bluetooth 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [BASE] Applied 0 patches to daemons 2021-11-28 14:23:30 DEBUG base 192.168.1.135 [BASE] MQTT connected 2021-11-28 14:23:41 DEBUG base 192.168.1.135 [ZIGB] 0x00158d0003d0b4fb (0x84a1) recv {'endpoint': 1, 'cluster': 'occupancy', 'command': 'Command.Report_Attributes', 'occupancy': } 2021-11-28 14:23:41 DEBUG base 192.168.1.135 [SLBS] 0x00158d0003d0b4fb (0x84a1) new unknown device 2021-11-28 14:23:41 DEBUG base 192.168.1.135 [ZIGB] 0x842e14fffe11e895 (0xc984) recv {'endpoint': 1, 'cluster': 'basic', 'command': 'Command.Report_Attributes', 'app_version': 80} 2021-11-28 14:23:41 DEBUG base 192.168.1.135 [SLBS] 0x842e14fffe11e895 (0xc984) new unknown device 2021-11-28 14:24:07 DEBUG base 192.168.1.135 [ZIGB] 0x00158d0003d4e141 (0xd3bc) recv {'endpoint': 1, 'cluster': 'occupancy', 'command': 'Command.Report_Attributes', 'occupancy': } 2021-11-28 14:24:07 DEBUG base 192.168.1.135 [SLBS] 0x00158d0003d4e141 (0xd3bc) new unknown device 2021-11-28 14:24:41 DEBUG base 192.168.1.135 [ZIGB] 0x588e81fffed61bc1 (0x8b96) recv {'endpoint': 1, 'cluster': 'basic', 'command': 'Command.Report_Attributes', 'app_version': 80} 2021-11-28 14:24:41 DEBUG base 192.168.1.135 [SLBS] 0x588e81fffed61bc1 (0x8b96) new unknown device 2021-11-28 14:25:12 DEBUG utils Try to update Zigbee NCP to version v6.7.10 2021-11-28 14:25:12 DEBUG elelabs_ezsp_utility RESET FRAME 2021-11-28 14:25:13 DEBUG elelabs_ezsp_utility sendVersion: V4 2021-11-28 14:25:13 DEBUG elelabs_ezsp_utility EZSP v7 detected 2021-11-28 14:25:13 DEBUG elelabs_ezsp_utility sendVersion: V7 2021-11-28 14:25:13 DEBUG elelabs_ezsp_utility getValue: VER 2021-11-28 14:25:13 DEBUG utils NCP state: normal, version: NCP v6.6.2-126 2021-11-28 14:25:13 DEBUG elelabs_ezsp_utility launchStandaloneBootloader: BOOT 2021-11-28 14:25:15 DEBUG elelabs_ezsp_utility RESET FRAME 2021-11-28 14:25:20 DEBUG utils NCP state: boot, version: Gecko Bootloader v1.8.0 2021-11-28 14:25:27 DEBUG main Begin start sequence, packet_size=%d 2021-11-28 14:25:28 DEBUG main 16-bit CRC requested (CRC). 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:25:28 DEBUG main send: block %d 2021-11-28 14:26:19 DEBUG main send: block %d 2021-11-28 14:26:19 DEBUG main send: at EOF 2021-11-28 14:26:19 DEBUG main sending EOT, awaiting ACK 2021-11-28 14:26:19 INFO main Transmission successful (ACK received). 2021-11-28 14:26:19 DEBUG ezsp Firmware upload complete 2021-11-28 14:26:19 DEBUG ezsp Rebooting NCP... 2021-11-28 14:26:25 DEBUG elelabs_ezsp_utility RESET FRAME 2021-11-28 14:26:26 DEBUG elelabs_ezsp_utility sendVersion: V4 2021-11-28 14:26:26 DEBUG ezsp NCP init error 2021-11-28 14:26:26 DEBUG utils NCP state: None, version: Gecko Bootloader v1.8.0 2021-11-28 14:26:26 DEBUG utils Try to update Zigbee NCP to version v6.7.10 2021-11-28 14:26:26 DEBUG elelabs_ezsp_utility RESET FRAME 2021-11-28 14:26:36 DEBUG ezsp NCP first line error: b'' 2021-11-28 14:26:36 DEBUG elelabs_ezsp_utility RESET FRAME 2021-11-28 14:26:37 DEBUG elelabs_ezsp_utility sendVersion: V4 2021-11-28 14:26:37 DEBUG elelabs_ezsp_utility EZSP v8 detected 2021-11-28 14:26:37 DEBUG elelabs_ezsp_utility sendVersion: V8 2021-11-28 14:26:37 DEBUG elelabs_ezsp_utility getValue: VER 2021-11-28 14:26:37 DEBUG utils No need to flash 2021-11-28 14:26:37 DEBUG base 192.168.1.135 [BASE] Stop all tasks 2021-11-28 14:26:37 DEBUG base 192.168.1.135 [BASE] Start main loop 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] Prepare gateway gw3 with firmware 1.5.0_0102 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] 54ef44cbc395 (lumi.gateway.mgl03) setup Wi-Fi ZNDMWG03LM: alarm, command, data, gateway 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [MIOT] 54ef44cbc395 (lumi.gateway.mgl03) read {'mi_spec': [{'siid': 3, 'piid': 1}, {'siid': 3, 'piid': 22}]} 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] Init ZHA mode 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] a4c138b4b69d (1371) setup BLE LYWSD03MMC: temperature, humidity 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] a4c13804e3ba (1371) setup BLE LYWSD03MMC: temperature, humidity 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] Patch Bluetooth 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] Applied 2 patches to daemons 2021-11-28 14:26:38 DEBUG base 192.168.1.135 [BASE] MQTT connected
You have some errors with json decoding in ZHA integration. This error is not related to this component. You should ask Hass developers
Please reopen the issue if it is still relevant