I can add the XiaoMi gateway into the HASS, but I can’t control the Gateway-Light through the hass-webpage. When I closed the Gateway-Light on the HASS webpage, after 2 or 3 seconds, the toggle “back to OFF” by itself.
Another stange thing: when I use the phone-app(xiaomi app) to change the light color, the changing showing on the webpage of HASS.
Hardware:Rpi3 + XiaoMi gateway(only)
Software: HASSbian 1.1+toybox
HassVersion: 0.39.1
HASS-configuration:
xiaomi:
gateways:
- sid:
key: cf44de72xxxxxxxx
log:
17-02-27 07:50:52 INFO (Thread-5) [custom_components.xiaomi] Expecting 1 gateways
17-02-27 07:50:52 INFO (Thread-5) [custom_components.xiaomi] Discovering Xiaomi Gateways (Try 1)
17-02-27 07:50:52 INFO (Thread-5) [custom_components.xiaomi] Xiaomi Gateway f0b429b3eae8 found at IP 192.168.1.188
17-02-27 07:50:52 INFO (Thread-5) [custom_components.xiaomi] Discovering Xiaomi Devices
17-02-27 07:50:52 DEBUG (Thread-5) [custom_components.xiaomi] >> b’{“cmd” : “get_id_list”}’
17-02-27 07:50:52 DEBUG (Thread-5) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘[]’, ‘token’: ‘J31zPwX8dLD8QM7R’, ‘cmd’: ‘get_id_list_ack’}
17-02-27 07:50:52 INFO (Thread-5) [custom_components.xiaomi] Found 1 devices
17-02-27 07:50:52 DEBUG (Thread-5) [custom_components.xiaomi] >> b’{“cmd”:“read”,“sid”:“f0b429b3eae8”}’
17-02-27 07:50:52 DEBUG (Thread-5) [custom_components.xiaomi] << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:637468881}’, ‘cmd’: ‘read_ack’}
17-02-27 07:50:57 INFO (Thread-5) [custom_components.xiaomi] Gateway finding finished in 5 seconds
17-02-27 07:50:57 INFO (Thread-5) [custom_components.xiaomi] Creating Multicast Socket
17-02-27 07:50:57 INFO (Thread-5) [custom_components.xiaomi] Listening for broadcast
17-02-27 07:51:03 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:637468728}’, ‘cmd’: ‘report’}
17-02-27 07:51:03 DEBUG (Thread-8) [custom_components.xiaomi] PUSH >> : {‘rgb’: 637468728}
17-02-27 07:51:12 DEBUG (Thread-1) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “926c4816cf976ee46a11c3eddab5908d”, “rgb”: 1593831908}, “cmd”: “write”}’
17-02-27 07:51:12 DEBUG (Thread-1) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:12 ERROR (Thread-1) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:14 DEBUG (Thread-9) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “926c4816cf976ee46a11c3eddab5908d”, “rgb”: 1577910147}, “cmd”: “write”}’
17-02-27 07:51:14 DEBUG (Thread-9) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:14 ERROR (Thread-9) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:15 DEBUG (Thread-3) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “926c4816cf976ee46a11c3eddab5908d”, “rgb”: 1577910147}, “cmd”: “write”}’
17-02-27 07:51:15 DEBUG (Thread-3) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:15 ERROR (Thread-3) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:15 DEBUG (Thread-11) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “926c4816cf976ee46a11c3eddab5908d”, “rgb”: 1579555071}, “cmd”: “write”}’
17-02-27 07:51:15 DEBUG (Thread-11) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:15 ERROR (Thread-11) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:16 DEBUG (Thread-6) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “121a6577116b2fa703e627a487bae06b”, “rgb”: 1592330751}, “cmd”: “write”}’
17-02-27 07:51:16 DEBUG (Thread-6) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:16 ERROR (Thread-6) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:17 DEBUG (Thread-5) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “121a6577116b2fa703e627a487bae06b”, “rgb”: 1592852700}, “cmd”: “write”}’
17-02-27 07:51:17 DEBUG (Thread-5) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:17 ERROR (Thread-5) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:17 DEBUG (Thread-7) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “121a6577116b2fa703e627a487bae06b”, “rgb”: 1593180298}, “cmd”: “write”}’
17-02-27 07:51:17 DEBUG (Thread-7) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:17 ERROR (Thread-7) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:18 DEBUG (Thread-4) [custom_components.xiaomi] >> b’{“sid”: “f0b429b3eae8”, “data”: {“key”: “121a6577116b2fa703e627a487bae06b”, “rgb”: 1581974271}, “cmd”: “write”}’
17-02-27 07:51:18 DEBUG (Thread-4) [custom_components.xiaomi] << {‘sid’: ‘f0b429b3eae8’, ‘data’: ‘{“error”:“Invalid key”}’, ‘cmd’: ‘write_ack’}
17-02-27 07:51:18 ERROR (Thread-4) [custom_components.xiaomi] Got error element in data {“error”:“Invalid key”}
17-02-27 07:51:44 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:637534178}’, ‘cmd’: ‘report’}
17-02-27 07:51:44 DEBUG (Thread-1) [custom_components.xiaomi] PUSH >> : {‘rgb’: 637534178}
17-02-27 07:51:56 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:1191182306}’, ‘cmd’: ‘report’}
17-02-27 07:51:56 DEBUG (Thread-9) [custom_components.xiaomi] PUSH >> : {‘rgb’: 1191182306}
17-02-27 07:52:01 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:318767074}’, ‘cmd’: ‘report’}
17-02-27 07:52:01 DEBUG (Thread-11) [custom_components.xiaomi] PUSH >> : {‘rgb’: 318767074}
17-02-27 07:52:04 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:1006632930}’, ‘cmd’: ‘report’}
17-02-27 07:52:04 DEBUG (Thread-6) [custom_components.xiaomi] PUSH >> : {‘rgb’: 1006632930}
17-02-27 07:52:07 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:1577058274}’, ‘cmd’: ‘report’}
17-02-27 07:52:07 DEBUG (Thread-5) [custom_components.xiaomi] PUSH >> : {‘rgb’: 1577058274}
17-02-27 07:52:10 DEBUG (Thread-13) [custom_components.xiaomi] MCAST (report) << {‘short_id’: 0, ‘sid’: ‘f0b429b3eae8’, ‘model’: ‘gateway’, ‘data’: ‘{“rgb”:251658210}’, ‘cmd’: ‘report’}
17-02-27 07:52:10 DEBUG (Thread-7) [custom_components.xiaomi] PUSH >> : {‘rgb’: 251658210}