Xiaomi Gateway Integration

Please delete the complete custom_components folder and restart home assistant. This is the required configuration of the official component:

xiaomi:
  gateways:
    - mac: 
      key: asdfasdfasdf

It should work out of the box if you use the correct key.

Thanks Syssi for your time. Finally it worked by removing all xiaomi.py files, except the one from “light” subfolder.
But in the end the result was exactly the same with the one obtained via official component - still no RGB control of the hub light etc. For this reason I have restored the config using a snapshot taken earlier.
Thanks for your time

That is the problem. No swing event. Only pairing. Wonder how it can be fixed

The only way I was able to play with hub’s light color and brightness was using a service like this:

{
“entity_id”:“light.gateway_light_xxx”,
“brightness_pct”:100,
“rgb_color”:[96,189,223]
}
Later edit: I just saw that I can change the color/brightness settings directly from HA frontend :

Please make it work with the xiaomi philips bulb:

http://www.gearbest.com/smart-lighting/pp_644095.html?wid=21&utm_source=tt_de

It would need to be a different component. This component integrates with the zigbee gateway (only). Perhaps the xiaomi wifi socket component or yeelight are closer matches?

I read somewhere that no Developer Mode was included in these lamps, as it was in Yeelight. That might make this work without Mi Home app, a bit more challenging.

Hi all
I am wondering if anyone is having a same issue as mine. My xiaomi zigbee door sensor is not counting “Open since: 0”. Is this a known issue or bug?

Thanks!

However on the Mi Home app itself, it register without issue

image

If the door/window is closed at the moment of reading … then it’s normal

Hi there
Im not sure what you mean by that.

It doesnt even register in history
image

Thank you for reply. I solve that problem. Fw:1.4.1_149
I have another problem now. Window, door, motion and temp sensors automatic offline a few hours later. “Device Offline” I want to device online always. Can I do it online always?

Have you tried Philips Hue Platform? Since it is Philips as well.

In the mi home app is it possible to be notified more than ¹ minute is a window/Door sensor stays open?

Philips hue is another zigbee ecosystem. These Philips/xiaomi bulbs are wifi.
For less than £10 they look very appealing…

I just wrote a proof of concept to integrate the xiaomi philips led ball into home assistant:

The light can be turned on and off already.

4 Likes

Just came back after a search to report there was some success here https://github.com/rytilahti/python-mirobo/issues/17

But you took it one step further already…

Do these bulbs open a persistent connection to xiaomi servers?

Yeay! Brightness works, too.

1 Like

Exceptions in my log and no lights in HASS dev branch. I manually installed the dependency (python-mirobo) from the url in the py file.

2017-08-14 08:40:22 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
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/light/philipslight.py”, line 109, in update
state = self.light.status()
File “/home/homeassistant/.homeassistant/custom_components/light/philipslight.py”, line 83, in light
from mirobo import Ceil
ImportError: cannot import name ‘Ceil’

Please enter the virtualenv of your home assistant installation (if there is one) and install the following dependency:

pip install --upgrade "https://github.com/syssi/python-mirobo/archive/87998cad53ad0c5802dc562497a7606983903c57.zip#python-mirobo"

I hope @teprrr will merge the ceiling lamp in python-mirobo tonight. I will switch back to upstream then.

Didn’t work for me. Still getting the same error. BTW I’m using the ball bulbs and not the ceiling light. Guess I’ll wait for the merge.