This commit is contained in:
pi 2025-02-22 14:16:10 +01:00
parent a2d0cc09ed
commit 2ca0de44db
3 changed files with 7 additions and 2 deletions

1
.gitignore vendored
View file

@ -1,3 +1,4 @@
venv/** venv/**
*.log *.log
.idea/** .idea/**
*.log.gz

View file

@ -73,7 +73,7 @@ def on_log(client, obj, level, string):
# but note that the client id must be unique on the broker. Leaving the client # but note that the client id must be unique on the broker. Leaving the client
# id parameter empty will generate a random id for you. # id parameter empty will generate a random id for you.
client_id = 'mqtt-client-solaria' client_id = 'mqtt-client-pimirror2'
mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, client_id) mqttc = mqtt.Client(mqtt.CallbackAPIVersion.VERSION2, client_id)
mqttc.on_message = on_message mqttc.on_message = on_message

View file

@ -7,6 +7,10 @@ counter=0
max_counter=120 max_counter=120
max_restart_counter=20 max_restart_counter=20
echo "$(date '+%Y%m%d%H%M%S'): Starting and waitintg 15s "
sleep 15
echo "$(date '+%Y%m%d%H%M%S'): checking connectivity" echo "$(date '+%Y%m%d%H%M%S'): checking connectivity"
while [ $(ping -q -w 3 -c 1 192.168.31.5 > /dev/null && echo 1 || echo 0) -eq 0 ]; do while [ $(ping -q -w 3 -c 1 192.168.31.5 > /dev/null && echo 1 || echo 0) -eq 0 ]; do