Xiaomi Gateway Integration

It’s not a problem implementing 2 gateways at all because they have different id. It’s just that auto hub discovery will not work. And homebridge aqara is not using auto discovery so there’s no problem on their side.

Wifi plug is not be controllable through the hub. the hub can only control zigbee devices. Go get some zigbee plug :wink:

Yeah as you mentioned. It’s hard to get it here in PH. I already have HS100 and an orvibo (unreliable) so I’m going to opt for some TP-Links for now.

if you’re using HA, consider switching to Homebridge HomeAssistant plugin. You won’t need Homebridge Aqara plugin anymore because xiaomi is now integrated into HA

1 Like

Does orvibo connects to other Zigbee HA/ZLL devices that’s not from Orvibo? E.g. xiaomi zigbee sensor or cree bulb? I have a couple of zigbee devices in ST that i wanted to move to a local zigbee hub

No, they’re wifi plugs too and are supported by HA.

oh, i thought you have the orvibo hub…

Does anybody know is Xiaomi hub compatible with any other zigbee switch? Aqara has square mounting place and in my region it’s round.

I’ve made progress… ive figured out the hub ID - just had to get access to an android, got the new version from git and placed it in the custom config… looks like its loading but its stuck on

INFO:homeassistant.bootstrap:Setting up xiaomi

excellent work thus far on the @rave ill spend a few hours on this tomorrow trying to get it all setup then ill shout you a few beers for all your troubles!!!

If you testing this on laptop try with wired connection.

1 Like

Thanks! I’ll do that tomorrow morning and let you know how I go.

Sounds great! Looks like it is having trouble either discovering the devices or setting up socket. Try wait for a while and see what errors comes after that.

Hi,

I was getting the same error message, the key from gateway was wrong (i must not save when exit da mihome app), after enabling again the developer mode a new key was generated and this error was fixed.

Carlos

1 Like

had the same issue. for me it was due to the fact I had multiple NICs

Got it hooked up via ethernet now… and double checked the Hub ID (yep… i got it wrong by one character)

Fingers crossed it works stuck at the same part again…

now I get this exception

INFO:homeassistant.bootstrap:Setting up xiaomi
ERROR:homeassistant.bootstrap:Error during setup of component xiaomi
Traceback (most recent call last):
File “\Programs\Python\Python35-32\lib\site-packages\homeassistant\bootstrap.py”, line 151, in _async_setup_component None, component.setup, hass, config)
File “\Programs\Python\Python35-32\lib\asyncio\futures.py”, line 361, in iter yield self # This tells Task to wait for completion.
File “\Programs\Python\Python35-32\lib\asyncio\tasks.py”, line 296, in _wakeup future.result()
File “\Programs\Python\Python35-32\lib\asyncio\futures.py”, line 274, in result raise self._exception
File “\Programs\Python\Python35-32\lib\concurrent\futures\thread.py”, line 55, in run result = self.fn(*self.args, **self.kwargs)
File “.homeassistant\custom_components\xiaomi.py”, line 40, in setup XIAOMI_HUB = XiaomiHub(key)
File “.homeassistant\custom_components\xiaomi.py”, line 100, in init self._mcastsocket = self._create_mcast_socket()
File “.homeassistant\custom_components\xiaomi.py”, line 179, in _create_mcast_socket sock.bind((self.MULTICAST_ADDRESS, self.MULTICAST_PORT))
OSError: [WinError 10049] The requested address is not valid in its context

sooo, I’ve setup ethernet, checked HUB id (and reset it 3 times and reentered…) then did it until I didn’t get an “L” because of the font I couldn’t tell if it was a 1 or L or i

xiaomi :
  key: 4wppswhinucrXXXX

Still stuck at

INFO:homeassistant.core:Bus:Handling <Event service_registered[L]: service=see, domain=device_tracker>
INFO:homeassistant.core:Bus:Handling <Event component_loaded[L]: component=device_tracker>
INFO:homeassistant.bootstrap:Setting up xiaomi

I’ve left it for at least 10min without any action…

Question - I noticed in the readme there is a space between xiaomi and the semi colin is that intentional “xiaomi :”

are you sure you don’t have multiple nics? things like vmware or virtualbox do install virtual network interfaces.
other thing to check: is multicast enabled at the router level?

I was having the same problem. I went back into the Mi Home app to check the pasccode and noticed that the top switch had turned itself off. Switching it on solved the error.
I have also removed the space before the colon.
I wish I had noticed two hours ago…
You can see the switch at the top of the screen:

This is my first post here - I am extrememly thankful to everryone who has worked to get to this stage even if it has highlighted that my plugs aren’t the Zigbee ones…

1 Like

My bad, there’s no space between them but i think that’s another problem. Maybe a problem with multicast. I’ll set a timeout in the code and see if you can get it to work