rand256 / valetudo

Valetudo RE - experimental vacuum software, cloud free
Apache License 2.0
671 stars 74 forks source link

Upgrading Gen1 to 400X #167

Closed radokristof closed 4 years ago

radokristof commented 4 years ago

Hello!

I have tried updating the MiiO firmware to 4007. The download and the MD5 check was sucessful, it started the flashing, restarted, I was able to login to SSH with the default user/pass combination. It restarted itself a few times and the Webserver and Valetudo appered also, but the fw remained the old one. Should I need to update to 4004 first? Does anyone has success/experience with these firmwares? If I'm right these contain the stripped down Ubuntu right?

pidator commented 4 years ago

It restarted itself a few times and the Webserver and Valetudo appered also, but the fw remained the old one.

this sounds suspicious... I've never heard about a necessity to have a certain version before the upgrade. Have you tried a factory reset (via the buttons/reset button) and then the installation of the firmware?

If I'm right these contain the stripped down Ubuntu right?

No, only the Gen2 firmwares have the stripped down Ubuntu, for Gen1 you'll only have to downgrade the miio client to 3.3.9 for not losing the ability to to reflash locally again (but this is done in @rand256 or @zvldz images).

radokristof commented 4 years ago

@pidator Thanks for clarifying these. No I haven't tried resetting it again. Maybe I will try again, with 4004 now. With the original fw I had sometimes that it failed updating, but at that time the robot said that it was unsuccessful and downgraded... Now after I thought the install finished, these reboots was fast so I don't think it did a downgrade to a previous fw...

I don't really want to mess around with factory reset first, because it is a rather long procedure. It restores to a really old fw which I was unable to upgrade directly, I had to do one upgrade from the Xiaomi app first.

pidator commented 4 years ago

It restores to a really old fw which I was unable to upgrade directly, I had to do one upgrade from the Xiaomi app first.

afaik as long as the old fw has the old (<3.5.4) miio client, flashing an firmware file will replace everything thats needed to run the new firmware on the filesystem. I've never done a factory reset till now, but I've never read that someone had to do an update via mi home app first. so perhaps it's how you try to flash the robot after factory reset, I personally never had used any android or win app, I'm using the flasher.py script of the dustcloud repository. This script e.g. is going to collect the token automatically, so you don't have to care about it.

radokristof commented 4 years ago

@pidator That's great, I will try it, it makes it much faster if I don't have to mess with the token. I just had this assumption that I need to upgrade first, because when I first tried to replace the old fw with the new 4004 valetudo_re it said that the flash failed, but it might be that the firmware got corrupt when I sent the fw files (as @rand256 said, this is not so unusual)... Which MiiO version do you use right now? 4007?

pidator commented 4 years ago

...but it might be that the firmware got corrupt when I sent the fw files (as @rand256 said, this is not so unusual)...

yes, that's possible of course and would explain your problems. the wifi module of the robots doesn't have a high quality. Try staying close to the robot with your laptop while flashing to ensure a good signal level.

Which MiiO version do you use right now? 4007?

miio 3.3.9 on firmware 4004 ;) haven't tried the new imagefile yet, just updated the valetudo binary.

pidator commented 4 years ago

haven't tried the new imagefile yet, just updated the valetudo binary.

4007 0.9.2 works without any problems, too! Just want to mention: if you're going to use the mentioned flasher.py script, the robot has to be in unprovisioned state and you'll have to be connected to the robots AP!

radokristof commented 4 years ago

Thanks! I have tried updating it from the Valetudo web option. Have you ever tried that one?

pidator commented 4 years ago

Have you ever tried that one?

Not yet, will do soon ;)

radokristof commented 4 years ago

Thank you. This is what haven't worked for me (the once I tried) but I assume it does the same firmware update procedure... I will also try again soon to update from 3532 to 4007 :)

pidator commented 4 years ago

Have you ever tried that one?

@radokristof Successfully finished the update of my Gen1 from 4004 (0.9.2) to 4007 (0.9.2) via the firmware upgrade function of the WebUI. I've done a backup of my valteudo settings and maps before, but everthing was still available after the firmware update! I didn't had to restore anything, all maps, zones, settings (e.g. telegram) where still available and working. So it's an easy way to upgrade the base firmware of the robot without having to care about all of your settings :)

radokristof commented 4 years ago

Thanks for confirming this! So it might be that I had some temporary issue when I tried to update from the webUI (since I just tried it once). Also as you said, it should not make sense that I'm on still 3532, and I want to update to 4007

radokristof commented 4 years ago

When specifying the MD5 hash you need to add the hash not a link to the hash right? And only the hash is needed to be entered not the full file (which is uploaded here on GitHub) which contains the name of the file also?!

pidator commented 4 years ago

When specifying the MD5 hash you need to add the hash not a link to the hash right? And only the hash is needed to be entered not the full file (which is uploaded here on GitHub) which contains the name of the file also?!

it's exactly like that! insert just the hash without the name of the image file!

radokristof commented 4 years ago

Hmm, just exactly as I did before :) I will try it again today!

radokristof commented 4 years ago

Now it worked. Did something as before, so it was just a first bad experience!

pidator commented 4 years ago

glad to help you (and also a new expirence for myself :+1: )