No. The new component is about the xiaomi gateway (zigbee) and sub devices (sensors & actors). The devices (air purifier & wifi plug != zigbee plug) mentioned here are WiFi devices and won’t official supported right now.
@syssi, wouldn’t it make sense (or wouldn’t it be possible) to merge support of both lines of Xiaomi products, Zigbee and non-Zigbee, in a common component? Here we’re talking about air purifier and sockets, but there are others that are only WiFi: IR remote, Vacuum robot, etc…
Well, I don’t know. I still have no gateway (is on the way), but I supposed it would make sense to have a common platform with maybe optional parameters on the configuration, based on the type of device… It was just a suggestion…
I’m still seeking for good reasons to merge the WiFi components into one platform. I don’t recommend a merge into the xiaomi gateway platform because of the different network protocol (multicast) and the different token/key handling. IMHO the xiaomi gateway and the WiFi devices doesn’t have much in common.
Since @teprrr introduced the “-d info” command it looks like we are able to identify the different devices by a nice model name (f.e. philips.light.bulb, philips.light.ceiling, zhimi.airpurifier.m1). A common component for switches and lights with network discovery and device/feature detection would be awesome.
Did you manage to make it work?
I followed all the steps but when I run the manual to learn a command it gives me a timeout error
File “/config/custom_components/switch/chuangmi_ir.py”, line 67, in _learn_command
Ir_remote.send (“miIO.ir_learn”, {‘key’: str (key)})
File “/config/deps/lib/python3.6/site-packages/miio/miio.py”, line 128, in send
Date, addr = s.recvfrom (1024)
Socket.timeout: timed out
Yes, I made it work. All you have to do is specify a “timeout” parameter, the same you would use with the broadlink RM switch component. It means the time that the device will wait for you to send it a code from your remote.
Once you put that parameter, everything works as indicated.
I’ve updated my xiaomi plug component. It’s called “xiaomi_plug” now as preparation for the future merge into home assistant. Furthermore it uses asyncio now and reacts better on state changes (the switch doesn’t flip back anymore):
Could you post a graph showing air quality? Does it have significant effect on air quality (dust) running the purifier? I am considering buying one myself…
It’s just an untested draft. Do you own the device and willing to test the component? I fixed some glitches. Just give it a try and please provide a screenshot if the fan will be shown in the frontend. I’m interested in the provided attributes.
hi
im getting ImportError: No module named ‘zeroconf’`
What can I do? I am running the venv on raspi3
Thanks
Traceback (most recent call last): File "/usr/lib/python3.4/asyncio/tasks.py", line 233, in _step result = coro.throw(exc) File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 381, in async_process_entity new_entity, self, update_before_add=update_before_add File "/srv/homeassistant/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 212, in async_add_entity yield from self.hass.async_add_job(entity.update) File "/usr/lib/python3.4/asyncio/futures.py", line 388, in __iter__ yield self # This tells Task to wait for completion. File "/usr/lib/python3.4/asyncio/tasks.py", line 286, in _wakeup value = future.result() File "/usr/lib/python3.4/asyncio/futures.py", line 277, in result raise self._exception File "/usr/lib/python3.4/concurrent/futures/thread.py", line 54, in run result = self.fn(*self.args, **self.kwargs) File "/home/homeassistant/.homeassistant/custom_components/switch/xiaomiplug.py", line 115, in update from mirobo import DeviceException File "/srv/homeassistant/lib/python3.4/site-packages/mirobo/__init__.py", line 12, in <module> from mirobo.discovery import Discovery File "/srv/homeassistant/lib/python3.4/site-packages/mirobo/discovery.py", line 2, in <module> import zeroconf ImportError: No module named 'zeroconf'