Updating Domoticz error
When trying to update Domoticz on an old Raspberry Pi image I ran into a problem. Both beta and stable channels didn’t work, not by using the web interface nor manually using the updaterelease and updatebeta scripts. Turns out the download url is no longer correct and should be changed.
pi@raspberrypi ~/domoticz $ ./updatebeta Updating to latest beta version... Please Standby... --2017-01-15 16:51:11-- http://domoticz.sourceforge.net/beta/domoticz_linux_armv7l.tgz Resolving domoticz.sourceforge.net (domoticz.sourceforge.net)... 216.34.181.96 Connecting to domoticz.sourceforge.net (domoticz.sourceforge.net)|216.34.181.96|:80... connected. HTTP request sent, awaiting response... 301 Moved Permanently Location: https://domoticz.sourceforge.io/beta/domoticz_linux_armv7l.tgz [following] --2017-01-15 16:51:11-- https://domoticz.sourceforge.io/beta/domoticz_linux_armv7l.tgz Resolving domoticz.sourceforge.io (domoticz.sourceforge.io)... 216.34.181.153 Connecting to domoticz.sourceforge.io (domoticz.sourceforge.io)|216.34.181.153|:443... connected. HTTP request sent, awaiting response... 404 Not Found 2017-01-15 16:51:15 ERROR 404: Not Found. tar (child): domoticz_linux_armv7l.tgz: Cannot open: No such file or directory
The script is looking for the update at https://domoticz.sourceforge.io/beta/domoticz_linux_armv7l.tgz, which results in a 301 and eventually in a 404. It turns out the files moved to http://releases.domoticz.com/releases/.
Since I want to run the beta, I just changed the wget line in the updatebeta script to http://releases.domoticz.com/releases/beta/domoticz_linux_armv7l.tgz for my raspberry pi.
For easy reference here are the current update scripts.
updatebeta
#!/bin/sh # This script can be used to upgrade to the latest beta version lowercase(){ echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" } OS=`lowercase \`uname -s\`` MACH=`uname -m` if [ ${MACH} = "armv6l" ] then MACH="armv7l" fi echo "Updating to latest beta version..." echo "Please Standby..." wget -O domoticz_beta.tgz "http://www.domoticz.com/download.php?channel=beta&type=release&system=${OS}&mach$ tar xvfz domoticz_beta.tgz rm domoticz_beta.tgz echo "Restarting Domoticz... (please standby...)" sudo service domoticz.sh restart
updaterelease
#!/bin/sh # This script can be used to upgrade to the latest release version lowercase(){ echo "$1" | sed "y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/" } OS=`lowercase \`uname -s\`` MACH=`uname -m` if [ ${MACH} = "armv6l" ] then MACH="armv7l" fi echo "Updating to latest release version..." echo "Please Standby..." wget -O domoticz_release.tgz "http://www.domoticz.com/download.php?channel=stable&type=release&system=${OS}$ tar xvfz domoticz_release.tgz rm domoticz_release.tgz echo "Restarting Domoticz... (please standby...)" sudo service domoticz.sh restart
3 Responses to “Updating Domoticz error”
Andreas
HI,
To one that has no experience in this field, How do I go about to access this script on my Pi and change it?
Gijs Oliemans
Hi Andreas, you can find these scripts (updaterelease.sh and updatebeta.sh) in the root of the domoticz folder. You can edit and save them using your favorite editor.
Check out some tips and tricks in the short Pi cheatsheet: http://dev201.nl/raspberry-pi-cheatsheet/
Andreas
Thank you very much.