Hi,
I’ve been having trouble with my xiaomi gateway. I’ve read through all the issues and other topics on here and nothing has helped.
My config:
xiaomi_aqara:
discovery_retry: 10
gateways:
- mac: xxx
key: xxx
host: xxx
My host running from Qnap-> virtual station-> Ubuntu server -> docker hass io.
-Ubuntu server firewall disabled,
- Ports opened: 9898 open, 4321 open/filtered
If i on the hassio debug logs, the result is:
019-12-01 08:46:09 DEBUG (SyncWorker_6) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2019-12-01 08:46:09 INFO (SyncWorker_6) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2019-12-01 08:46:09 INFO (SyncWorker_6) [xiaomi_gateway] Xiaomi Gateway 04cf8ca9ddd1 configured at IP 192.168.1.135:9898
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"04cf8ca9ddd1"}'
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'gateway', 'sid': '4cf8ca9ddd1', 'short_id': 0, 'data': '{"rgb":0,"illumination":1292,"proto_version":"1.1.2"}'}
2019-12-01 08:46:09 INFO (SyncWorker_6) [xiaomi_gateway] Discovering Xiaomi Devices
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd >> b'{"cmd" : "get_id_list"}'
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd resp << {'cmd': 'get_id_list_ack', 'sid': '04cf8ca9ddd1', 'token': 'i4Z2MCdM69zHE5EZ', 'data': '["158d0002c6c1aa","158d0002892c5c","158d0002892d1d","158d0002c5f3ff","158d0002c5f4d7","158d0002018b7a","158d000395b2e0"]'}
2019-12-01 08:46:09 INFO (SyncWorker_6) [xiaomi_gateway] Found 8 devices
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] Discovery attempt 1/4
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"158d0002c6c1aa"}'
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'switch', 'sid': '158d0002c6c1aa', 'short_id': 65170, 'data': '{"voltage":3022}'}
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] Registering device 158d0002c6c1aa, switch as: binary_sensor
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] Discovery attempt 1/4
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"158d0002892c5c"}'
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'motion', 'sid': '158d0002892c5c', 'short_id': 61330, 'data': '{"voltage":3015}'}
2019-12-01 08:46:09 DEBUG (SyncWorker_6) [xiaomi_gateway] Registering device 158d0002892c5c, motion as: binary_sensor
etc… etc …
2019-12-01 08:46:11 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.yeelight
2019-12-01 08:46:15 INFO (SyncWorker_6) [xiaomi_gateway] Gateway discovery finished in 5 seconds
2019-12-01 08:46:15 INFO (SyncWorker_6) [xiaomi_gateway] Creating Multicast Socket
2019-12-01 08:46:15 DEBUG (SyncWorker_6) [homeassistant.components.xiaomi_aqara] Gateways discovered. Listening for broadcasts
2019-12-01 08:46:15 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.xiaomi_aqara
2019-12-01 08:46:19 ERROR (Thread-3) [xiaomi_gateway] Unknown gateway ip 192.168.1.191
2019-12-01 08:46:22 WARNING (MainThread) [homeassistant.setup] Setup of default_config is taking over 10 seconds.
2019-12-01 08:46:29 ERROR (Thread-3) [xiaomi_gateway] Unknown gateway ip 192.168.1.191
2019-12-01 08:46:39 ERROR (Thread-3) [xiaomi_gateway] Unknown gateway ip 192.168.1.191
2019-12-01 08:46:39 ERROR (Thread-3) [xiaomi_gateway] Unknown gateway ip 192.168.1.191
2019-12-01 08:46:39 WARNING (MainThread) [homeassistant.components.frontend] Overwriting integration hacs
2019-12-01 08:46:40 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 399, in _async_add_entity
raise HomeAssistantError(msg)
homeassistant.exceptions.HomeAssistantError: Entity id already exists: sensor.hacs. Platform hacs does not generate unique IDs
2019-12-01 08:46:46 DEBUG (SyncWorker_3) [homeassistant.components.xiaomi_aqara.switch] Update data from hub: Plug_158d0002018b7a
2019-12-01 08:46:46 DEBUG (SyncWorker_3) [xiaomi_gateway] _send_cmd >> b'{ "cmd":"read","sid":"158d0002018b7a"}'
2019-12-01 08:46:46 DEBUG (SyncWorker_3) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'plug', 'sid': '158d0002018b7a', 'short_id': 28118, 'data': '{"voltage":3600,"status":"off","inuse":"0","power_consumed":"1822","load_power":"0.00"}'}
2019-12-01 08:46:46 DEBUG (SyncWorker_3) [xiaomi_gateway] read_ack << {'cmd': 'read_ack', 'model': 'plug', 'sid': '158d0002018b7a', 'short_id': 28118, 'data': '{"voltage":3600,"status":"off","inuse":"0","power_consumed":"1822","load_power":"0.00"}'}
2019-12-01 08:46:46 DEBUG (MainThread) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Plug_158d0002018b7a: off>: {'voltage': 3600, 'status': 'off', 'inuse': '0', 'power_consumed': '1822', 'load_power': '0.00'}
2019-12-01 08:46:49 ERROR (Thread-3) [xiaomi_gateway] Unknown gateway ip 192.168.1.191
So the sensors not working
I can switch the gateway lights, but the sensort not working.
This config is good, beacuse all worked yesterday. ( before blackout )
Please help me