Danielhiversen / PyXiaomiGateway

PyXiaomiGateway
MIT License
153 stars 55 forks source link

Unsupported device: Aqara Wireless Remote Switch (New version) #88

Closed thomassiu closed 6 years ago

thomassiu commented 6 years ago

Hi,

I've recently bought the latest version of Aqara Wireless Remote Switch (Double) and got the following error:

[xiaomi_gateway] Unsupported device found! Please create an issue at https://github.com/Danielhiversen/PyXiaomiGateway/issues and provide the following data: {'cmd': 'read_ack', 'model': 'remote.b286acn01', 'sid': '158d000282a212', 'short_id': 40171, 'data': '{"voltage":3055}'}

martininio commented 6 years ago

Also received the Aqara Wireless Remote Switch (Double Rocker) and got the following error when added the device to home assistant:

Please create an issue at https://github.com/Danielhiversen/PyXiaomiGateway/issues and provide the following data: {'cmd': 'read_ack', 'model': 'remote.b286acn01', 'sid': '158d00027c1f6a', 'short_id': 51499, 'data': '{"voltage":3155}'

Home assistant version: 0.77.3 Gateway model: lumi.gateway.v3 Current firmware version: 1.4.1_157.0143 hw_ver: MW300

martininio commented 6 years ago

the model written on the box: WXKG02LM. Ha log shows data when clicking the buttons

[xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'remote.b286acn01', 'sid': '158d00027c1f6a', 'short_id': 1502, 'data': '{"channel_1":"click"}'} 2018-09-16 22:36:44 DEBUG (Thread-3) [xiaomi_gateway] MCAST (report) << {'cmd': 'report', 'model': 'remote.b286acn01', 'sid': '158d00027c1f6a', 'short_id': 1502, 'data': '{"channel_0":"click"}'} 2018-09-16 22:36:48 DEBUG (Thread-3)

martininio commented 6 years ago

I applied the following workaround to get my switches (model 'remote.b286acn01') working:

  1. Download the file: https://github.com/Danielhiversen/PyXiaomiGateway/blob/master/xiaomi_gateway/__init__.py

  2. Copy the file to home assistant location \\HOMEASSISTANTIP\config\xaiomi_gateway note: if xiaomi_gateway folder doesn't exist, just create it.

  3. Download the file: https://github.com/home-assistant/home-assistant/raw/master/homeassistant/components/binary_sensor/xiaomi_aqara.py

  4. Copy this file to: \\HOMEASSISTANTIP\config\custom_components\binary_sensor note: if \custom_components\binary_sensor folders do not exist, just create them.

  5. Open the file "init.py" (with a text editor like Notepad++)

  6. add 'remote.b286acn01', to line 247

  7. Open the file "xaiomi_aqara.py" (with a text editor like Notepad++)

  8. add 'remote.b286acn01' to line 53

  9. Reboot Home Assistant. Now you will find your switch as a binary_sensor entity ID

domwonghk commented 6 years ago

single and double click are all right but "long_click_press" can not be used upon automation