Danielhiversen / PyXiaomiGateway

PyXiaomiGateway
MIT License
152 stars 55 forks source link

Aqara Smart Wireless Switch / new international version with "hold" action #118

Closed loly-girl closed 5 years ago

loly-girl commented 5 years ago

{'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001e792b8', 'short_id': 1212, 'data': '{"voltage":3055}'}

silvanverschuur commented 5 years ago

I think I've got the same device. The button has support for single press, double press and long press.

{'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0002132a4b', 'short_id': 2589, 'data': '{"voltage":3165}'}

elect0nik commented 5 years ago

me too. {'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001ef86d7', 'short_id': 61851, 'data': '{"voltage":3115}'}

jussbba commented 5 years ago

{'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001e89157', 'short_id': 26708, 'data': '{"voltage":3085}'}

donrico1988 commented 5 years ago

{'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001ef8950', 'short_id': 9992, 'data': '{"voltage":3045}'}

bengizmo commented 5 years ago

Got two devices here: {'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001ef628a', 'short_id': 54475, 'data': '{"voltage":3085}'} {'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001ef8a95', 'short_id': 28145, 'data': '{"voltage":3085}'}

Apipa169 commented 5 years ago

{'cmd': 'read_ack', 'model': 'remote.b286acn01', 'sid': '158d0002829eef', 'short_id': 22828, 'data': '{"voltage":3055}'}

jussbba commented 5 years ago

This is my other device: {'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001e7d4b1', 'short_id': 16072, 'data': '{"voltage":3075}'}

Thanks!

heartkingz commented 5 years ago

Two aqara smart switches with the same problem:

{'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001ef39f5', 'short_id': 30302, 'data': '{"voltage":3055}'}

{'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001e7a115', 'short_id': 19855, 'data': '{"voltage":3055}'}

fcollingwood commented 5 years ago

I have this issue too: {'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d0001e79089', 'short_id': 2100, 'data': '{"voltage":3165}'}

jrkoiter commented 5 years ago

Same here: {'cmd': 'read_ack', 'model': 'remote.b1acn01', 'sid': '158d00021346e8', 'short_id': 25639, 'data': '{"voltage":3135}'}

jrkoiter commented 5 years ago

I got this working by using latest source of Home Assistant. That uses latest version of this library, and also has some code changes to accommodate this switch.

heartkingz commented 5 years ago

I got this working by using latest source of Home Assistant. That uses latest version of this library, and also has some code changes to accommodate this switch.

You mean by updating to 0.80.3? Mine still flagged as unsupported in the log.

WilliamNL commented 5 years ago

0.80.3 didn't change a thing unfortunately.

fcollingwood commented 5 years ago

Has been added here in line 235:

https://github.com/Danielhiversen/PyXiaomiGateway/blob/master/xiaomi_gateway/__init__.py

But I've got no idea how to add this to Hass.io

fcollingwood commented 5 years ago

Right. Had to add the file referenced above to config/xiaomi_gateway (Note: NOT config/custom_components/xiaomi_gateway) and also add an edited version of xiaomi_aqara.py to config/custom_components/binary_sensor (Edited to add the new switch model name on line 39).

It is now detected, but I am not sure if I'm seeing any events from it other than "hold". This was supposedly fixed in #108 but has not been completely fixed

jrkoiter commented 5 years ago

The required changes are not yet part of a release. I updated the following three files to latest git revision:

components/binary_sensor/xiaomi_aqara.py
components/remote/xiaomi_miio.py
components/xiaomi_aqara.py

I"ll wait with upgrading HA until this is part of the release.

syssi commented 5 years ago

The device support will be part of HA 0.81.