reboot when udp send error

This commit is contained in:
PaulVua
2026-01-15 10:16:29 +01:00
parent 4c552e4a31
commit 5742cc7e49

View File

@@ -1136,6 +1136,20 @@ try:
#parfois ici on peut avoir une erreur ERROR
if "+CME ERROR" in response_SARA_2 or "ERROR" in response_SARA_2:
print('<span style="color: red;font-weight: bold;">⚠ATTENTION: Error while sending data⚠</span>')
print('🛑STOP LOOP🛑')
print("<hr>")
#Send notification (WIFI)
send_error_notification(device_id, "UDP sending issue")
#Hardware Reboot
hardware_reboot_success = modem_hardware_reboot()
if hardware_reboot_success:
print("✅Modem successfully rebooted and reinitialized")
else:
print("⛔There were issues with the modem reboot/reinitialize process")
#end loop
sys.exit()
#Read reply from server (USORD)