stop script before upload, restart after

Required since recent Shelly firmware update: Script.PutCode
fails with error -103 if the script is running.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-15 17:46:50 +01:00
parent 8ad19d84e2
commit f9a579529b

View File

@@ -2,4 +2,6 @@
source $(dirname $0)/shelly.conf source $(dirname $0)/shelly.conf
curl -s "$SHELLY_RPC/Script.Stop?id=$SCRIPT_ID" | jq .
$ROOT_DIR/put_script $SHELLY_HOST $SCRIPT_ID $ROOT_DIR/$SCRIPT_FILENAME $ROOT_DIR/put_script $SHELLY_HOST $SCRIPT_ID $ROOT_DIR/$SCRIPT_FILENAME
curl -s "$SHELLY_RPC/Script.Start?id=$SCRIPT_ID" | jq .