You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Connect your computer to a local network using Ethernet. Your computer will have IP address 10.10.10.100. This must be the first network.
Connect your computer to the Roborock using Wifi. Your computer will have IP address 192.168.8.100, whereas Roborock is 192.168.8.1.
Run mirobo --ip 192.168.8.1 --token A123 update-firmware v.pkg
Actual result:
Going to update from ../v.pkg
INFO:miio.updater:Serving on 0.0.0.0:45173, timeout 10
INFO:miio.updater:Using local ../v.pkg (md5: ...)
Hosting file at http://10.10.10.100:45173/v.pkg
Update started!
0%| | 0/100 [00:05<?, ?it/s]
ERROR:miio.updater:No request was made..
Note that the web server serves from 10.10.10.100. That's the wrong IP address. It cannot work from 192.168.8.1.
Expected result:
oing to update from ../v.pkg
INFO:miio.updater:Serving on 0.0.0.0:36729, timeout 10
INFO:miio.updater:Using local ../v.pkg (md5: ...)
Hosting file at http://192.168.8.100:36729/v.pkg
Update started!
0%| | 0/100 [00:00<?, ?it/s]192.168.8.1 - - [01/Nov/2019 06:01:24] "GET /v.pkg HTTP/1.1" 200 -
INFO:miio.updater:Got a request, should be downloading now.
Installation started, please wait until the vacuum reboots
Downloading: 98%|████████████████████████████▍| 98/100 [04:35<00:05, 2.82s/it]
The HTTP server must use the local IP address on the network interface on which the roborock is connected.
def find_local_ip():
...
for iface in ifaces_without_lo:
addresses = netifaces.ifaddresses(iface)
...
for entry in addresses[netifaces.AF_INET]:
_LOGGER.debug("Got addr: %s" % entry["addr"])
return entry["addr"]
There is no consideration of the network or IP address on which the Roborock is. It just takes the first non-local network. That's the bug.
Fix:
Pass in the Roborock IP address
Select the local address that is in the same subnet as the Roborock IP.
You may cheat and assume that the network has a netmask of /24 = 255.255.255.0, which means you can just strip after the last dot and match the local address for that.
E.g. select addresses that start with 192.168.8..
The text was updated successfully, but these errors were encountered:
Reproduction:
mirobo --ip 192.168.8.1 --token A123 update-firmware v.pkg
Actual result:
Note that the web server serves from 10.10.10.100. That's the wrong IP address. It cannot work from 192.168.8.1.
Expected result:
The HTTP server must use the local IP address on the network interface on which the roborock is connected.
Code:
miio/updater.py find_local_ip()
There is no consideration of the network or IP address on which the Roborock is. It just takes the first non-local network. That's the bug.
Fix:
You may cheat and assume that the network has a netmask of /24 = 255.255.255.0, which means you can just strip after the last dot and match the local address for that.
E.g. select addresses that start with
192.168.8.
.The text was updated successfully, but these errors were encountered: