Xiaomi Gateway Integration

there is another problem.
17-03-26 17:35:30 WARNING (Thread-4) [netdisco.ssdp] Error fetching description at 192.168.0.156
17-03-26 17:47:40 ERROR (MainThread) [custom_components.xiaomi] Cannot connect to Gateway
17-03-26 17:47:40 ERROR (MainThread) [custom_components.xiaomi] No data in response from hub None
17-03-26 17:47:40 ERROR (MainThread) [homeassistant.core] Timer got out of sync. Resetting

is anyone have the same problem?everything works fine. but the log shows the problem.

It is due to sub optimal threading in the component.
I have tried to fix it here: https://github.com/Danielhiversen/homeassistant

it’s worked ! Thank you for your quickly reply.
another question
17-03-26 22:20:15 WARNING (Recorder) [homeassistant.components.recorder] Ended unfinished session (id=203 from 2017-03-26 14:19:11.698193)
17-03-26 22:20:40 WARNING (Thread-11) [netdisco.ssdp] Error fetching description at 192.168.0.156
I don’t know what’s wrong with the recorder.

I’m also getting errors from the recorder:

Exception in thread Recorder:
Traceback (most recent call last):
File “/usr/lib/python3.4/threading.py”, line 920, in _bootstrap_inner
self.run()
File “/home/hass/lib/python3.4/site-packages/homeassistant/components/recorder/init.py”, line 250, in run
domain = split_entity_id(entity_id)[0]
File “/home/hass/lib/python3.4/site-packages/homeassistant/core.py”, line 63, in split_entity_id
return entity_id.split(“.”, 1)
AttributeError: ‘NoneType’ object has no attribute ‘split’

This results in “unfinished session” warning on next start of hass

When I revert to my latest pull request commit this error is gone and everything functions properly.

Well, I received my 5 door sensors, 3 motion sensors, 4 temp sensors and hub last night.

All updated, and hooked up to mihome - seems to work a treat. Can’t get over how tiny each unit is!

So, time to start integrating to home assistant tonight!

Anyone have great pointers for a successful hookup?

Thanks folks!

It’s all very straightforward and covered in the instructions. I reckon you’ve knocked off the hardest part already, once you’ve done the mi home side of things it’s all smooth sailing.

In fact, it all works so well I’m considering buying another (3rd!) batch of sensors plus some of the power point switches and getting rid of all my zwave stuff.

what??

I was going the other route …

Can you elaborate on that?

My biggest complain of the xiaomi hub is that it seems to me that the mesh network is not working … plus some items missing like the zwave switches that go inside existing electrical switch

you mean power plugs?

They are cool, but for me in europe not too useful since I need a double phisical adapter

1 Like

I agree with @anon35356645 I’m having very mixed results. I also don’t think the mesh is working as my range is very limited. (Unless you need multiple power plugs not just one?)

Seems the switches are intermittent which is making this whole setup not wife friendly.

I am also having the same issues with reboots where the hub disappears and needs a power cycle which has come up all of a sudden after weeks of it working fine

Strangely the temp sensors and door sensors are great it’s just the switches that are the biggest worry.

The great thing about perpetually renting and never owning your own house is you don’t ever have to worry about stuff like this. At least that is what I tell myself.

I have no idea if it works or not but I’m having no issues in a two story house with double brick walls. I have my hub right next to the wifi router but everything else is scattered. Responsiveness for example motion detection to light switching on is at least two or three times faster than my zwave multi sensors via usb stick.

Australia is the same as China almost - the hub plugs straight in, as a bonus USA plugs fit too as long as you bend the pins at a 45 degree angle with pliers. ( But you should never ever do that :wink: )

Bugger. We have the same problems with the Orvibo S20 / TP Link so that is what I was looking to replace - I don’t have any of the power plug things yet so was expecting the same results as the sensors which I do have. As for the power cycle - this is only when my modem restarts, restarting the Pi is fine same with the S20’s. . Cycling the power on a single hub when the router is reset is no problem for me - a lot easier than going around the whole house and doing all the hard to get at plug adapters.

what you mean with intermittent?

please don’t, it is very very dangerous

I have some Yeelight bulbs, maybe I will use those too.

How to check if the mesh network is working. Are there any apps, or way to check the zigbee signal?

press the switch… nothing happens.

come back in 10min press the switch… works… no reboot… nothing?! Just sometimes the message doesn’t get across.

The swittch is near the hub too!

Yeelights are wifi aren’t they? The ones I have are anyway… so that might not help.

I see.

This happens to me also with 433Mhz power plugs, when using HASS+RMPRO

Overall the technology is cool, although not “Wife reliable” ready

mmhh they are not zigbee? Ohh bummer, How to check if are wifi or zigbee …? I thought they were zigbee like the Hue bulbs

The MiHome app it controls them … but yeah, the app copuld be a controller for a mix of zigbee and wifi items

How did you set them up? I had to add wifi details…

I have a two of these (wifi)

http://www.gearbest.com/smart-lighting/pp_361555.html

The MiHome and Yeelight app identifies them automatically, I never thought about it … I just assumed they were zigbee, but you may be right … I dont’ know!

that makes me worry about my strategy to move to zwave …

Are you sure is the zwave technology fault, or not something related to you hw/sw installation?