]> git.giorgioravera.it Git - homeassistant.git/commitdiff
Updated shelly upgrade shell script
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Sun, 14 Apr 2019 12:53:32 +0000 (14:53 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Sun, 14 Apr 2019 12:53:32 +0000 (14:53 +0200)
shell_scripts/shelly_upgrade.sh

index 816d12e2c890fe4e40bae912c3b5eb012400304e..977c0513ff65cdbeb5527e0adb6e91b1bd36ee3c 100755 (executable)
@@ -4,17 +4,21 @@ HOST=$(awk '/mqtt_host/ { print  $2 }' ../secrets.yaml)
 USER=$(awk '/mqtt_user/ { print  $2 }' ../secrets.yaml)
 PASSWORD=$(awk '/mqtt_password/ { print  $2 }' ../secrets.yaml)
 SHELLY_ID=(
-       55980F
-       135454
-       13572B
-       559C49
+       shellyswitch-55980F
+       shellyswitch-135454
+       shellyswitch-13572B
+       shellyswitch-559C49
+       shelly1-24D1EE
+       shelly1-93B27D
+       shellyswitch25-7457D8
+       shellybulb-BC8610
 )
 
 echo "Upgrade Shelly Firmware"
 
 for i in "${SHELLY_ID[@]}"
 do
-       echo mosquitto_pub -h $HOST -d -u $USER -P $PASSWORD -t shellies/shellyswitch-$i/command -m update_fw
+       echo mosquitto_pub -h $HOST -d -u $USER -P $PASSWORD -t shellies/$i/command -m update_fw
 done
 
 echo "Done"