[Feature request] Local Shelly Update inside Shelly Admin Page
**Is your feature request related to a problem? Please describe.**
Not a problem 

**Describe the solution you'd like**
I wrote a litte script. You can use and change it (like use the autodiscovered Shellys not a txt file like in my version)


Copy and pasted, free to use!

#!/bin/bash

#requires "sudo apt-get install jq"!

#used shellys -> to do autodiscover
#create shelly_list.txt if not exists
test -f shelly_list.txt || touch shelly_list.txt

#get shellys from shelly_list.txt (please at ip one per line!)
mapfile -t shellys < shelly_list.txt


#get length of shellys array
len=${#shellys[@]}


#create download dir
sudo mkdir -p Download
sudo chmod 777 Download/


#get local ip
IP=$(hostname -I | sed 's/ //g')


#create update.log if not exists
test -f update.log || touch update.log
echo "#########################################################################################################" >> update.log
echo "run time is $(date)"  >> update.log
echo "#########################################################################################################" >> update.log
echo "#########################################################################################################" >> update.log

#delete logs older then 7 days
find update.log -mtime +7 -exec rm {} \;


function check_file {
    [ -f "$1" ]
    return $?
}


#check each shelly
for (( i=0; i<$len; i++ )); do 

	#get json string from shelly api
	TMP=$(curl -s http://${shellys[$i]}/shelly)

	#check shelly ID and firmware
	ID=$(echo "$TMP" | jq -r '.type')
	#second try with api if not worked
	if [ -z "ID" ]; then
		ID=$(curl -s http://${shellys[$i]}/shelly | jq -r '.type')
	fi
	
	FW=$(echo "$TMP" | jq -r '.fw')
	#second try with api if not worked
	if [ -z "$FW" ]; then
		FW=$(curl -s http://${shellys[$i]}/shelly | jq -r '.fw')
	fi


	#check if we got the ID and FW
	if [[ "$ID" && "$FW" ]] ; then 

		#check if .zip file exists
		if check_file Download/"$ID".zip; then

    			echo "$ID".zip File found! >> update.log
			#check if local file is older then -mtime x Day(s) (0 = today +1 = yesterday etc.)
			if [[ $(find Download -name "$ID.zip" -mtime 1 -print) ]]; then
	
				echo "Download" "$ID".zip... > update.log
				#download fw zip file
				wget -q http://repo.shelly.cloud/firmware/${ID}.zip -O Download/"$ID".zip
			fi
	
		else

  	  		echo "File not found! -> Download" "$ID".zip... >> update.log
			#download fw zip file
			wget -q http://repo.shelly.cloud/firmware/${ID}.zip -O Download/"$ID".zip

		fi 

		#get version from file (manifest) inside zip
		update_version=$(unzip -c Download/"$ID".zip | grep "build_id" | grep -o 'v.*@' | sed 's/.//;s/.$//' | sed 's/[.]//g')
		#second try if not worked
		while [ -z "$update_version" ]; do
			update_version=$(unzip -c Download/"$ID".zip | grep "build_id" | grep -o 'v.*@' | sed 's/.//;s/.$//' | sed 's/[.]//g')

		done

	
		#get version from shelly
		installed_version=$(echo "$FW" | grep -o 'v.*@' | sed 's/.//;s/.$//' | sed 's/[.]//g')
		#second try if not worked
		while [ -z "$installed_version" ]; do
			installed_version=$(echo "$FW" | grep -o 'v.*@' | sed 's/.//;s/.$//' | sed 's/[.]//g')
		done

	
		#check if $installed_version and $update_version not empty
		if [[ "$installed_version" && "$update_version" ]] ; then 
			#if installed version smaller (-lt) then online version -> update shelly
			if [[ $installed_version -lt $update_version ]]; then
				echo "${shellys[$i]} installed version -"$installed_version"- smaller then update version -"$update_version"- starting update..." >> update.log		
				echo "http://${shellys[$i]}/ota?url=http://"$IP"/SUS/Download/"$ID".zip" >> update.log				
				curl -s http://${shellys[$i]}/ota?url=http://"$IP"/SUS/Download/"$ID".zip >> update.log
				echo >> update.log

			else
				echo ${shellys[$i]} installed version -"$installed_version"- ">" or = update version -"$update_version"- >> update.log
			fi
		else
			echo "${shellys[$i]} FAILED can't get installed version -"$installed_version"- or update version -"$update_version"-" >> update.log
		fi
	
	else
		echo "${shellys[$i]} FAILED can't get ID or FW (sleep mode?)" >> update.log
	fi

	echo "#########################################################################################################" >> update.log
	sleep 2

done

echo "finish run @ $(date)"  >> update.log
echo "#########################################################################################################" >> update.log
