fison67 / mi_connector

Connector for Xiaomi Devices with Smartthings, Hubitat
MIT License
212 stars 597 forks source link

Can we add devices across VLANS #54

Closed Vo0D0oD closed 3 years ago

Vo0D0oD commented 4 years ago

Hi, I've just moved all of my Xiaomi devices into a different VLAN. They've all been reconnected and are functioning correctly in Mi Home.

After removing all of the old devices I've manually added them back in (including the new tokens) but all are coming back as

error | Initialize Wi-Fi Device >> Error ip(##.##.##.##), token=(###########################) : Error: Could not connect to device, handshake timeout

My MiConnector instance is sitting in a docker in the 10.1.1.0/24 subnet, the Xiaomi devices are all in 10.1.44.0/24 (VLAN 44). All routing appears to be correct and I can ping the Xiaomi devices from the docker Host.

Any idea what I can do to get cross VLAN connectivity working?

molepage commented 4 years ago

I have the exact same setup and problem. Subscribing!

@Vo0D0oD did you find a workaround?

@fison67 is there any additional information we can supply to help figure this one out? Thanks!

Vo0D0oD commented 4 years ago

@molepage I ended up moving the entire system running the docker image into the VLAN that the Xiaomi devices live in. Not what I wanted but I couldn't find any other workaround. I thought it might have been something to do with multicast but didn't have time to try to troubleshoot.

molepage commented 4 years ago

Thanks for the fast response. Ouch, not the path I want to take either. Regarding multicast, I've got an avahi-reflector that's fwding multicasts from my IOT VLAN to the docker VLAN, and it's working great for discovering Google devices.

rocket59 commented 4 years ago

Any progress on this? I'm in the same boat, and will probably end up using a pi zero on the same vlan as the devices as the app simply won't initialize the devices at all, even though I can assign the device a static ip.

@molepage did you get this the multicast reflector working for this?

molepage commented 4 years ago

No, not for this unfortunately. Still working great for Google devices though.

rocket59 commented 4 years ago

Thanks - hopefully the author will respond to this one day!

fison67 commented 3 years ago

Xiaomi devices are communicated with multicast packet on local network.

If there is other network, router must pass multicast packet each other.