I just started to integrate the Xiaomi Mi Air Purifier and wifi mi plug into HASS (there)
It works perfectly with one device, but as soon as I put 2 (air purifier + wifi plug), it leads to a checksum error.
It seems that the devices are sharing the same instance from the platform.
got error when receiving: wrong checksum, read b’ffffffffffffffffffffffffffffffff’, computed b’d244a4aeb1074936b12dcac897c0799f’
It may be better to use some kind of hub for Xiaomi devices (like in the light platform example) but I prefer to have your opinion on it beforehand.
Does the wifi switch work for you?
I’m currently just using the mirobo component in a switch from here.
I can discover the device by running “mirobo discover”. I even get the ip and they key back.
This is my config.
switch:
platform: mirobo
name: ‘name’
host: Ip
token: Token
I get the error as below
2017-05-17 11:12:18 ERROR (Thread-8) [custom_components.switch.mirobo] Got exception while fetching the state: timed out
Hi, i’m also very interested about the integration between Xiaomi air purifier 2 and Home assistant. Can you write a step by step guide to do it?
I actually have the xiaomi gateway with zigbee socket plugs, switches, door sensors and temperature sensor, everything works except for the purifier and a Smart Wifi Socket Plug ZNCZ02CM
Did you find a solution? I get the following error:
2017-06-04 13:43:41 INFO (Thread-3) [custom_components.switch.mirobo] initializing with host 192.168.0.81 token b'8735e7bd8f10b45ea6708ba89c1a4f7b'
2017-06-04 13:43:41 ERROR (Thread-3) [custom_components.switch.mirobo] Got exception while fetching the state: non-hexadecimal number found in fromhex() arg at position 0
I’m using (trying to…) the mirobo-component as a switch for the plug as well.
It also offers CLI to manage devices. I’m thinking of heading down the path of using this only for the switch.
I’m holding back as it seems like a bit of an overkill to install node.js on the pi to just switch on/off a switch with HA.
Well I assume this repo isn’t maintained anymore? Currently I’m stuck with the error
Cannot import name ‘device’
I’ve opened an issue at his GitHub-repo… Just in case.
For now I’ve to schedule my plug with the Xiaomi-App. But maybe someday someone with more knowledge of python than me (which shouldn’t be difficult :-D) integrates this thing into HA.
If anyone of you is still interested: it works now for me. I did the following (assuming you have the token and the device’s IP).
Where to put the files: custom_components/switch/xiaomi.py --> /home/homeassistant/.homeassistant/custom_components/switch/xiaomiplug.py (I had to rename it - because of my integration of the Gateway)
I put the folder “xiaomi” under: /home/homeassistant/.homeassistant/
And after adding the following to my configuration.yaml I got it working (remember to change the platform according to the name of the file you put under custom_components:
No. I put the xiaomi.py under my /home/homeassistant/.homeassistant/custom_components and the folder (!) xiaomi under /home/homeassistant/.homeassistant/ (ie. one level above the custom_components-folder