Xiaomi integration and multicast problem

Hi,

Xiaomi integration is not working for me. My gateway can’t be controlled from HA. It does show up on my home overview window, but it looks like my router does not support multicast.

After running “ngrep port 9898” I notice there’s packages missing. Some like this one, indeed:
{"cmd":"heartbeat","model":"gateway","sid":"XXXXXXXXXXXX","short_id":"0","token":"XXXXXXXXX ","data":"{\"ip\":\"192.168.1.206\"}"}

So, changing the router is the only chance I have? Any workaround? Thanks!

Bump! I’m desperate :frowning:

You can try to apply this patch: https://github.com/Danielhiversen/PyXiaomiGateway/compare/master...invalid_key
Locate the PyXiaomiGateway folder and change the __init__.py file

Hey Daniel, I tried the patch and doesn’t seem to work.

[homeassistant.components.xiaomi_aqara] No gateway discovered
[homeassistant.setup] Setup failed for xiaomi_aqara: Component failed to initialize.

Thanks, but I still get the same error :-/

Bump! I’m still desperate! :frowning:

I have found the problem!! I’m running HA on a VirtualBox machine, and it’s VB the one blocking the multicast packages. I just installed HA on another machine (not virtual) and it works! Moving on to the VirtualBox forums.

Thanks

Buy a new cheap WiFi hotspot for it… I had the same problem with tplink gear xiaomi have a $30 one I would hope would work

I just used my really old WiFi router made it a bridge and it solved all my issues.

I don’t know whether that’s going to fix it. The problem is on Virtualbox’s end, so I need to fix that first, since HA runs on it :slight_smile:

True, if that a go first

If you have another WiFi around that you use to easily test could be worth a shot if it easier

Sorry, but I’m not following… Infested my setup with the same WiFi network, but on another machine. That worked. So I’m sure the problem is the cureenr machine (VirtualBox).

Ok, I found the problem. It seems either Windows or VirtualBox is blocking the multicast packages. I installed HA in the Windows host machine and the Xiaomi integration works well.

But it does not work on the Ubuntu guest machine on VirtualBox. I tried a lot of approaches from the VirtualBox forums, but I still get nothing. I’ve also completely disabled Win 7 firewall. This resulted in the integration working, but after a reboot I got back to the “invalid key issue”, related to not getting multicast packages. I’m going nuts! :frowning:

Hey MarceCastro,

I am just running into the same problems. Xiaomi sensors showing up but not working when running Hass.io in a VM within virtualbox.

Did you ever find a solution to this problem?
When you say you ran HA in windows, how did you do that? In a docker?

My forum post with my problem is here: Xiaomi sensors show up but don't update on new VM Hass.io instance

Sorry, but I didn’t find a fix. So I ended up buying a Pi 3 :frowning:

Same problem here with virtual box and Xiaomi

Same here hassio on VM (qemu) on Synology

Same problem here running HA on Pi3 (ethernet) with 2 x asus AC88U running as a mesh.

Hello All. Did anyone ever find a solution to the Xiaomi/VM/HASSIO issues?