Open CodeFinder2 opened 4 years ago
So far, I came up with a small shell script that I executed on the robot to do the update for me ...
You should consider the following important points in your script (independently of the integration of your request in valetudo re):
service valetudo stop
/mnt/data
for local download and unpacking location of the new binary file should be better (you can check available disk space with df -h
)hosts
and rc.local
of the /deployment/etc/
folder of this repository in your update procedure, because changes in these files are probably necessary to run valetudo without problems.Thanks for your hints! I've revisited the script and updated my initial post. :-)
Gen2 uses other command for stopping and rebooting:
/etc/init/S11valetudo stop /etc/init/S11valetudo start
Gen2 uses other command for stopping and rebooting:
It's only on the firmware version 2008+.
- also include the two files
hosts
andrc.local
of the/deployment/etc/
folder of this repository in your update procedure, because changes in these files are probably necessary to run valetudo without problems.
I do miss to mention the important file
valetudo.conf
from deployment section also !!
Hi,
I would like to suggest allowing an update of valetudo RE (only) from the web UI, somehow as an extension to just checking if there's a new version available (as already implemented). This would also require to trigger a reboot of the robot from the UI which may also be useful in other cases.
So far, I came up with a small shell script that I executed on the robot to do the update for me
(still misses many sanity checks):This requires and therefore installs
wget
but there may be a smarter way (to save the space of wget). However, you must execute this script on the robot via sshinbut I assume there's a way to do it from valetudo RE / the web UI?/usr/local/bin/
(It's similar to what was asked in https://github.com/rand256/valetudo/issues/78 but my request is just wrt valetudo RE.)
What do you think about this idea? 🙈
Edit: just seen https://github.com/rand256/valetudo/issues/66 - but the main focus of this is the update capability.
Edit2: improved the script wrt. @pidator 's comment, thanks! (Patching
rc.local
andhosts
files still missing though/yet.)Edit3: just seen https://github.com/rand256/valetudo/wiki/Updating-valetudo-binary-on-2008--firmware which claims that a reboot is not necessary (but does this requires a "2008+" fw image?). Does it work on gen1 too (which I am using)? Guess, no. Is there any reliable way to distinguish between gen1 and gen2 within the script? Nonetheless and regardless of my improvements to the code, this script was initially intended to just serve as a starting point to integrate this into valetudo RE ... 🙈 @rand256 What do you think about this?
Edit4: improved script to allow an URL as command line argument (optional) to download / update to a specific version. There are also some more improvements to handling errors, rolling back and the generell cflow. Also added to start the valetudo service again (which seems sufficient).