Home Assistant release (hass --version):
Home Assistant 0.60.1 (Docker)
Xiaomi Gateway has firmware 1.4.1_151.0143
Python release (python3 --version):
3.6.4
Component/platform:
xiaomi_aqara
Description of problem:
I just purchased an xiaomi gateway v2 and supported sensors. Some of my devices update with results as expected, some don't. I have also followed the home assistant xiaomi gateway debugging advice on the wiki. I have also done extensive searching of the internet and cannot debug the problem.
_Working devices:_
Door / window sensor (aqara)
Temp / Pressure / Humidity (only when the HA front end is refreshed do these sensors seem to record results).
_Not working devices:_
Motion
Smoke
Switches (gen 1)
Water leak
Expected:
All devices to function as expected. i.e. button presses to be registered in HA, smoke alerts, motion etc
Problem-relevant configuration.yaml entries and steps to reproduce:
xiaomi_aqara:
gateways:
- host: 192.168.X.XX
mac: XXXXXXXXXX
key: XXXXXXXXXXXXXXX
Traceback (if applicable):
Debugging turned on for xiaomi components.
2018-01-26 22:52:47 DEBUG (SyncWorker_12) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2018-01-26 22:52:47 INFO (SyncWorker_12) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2018-01-26 22:52:52 DEBUG (SyncWorker_12) [homeassistant.components.xiaomi_aqara] Gateways discovered. Listening for broadcasts
2018-01-26 22:52:52 INFO (MainThread) [homeassistant.components.binary_sensor] Setting up binary_sensor.xiaomi_aqara
2018-01-26 22:53:22 DEBUG (SyncWorker_15) [homeassistant.components.binary_sensor.xiaomi_aqara] Updating xiaomi sensor by polling
2018-01-26 22:53:22 DEBUG (SyncWorker_15) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Door Window Sensor_158d0001de76e0: on>: {'voltage': 3045, 'status': 'open'}
2018-01-26 22:53:53 DEBUG (SyncWorker_14)
...
2018-01-26 23:08:17 DEBUG (SyncWorker_5) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Door Window Sensor_158d0001de76e0: on>: {'voltage': 3045, 'status': 'open'}
2018-01-26 23:08:47 DEBUG (SyncWorker_10) [homeassistant.components.binary_sensor.xiaomi_aqara] Updating xiaomi sensor by polling
2018-01-26 23:08:47 DEBUG (SyncWorker_10) [homeassistant.components.xiaomi_aqara] PUSH >> <Entity Door Window Sensor_158d0001de76e0: on>: {'voltage': 3045, 'status': 'open'}
Additional info:
All of the sensors work correctly in the mi-home app.
Firewall has been disabled in both directions between the host and the xiaomi gateway.
HA is not using HTTPS.
Could you add this to the logger component:
logs:
xiaomi_gateway: debug
Then you should see something like this in the log:
2018-01-16 15:28:30 DEBUG (SyncWorker_3) [xiaomi_gateway] << {'cmd': 'get_id_list_ack', 'sid': '7811dcb25368', 'token': 'D6hUmcaWzAx5O6fl', 'data': '["158d0001f54748","158d0002011eb3","158d0001c16609","158d0001f39480","158d000200a9f4"]'}
2018-01-16 15:28:30 INFO (SyncWorker_3) [xiaomi_gateway] Found 6 devices
Are all your devices there?
Hi @Danielhiversen
All my devices are detected:
2018-01-27 12:35:12 INFO (SyncWorker_9) [PyXiaomiGateway] Found 8 devices
Some more relevant logs:
2018-01-27 12:35:12 INFO (MainThread) [homeassistant.setup] Setting up xiaomi_aqara
2018-01-27 12:35:12 DEBUG (SyncWorker_9) [homeassistant.components.xiaomi_aqara] Expecting 1 gateways
2018-01-27 12:35:12 INFO (SyncWorker_9) [homeassistant.components.xiaomi_aqara] Discovering Xiaomi Gateways (Try 1)
2018-01-27 12:35:12 INFO (SyncWorker_9) [PyXiaomiGateway] Xiaomi Gateway 7811XXXXXXXX configured at IP 192.168.X.XX:9898
2018-01-27 12:35:12 INFO (SyncWorker_9) [PyXiaomiGateway] Discovering Xiaomi Devices
2018-01-27 12:35:12 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd" : "get_id_list"}'
2018-01-27 12:35:12 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'get_id_list_ack', 'sid': '7811dcb2384e', 'token': '8JFZRvg1Uz3mXD7c', 'data': '["158d0001f3dde5","158d0001c34d5d","158d0001de76e0","158d0001d8fa3b","158d0001fa6c29","158d000225372e","158d0001d9048b"]'}
2018-01-27 12:35:12 INFO (SyncWorker_9) [PyXiaomiGateway] Found 8 devices
2018-01-27 12:35:12 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d0001f3dde5"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'switch', 'sid': '158d0001f3dde5', 'short_id': 33868, 'data': '{"voltage":3112}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d0001f3dde5, switch as: binary_sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d0001c34d5d"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'sensor_wleak.aq1', 'sid': '158d0001c34d5d', 'short_id': 56220, 'data': '{"voltage":3085}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d0001c34d5d, sensor_wleak.aq1 as: binary_sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d0001de76e0"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'sensor_magnet.aq2', 'sid': '158d0001de76e0', 'short_id': 20901, 'data': '{"voltage":3045,"status":"open"}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d0001de76e0, sensor_magnet.aq2 as: binary_sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d0001d8fa3b"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'smoke', 'sid': '158d0001d8fa3b', 'short_id': 32388, 'data': '{"voltage":3255,"alarm":"0"}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d0001d8fa3b, smoke as: binary_sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d0001fa6c29"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'weather.v1', 'sid': '158d0001fa6c29', 'short_id': 26634, 'data': '{"voltage":3035,"temperature":"2804","humidity":"5213","pressure":"100260"}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d0001fa6c29, weather.v1 as: sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d000225372e"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'sensor_motion.aq2', 'sid': '158d000225372e', 'short_id': 46085, 'data': '{"voltage":3105}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d000225372e, sensor_motion.aq2 as: sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d000225372e, sensor_motion.aq2 as: binary_sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"158d0001d9048b"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'switch', 'sid': '158d0001d9048b', 'short_id': 38297, 'data': '{"voltage":3112}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 158d0001d9048b, switch as: binary_sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] >> b'{"cmd":"read","sid":"7811dcb2384e"}'
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] << {'cmd': 'read_ack', 'model': 'gateway', 'sid': '7811dcb2384e', 'short_id': 0, 'data': '{"rgb":0,"illumination":391,"proto_version":"1.0.9"}'}
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 7811dcb2384e, gateway as: sensor
2018-01-27 12:35:13 DEBUG (SyncWorker_9) [PyXiaomiGateway] Registering device 7811dcb2384e, gateway as: light
Hello,
I had the same issue today after upgrading from 0.60 to 0.62. I just restarted the Gateway and all sensors were recognized again in HA...
Hi everyone
@dnuc I upgraded to version 0.62.0, restarted the gateway then HA but I am still having the problems with the xiaomi gateway.
Issue 12023 is also occurring for me making it difficult to debug.
Cheers
Hello everyone!
I am having some problems too with one of my Aqara Hub. I Have two HUBS connected to my network.
If I ping one of my HUBS and my Pi3 running Hassio is off, all packages are OK (the other hub does not have this behavior, all pings are OK either way). When I start my Pi3, at some point of the boot process, one of my HUBS starts to miss some pings:
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=18ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=402ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=239ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=405ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=402ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=5ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=5ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=7ms TTL=255
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=7ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=6ms TTL=255
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=31ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=5ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=5ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=22ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=22ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=20ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=7ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=405ms TTL=255
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=6ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=14ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=1074ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=6ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=7ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=6ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=414ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=4ms TTL=255
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Esgotado o tempo limite do pedido.
Resposta de 192.168.1.14: bytes=32 tempo=3ms TTL=255
Resposta de 192.168.1.14: bytes=32 tempo=10ms TTL=255
And then my log is flooded with this errors:
2018-02-02 11:23:06 ERROR (SyncWorker_18) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:23:06 ERROR (SyncWorker_18) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:23:16 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d0001231d4d is taking over 10 seconds
2018-02-02 11:23:16 ERROR (SyncWorker_8) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:23:16 ERROR (SyncWorker_8) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:23:37 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d0001231d4d is taking over 10 seconds
2018-02-02 11:23:37 ERROR (SyncWorker_17) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:23:37 ERROR (SyncWorker_17) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:23:47 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.door_window_sensor_158d0001d68545 is taking over 10 seconds
2018-02-02 11:23:47 ERROR (SyncWorker_10) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:23:47 ERROR (SyncWorker_10) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:24:08 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.door_window_sensor_158d0001d68545 is taking over 10 seconds
2018-02-02 11:24:08 ERROR (SyncWorker_1) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:24:08 ERROR (SyncWorker_1) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:24:18 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d0001231d4d is taking over 10 seconds
2018-02-02 11:24:18 ERROR (SyncWorker_15) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:24:18 ERROR (SyncWorker_15) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:24:39 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d0001231d4d is taking over 10 seconds
2018-02-02 11:24:39 ERROR (SyncWorker_7) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:24:39 ERROR (SyncWorker_7) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:24:49 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.door_window_sensor_158d0001d68545 is taking over 10 seconds
2018-02-02 11:24:49 ERROR (SyncWorker_10) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:24:49 ERROR (SyncWorker_10) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:25:41 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d0001231d4d is taking over 10 seconds
2018-02-02 11:25:41 ERROR (SyncWorker_10) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:25:41 ERROR (SyncWorker_10) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:25:51 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.door_window_sensor_158d0001d68545 is taking over 10 seconds
2018-02-02 11:25:51 ERROR (SyncWorker_2) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:25:51 ERROR (SyncWorker_2) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:27:45 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.door_window_sensor_158d0001d68545 is taking over 10 seconds
2018-02-02 11:27:45 ERROR (SyncWorker_4) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:27:45 ERROR (SyncWorker_4) [xiaomi_gateway] No data in response from hub None
2018-02-02 11:27:55 WARNING (MainThread) [homeassistant.helpers.entity] Update of binary_sensor.motion_sensor_158d0001231d4d is taking over 10 seconds
2018-02-02 11:27:55 ERROR (SyncWorker_17) [xiaomi_gateway] Cannot connect to Gateway
2018-02-02 11:27:55 ERROR (SyncWorker_17) [xiaomi_gateway] No data in response from hub None
My problem is that most of my commands using wireless switches and automations depending on motion sensors, for example, takes a long time to respond. Also these errors shows up when one of my wireless switches are pressed:
2018-02-02 01:54:21 WARNING (MainThread) [homeassistant.components.script] Script script.botao_xiaomi_sala_02_click_2 already running.
2018-02-02 01:55:15 WARNING (MainThread) [homeassistant.components.script] Script script.botao_xiaomi_sala_02_click_1 already running.
2018-02-02 01:56:50 WARNING (MainThread) [homeassistant.components.script] Script script.botao_xiaomi_sala_02_click_1 already running.
2018-02-02 01:56:52 WARNING (MainThread) [homeassistant.components.script] Script script.botao_xiaomi_sala_02_click_1 already running.
2018-02-02 01:56:55 WARNING (MainThread) [homeassistant.components.script] Script script.botao_xiaomi_sala_02_click_1 already running.
I've being tooling with my router for the past 5 days, changing every possible configuration on wireless and LAN, I have no idea what is going on here...
Here are my configurations YAML:
xiaomi_aqara:
gateways:
- host: 192.168.1.14
mac: 34:CE:00:90:AE:35
key: 2D21612C00EB4ECD
- host: 192.168.1.15
mac: 34:CE:00:90:94:89
key: C2B7C10B725A4B82
Thank you very much for your time!
@tatunts use !secret next time for keys. Not a good idea to post mac address and keys on public issues/forums.
I'm also experiencing issues after update to 0.62.1.
Sometimes I have to restart home assistant few times, because not always all devices are detected.
Thanks for your advice @ciotlosm! I've actually altered a couple of numbers and letters here and there hehe
@karlkar: do you have multiple gatways like I do? I am about to go mad about this. Only one of my gateways start losing packets in the middle of my Hassio boot process. Very odd. Thanks.
I have just one gateway.
Hi!
I have the same bug.
I have working window sensor, motion, temperature and humidity sensor.
I do not have working the aqara smart switch button. The device it appears on the interface but is not acting when the switch its pulsed.
I have the version 0.65.6
There is any know issue about this?
tks
I also have the same problems. just to describe my scenario:
Using raspberry pi (wifi connection) + hassbian (latest version as 4-april-2018) .
1 xiaomi gateway + 2 motions sensors + 2 door sensors and a button (1gen).
Enable the logs and found that the multicast in xioami_gateway is not working properly. At least, it's blocking a normal restart of HA.
2018-04-10 04:15:58 INFO (Thread-14) [xiaomi_gateway] Closing multisocket (this is the last line in the logs when i try to restart).
Also, the logs for the xiaomi devices works for about a 5 minutes or less and then it stops. I think HA stops receiving updates from the sensors after a while
Experiencin this on 0.72 and 0.73. Everything seems to workbut log is flooded with those errors.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment :+1:
I have the same issue with the current Home Assistant version (0.81.6). I have 4 sensors, 2 door sensors and 2 wall switches. The devices are recognized by HA:
2018-11-06 16:02:10 INFO (SyncWorker_6) [xiaomi_gateway] Found 5 devices
The door sensors are detected as model "magnet" and are working fine. The wall switches are detected but do not work properly:
2018-11-06 16:02:10 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"158d00027c1725"}'
2018-11-06 16:02:10 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'remote.b286acn01', 'sid': '158d00027c1725', 'short_id': 42403, 'data': '{"voltage":3155}'}
2018-11-06 16:02:10 INFO (MainThread) [homeassistant.loader] Loaded config.device_registry from homeassistant.components.config.device_registry
2018-11-06 16:02:10 DEBUG (SyncWorker_6) [xiaomi_gateway] Registering device 158d00027c1725, remote.b286acn01 as: binary_sensor
2018-11-06 16:02:10 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd >> b'{"cmd":"read","sid":"158d00027bd726"}'
2018-11-06 16:02:10 DEBUG (SyncWorker_6) [xiaomi_gateway] _send_cmd resp << {'cmd': 'read_ack', 'model': 'remote.b286acn01', 'sid': '158d00027bd726', 'short_id': 10533, 'data': '{"voltage":3055}'}
2018-11-06 16:02:10 DEBUG (SyncWorker_6) [xiaomi_gateway] Registering device 158d00027bd726, remote.b286acn01 as: binary_sensor
Everything works fine in the Mi Home app. If I use the switches, this appears in the log:
2018-11-06 16:13:05 DEBUG (Thread-2) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'remote.b286acn01', 'sid': '158d00027bd726', 'short_id': 10533, 'data': '{"channel_0":"click"}'}
2018-11-06 16:13:06 DEBUG (Thread-2) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'remote.b286acn01', 'sid': '158d00027bd726', 'short_id': 10533, 'data': '{"channel_1":"click"}'}
2018-11-06 16:13:07 DEBUG (Thread-2) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'remote.b286acn01', 'sid': '158d00027bd726', 'short_id': 10533, 'data': '{"channel_0":"click"}'}
The switch is actually working and can be used in automations BUT something else is off, there is no log book entry for the button presses (log book entries are appearing for the door sensors) and the history also does not display state changes. Any ideas?
Please feel free to close this if its just pending on me. I moved my devices to Deconz.
Please do not close this, I do have the same issue
yes.. same here
The switch is actually working and can be used in automations _BUT_ something else is off, there is no log book entry for the button presses (log book entries are appearing for the door sensors) and the history also does not display state changes. Any ideas?
I believe button presses don't reflect in state changes. there is a special attribute called last pressed (at least for the wireless gen1 switches, the round ones). At least long_click_press and afterward hold are registered there but double click nor one click aren't. They do however work in my setup (currently with just one gateway but the second should arrive one of these days).
my automation for the wireless switch for a single click:
alias: Aqara Switch HomeTheater Single Click
trigger:
- platform: event
event_type: click
event_data:
entity_id: binary_sensor.switch_aqara_hometheater
click_type: single
action:
- service: switch.turn_on
entity_id: switch.wol_nas
- service: media_player.turn_on
entity_id: media_player.tv_living_room
- service: media_player.turn_on
entity_id: media_player.onkyo_txrz1100
- delay: '00:00:03'
- service: switch.turn_on
entity_id: switch.wol_htpc
- delay: '00:00:02'
- service: media_player.select_source
data:
entity_id: media_player.tv_living_room
source: 'HDMI2'
- service: media_player.select_source
data:
entity_id: media_player.onkyo_txrz1100
source: 'HTPC'
Same issue here
I have same issue, but sometime it working well, sometime don't.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
button presses are correctly reported in frontend now (I'm currently still running 0.94). so this issue should be closed
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 馃憤
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.