Updated example, more debug output in script
This commit is contained in:
parent
02a882ebde
commit
f6c51f6d05
@ -10,37 +10,37 @@
|
|||||||
"lipoDSAddr": "abcdefghijklmnop",
|
"lipoDSAddr": "abcdefghijklmnop",
|
||||||
"tankDSAddr": "abcdefghijklmnop",
|
"tankDSAddr": "abcdefghijklmnop",
|
||||||
"ntpServer":"pool.ntp.org",
|
"ntpServer":"pool.ntp.org",
|
||||||
"dry0":5000,
|
"dry0":50,
|
||||||
"hourstart0":6,
|
"hourstart0":6,
|
||||||
"hourend0":20,
|
"hourend0":20,
|
||||||
"lowLight0": false,
|
"lowLight0": false,
|
||||||
"delay0": 10,
|
"delay0": 10,
|
||||||
"dry1":5000,
|
"dry1":-1,
|
||||||
"hourstart1":6,
|
"hourstart1":6,
|
||||||
"hourend1":20,
|
"hourend1":20,
|
||||||
"lowLight1": false,
|
"lowLight1": false,
|
||||||
"delay1": 10,
|
"delay1": 10,
|
||||||
"dry2":5000,
|
"dry2":-1,
|
||||||
"hourstart2":6,
|
"hourstart2":6,
|
||||||
"hourend2":20,
|
"hourend2":20,
|
||||||
"lowLight2": false,
|
"lowLight2": false,
|
||||||
"delay2": 10,
|
"delay2": 10,
|
||||||
"dry3":5000,
|
"dry3":-1,
|
||||||
"hourstart3":6,
|
"hourstart3":6,
|
||||||
"hourend3":20,
|
"hourend3":20,
|
||||||
"lowLight3": false,
|
"lowLight3": false,
|
||||||
"delay3": 10,
|
"delay3": 10,
|
||||||
"dry4":5000,
|
"dry4":-1,
|
||||||
"hourstart4":6,
|
"hourstart4":6,
|
||||||
"hourend4":20,
|
"hourend4":20,
|
||||||
"lowLight4": false,
|
"lowLight4": false,
|
||||||
"delay4": 10,
|
"delay4": 10,
|
||||||
"dry5":5000,
|
"dry5":-1,
|
||||||
"hourstart5":6,
|
"hourstart5":6,
|
||||||
"hourend5":20,
|
"hourend5":20,
|
||||||
"lowLight5": false,
|
"lowLight5": false,
|
||||||
"delay5": 10,
|
"delay5": 10,
|
||||||
"dry6":5000,
|
"dry6":-1,
|
||||||
"hourstart6":6,
|
"hourstart6":6,
|
||||||
"hourend6":20,
|
"hourend6":20,
|
||||||
"lowLight6": false,
|
"lowLight6": false,
|
||||||
|
@ -23,13 +23,17 @@ mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "1" -r
|
|||||||
echo "Waiting ..."
|
echo "Waiting ..."
|
||||||
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
||||||
set -e
|
set -e
|
||||||
|
echo "Waiting 30 seconds ..."
|
||||||
sleep 30
|
sleep 30
|
||||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/\$implementation/config/set" -f $settingsFile
|
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/\$implementation/config/set" -f $settingsFile
|
||||||
echo "Waiting for reboot"
|
echo "Waiting for reboot ..."
|
||||||
sleep 1
|
sleep 1
|
||||||
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
mosquitto_sub -h $mqttHost -t "${mqttPrefix}${homieId}/#" -R -C 1
|
||||||
|
echo "Alive"
|
||||||
sleep 20
|
sleep 20
|
||||||
|
echo "Create Backup ..."
|
||||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/config/backup/set" -m "true" -r
|
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/config/backup/set" -m "true" -r
|
||||||
sleep 5
|
sleep 5
|
||||||
|
echo "Shutdown ..."
|
||||||
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "0" -r
|
mosquitto_pub -h $mqttHost -t "${mqttPrefix}${homieId}/stay/alive/set" -m "0" -r
|
||||||
exit 0
|
exit 0
|
||||||
|
Loading…
Reference in New Issue
Block a user