Hi,
Sorry if this is just another ‘Xiaomi Gateway Problem’ thread… I’ve tried searching this forum for every solution for my problem, tried to implement them, but still my problem persists. I hope someone can help me here.
The problem:
I have three xiaomi gateway, two are Xiaomi Gateway v3 and one is Aqara AC Partner. I have persistent problem with one of the Xiaomi Gateway v3, let’s call this Gateway A. Since several days ago, Gateway A consistently looses connection with HA but not with Xiaomi Home app. The most I can get with Gaeway A is three hours, after that it became unavailable and bringing all the child devices (sensors) offline also in HA. I check in Xiaomi Home app, and the gateway A with all its children are working fine. If I restart HA, the gateway A and all its children appear normal again. But just for some time, gateway A will be unavailable again. Here is the screnshot :
What I have done :
- Make sure wifi channel is not overlapping with Zigbee. Three of the gateway uses channel 11,15, and 25. I move my wifi to channel 7 to avoid overlapping, but the problem persists.
- I move the Gateway A closer to the router, but I don’t think signal quality is the issue. The problem persists.
- I disabled-enabled, create new token key from Xiaomi Home app. The problem persists.
- I tried setting ‘ping’ sensor in HA to regularly ping the Gateway A every 10 seconds. The ping sensor works OK even during the ‘unavailable’ time, which means no network connectivity problem between router and gateway A.
- I tried logging in xiaomy_gateway error from HA. Currently I only have the discovery logging of the gateway, as I haven’t yet encountered ‘unavailable’ again after I enable the logger 5 minutes ago. I’ll post the updated log when the Gateway A become unavailable. Here is the logging for Gateway A :
2019-06-14 09:56:58 INFO (SyncWorker_17) [xiaomi_gateway] Xiaomi Gateway 7811dcb37d98 configured at IP 192.168.0.108:9898
2019-06-14 09:56:58 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"7811dcb37d98"}'
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'gateway', 'sid': '7811dcb37d98', 'short_id': 0, 'data': '{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}'}
2019-06-14 09:56:59 INFO (SyncWorker_17) [xiaomi_gateway] Discovering Xiaomi Devices
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd resp << {'cmd': 'get_id_list_ack', 'sid': '7811dcb37d98', 'token': 'fpAJ7LWN5FJdQBrz', 'data': '["158d00027cdb02"]'}
2019-06-14 09:56:59 INFO (SyncWorker_17) [xiaomi_gateway] Found 2 devices
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] Discovery attempt 1/4
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"158d00027cdb02"}'
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'switch', 'sid': '158d00027cdb02', 'short_id': 7360, 'data': '{"voltage":3022}'}
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] Registering device 158d00027cdb02, switch as: binary_sensor
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] Discovery attempt 1/4
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"7811dcb37d98"}'
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'gateway', 'sid': '7811dcb37d98', 'short_id': 0, 'data': '{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}'}
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] Registering device 7811dcb37d98, gateway as: sensor
2019-06-14 09:56:59 DEBUG (SyncWorker_17) [xiaomi_gateway] Registering device 7811dcb37d98, gateway as: light
2019-06-14 09:57:04 INFO (SyncWorker_17) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-06-14 09:57:04 INFO (SyncWorker_17) [xiaomi_gateway] Creating Multicast Socket
Does anyone have any similar problem with Xiaomi Gateway? Please kindly share what is your experience with Xiaomi Gateway? I’m thinking about Zigbee2MQTT also, but will it be more reliable in long-term?