Closed cissusnar closed 6 years ago
did I need a root privileges to run this command ?
Local Discovery doesn't interact with NAT. What matters is that they're on the same subnet. You shouldn't need root. Most likely there's some firewall stuff going on with your computer? Or a very hostile network router/access point that doesn't allow broadcast traffic at all?
Can you discover other things on your network, like windows file shares? like mdns or upnp/netbios stuff?
what are the xiaomi devices? not all of them support local networking I think.
sorry that "NAT", I mean is subnet, these xiaomi devices at subnet 192.168.2.xxx
Two Mi Smart Socket Plug and one Air Purifiers 2 My router is a gentoo linux, and no firewall rules on my subnet. I can access any computer and any port on this subnet. I run "miio --discover" on my router. did miio detect all subnet or only follow default route table ?
Thank you for opening an issue! Miio uses a UDP broadcast that the Xiaomi devices reply too. In some networks setups the UDP broadcast are blocked.
Does your router have Avahi and mDNS-capabilities? Devices should announce themselves using _miio._udp
as well.
Do you have any other computer where you could test running the miio --discover
command to see if works?
hi @aholstenson My router running Avahi as mDNS provider(used by shairport-sync that is a AirPlay service). and iptables allow all input, output and forward by default. Did miio has a verbose mode or debug mode? I'll try running miio --discover on another computer later.
thanks for reply
miio --discover
success on another computer, but it's still no response running on my router.
I think miio does not find the right subnet, or should detect all subnet. I have three subnet interface on my router.
same here. When I discover device using other computer and then try --inspect on router itself it says "could not find device". Router in my case is in two networks (192.168.1. eth, 192.168.3. wlan0)
On router the device is visible when doing "arp -a" command, but can't connect to it through miio.
EDIT: used workaround by moving purifier to subnet in which nodejs host is not a router.
Closing this issue, moving all discovery issues into #92.
I have 3 xiaomi devices on my local nat, when I run miio --discover, it'll stay in "INFO Discovering devices. Press Ctrl+C to stop." and no any other result return.