Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update-firmware not working for Roborock S5 #1000

Closed
esnovo opened this issue Mar 30, 2021 · 5 comments
Closed

Update-firmware not working for Roborock S5 #1000

esnovo opened this issue Mar 30, 2021 · 5 comments
Labels

Comments

@esnovo
Copy link

esnovo commented Mar 30, 2021

Describe the bug

I've build a new firmware image and when I try to update roborock using mirobo nothing happens:

Without debug

$ mirobo --ip 172.162.2.15 --token xxxxxxxxxx update-firmware 'http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg' '174e4db6ae270581a2b9a6cb4d8acc5c'
Going to update from http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg
Using http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg (md5: 174e4db6ae270581a2b9a6cb4d8acc5c)
Update started!
0%|
$

Debug enabled:

$ mirobo -d --ip 172.162.2.15 --token xxxxxxxxxx update-firmware 'http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg' '174e4db6ae270581a2b9a6cb4d8acc5c'
INFO:miio.vacuum_cli:Debug mode active
DEBUG:miio.vacuum_cli:Read stored sequence ids: {'seq': 120, 'manual_seq': 0}
DEBUG:miio.vacuum_cli:Connecting to 172.162.2.15 with token xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Going to update from http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg
Using http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg (md5: 174e4db6ae270581a2b9a6cb4d8acc5c)
DEBUG:miio.protocol:Unable to decrypt, returning raw bytes: b''
DEBUG:miio.miioprotocol:Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x04p\x9a\xe5a\xf1' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('04709ae5')
ts = 2021-03-29 15:25:20
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
DEBUG:miio.miioprotocol:Discovered 04709ae5 with ts: 2021-03-29 15:25:20, token: b'ffffffffffffffffffffffffffffffff'
DEBUG:miio.miioprotocol:172.162.2.15:54321 >>: {'id': 121, 'method': 'miIO.ota', 'params': {'mode': 'normal', 'install': '1', 'app_url': 'http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg', 'file_md5': '174e4db6ae270581a2b9a6cb4d8acc5c', 'proc': 'dnld install'}}
DEBUG:miio.miioprotocol:172.162.2.15:54321 (ts: 2021-03-29 15:25:20, id: 121) << {'result': ['ok'], 'id': 121}
Update started!
0%| | 0/100 [00:00<?, ?it/s]DEBUG:miio.miioprotocol:172.16s.2.15:54321 >>: {'id': 122, 'method': 'miIO.get_ota_state', 'params': []}
DEBUG:miio.miioprotocol:172.162.2.15:54321 (ts: 2021-03-29 15:25:20, id: 122) << {'result': ['idle'], 'id': 122}
0%| | 0/100 [00:00<?, ?it/s]
DEBUG:miio.vacuum_cli:Writing {'seq': 122, 'manual_seq': 0} to /home/john/.cache/python-miio/python-mirobo.seq

$

When I try to troubleshoot the error and ssh into the roborock looking for logs I don't find anything relevant.
When issuing the command "miio_recv_line" I see the command is being issued correctly:

{"method":"miIO.ota","params":{"mode":"normal","install":"1","app_url":"http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg","file_md5":"174e4db6ae270581a2b9a6cb4d8acc5c","proc":"dnld install"},"id":414798309}

But nothing happens and no request is made to the HTTP server to retrieve the image. The update simply fails without any error.

Unfortunately due to firewall restrictions I can only install the firmware remotely and not locally. So there aren't any other possibilities.

Version information (please complete the following information):

  • OS: Fedora Linux
  • python-miio: miiocli, version 0.5.5.2

Device information:
If the issue is specific to a device [Use miiocli device --ip <ip address> --token <token> info]:

  • Model: roborock.vacuum.s5
  • Hardware version: Linux
  • Firmware version: 3.5.8_002020

To Reproduce
Steps to reproduce the behavior:

  1. Invoke mirobo --ip xx.xx.xx.xx --token xxxxxxxxxx update-firmware 'http://xx.xx.xx.xx/vacuum_2034_valetudo_2021_03_0.pkg' 'md5sum' in order to trigger an update.

Expected behavior
The update should start and one should be able to observe a request being made on the HTTP server to retrieve the firmware image.

All other commands though mirobo works without any issues.

@esnovo esnovo added the bug label Mar 30, 2021
@esnovo esnovo changed the title Update-firmware not working Update-firmware not working for Roborock S5 Mar 30, 2021
@rytilahti
Copy link
Owner

Are the devices in the same network? Also, iirc, some (newer) firmwares disabled firmware updates from local network as a hardening measure, which may be the case here.

@winebob
Copy link

winebob commented Apr 26, 2021

I'm having the same issue (2034 firmware). Any idea what the latest firmware that still supports updating on a local network?

@esnovo
Copy link
Author

esnovo commented Apr 26, 2021

Was able to solve this by doing a reset and by unprovisioning the robot. After this I was finally able to update it on through my local network.

@rytilahti
Copy link
Owner

Okay, let's close this then! 👍 @winebob, did you do a reset and try to do the update on non-provisioned device? If not, you should try that out. Alas, I haven't seen anyone keeping track of information about changes between versions, so the question when this blocked is not easy to answer.

@winebob
Copy link

winebob commented May 12, 2021

I tried the build setting --enable-local-ota which solved my issue, missed that option before.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants