This commit is contained in:
Your Name
2025-07-02 08:01:41 +01:00
parent 2989a7a9ed
commit 98115ab22b

View File

@@ -335,7 +335,7 @@ def send_error_notification(device_id, error_type, additional_info=None):
try: try:
response = requests.post(alert_url, timeout=3) response = requests.post(alert_url, timeout=3)
if response.status_code == 200: if response.status_code == 200:
print(f"✅ Alert notification sent successfully") #print(f"✅ Alert notification sent successfully")
return True return True
else: else:
print(f"⚠️ Alert notification failed: Status code {response.status_code}") print(f"⚠️ Alert notification failed: Status code {response.status_code}")
@@ -1005,7 +1005,7 @@ try:
# INVALID SERVER HOSTNAME # INVALID SERVER HOSTNAME
elif error_code == 4: elif error_code == 4:
print('<p class="text-danger">Error 4: Invalid server Hostname</p>') print('<p class="text-danger">Error 4: Invalid server Hostname</p>')
send_error_notification(device_id, "UHTTPER (error n°4) -> Invalid Server Hostname") send_error_notification(device_id, "UHTTPER (error n°4) -> AirCarto Invalid Server Hostname")
server_hostname_resets = reset_server_hostname(aircarto_profile_id) server_hostname_resets = reset_server_hostname(aircarto_profile_id)
if server_hostname_resets: if server_hostname_resets:
print("✅server hostname reset successfully") print("✅server hostname reset successfully")
@@ -1308,7 +1308,7 @@ try:
send_error_notification(device_id, "UHTTPER (4) uSpot Invalid server Hostname") send_error_notification(device_id, "UHTTPER (4) uSpot Invalid server Hostname")
server_hostname_resets = reset_server_hostname_https(uSpot_profile_id) server_hostname_resets = reset_server_hostname_https(uSpot_profile_id)
if server_hostname_resets: if server_hostname_resets:
print("✅server hostname reset successfully") print(" uSpot - server hostname reset successfully")
else: else:
print("⛔There were issues with the modem server hostname reinitialize process") print("⛔There were issues with the modem server hostname reinitialize process")
# SERVER CONNECTION ERROR # SERVER CONNECTION ERROR
@@ -1321,9 +1321,13 @@ try:
elif error_code == 44: elif error_code == 44:
print('<p class="text-danger">Error 44: Connection lost</p>') print('<p class="text-danger">Error 44: Connection lost</p>')
elif error_code == 73: elif error_code == 73:
print('<p class="text-danger">Error 73: Secure socket connect error</p>', end="") print('<p class="text-danger">Error 73: uSpot - Secure socket connect error</p>', end="")
send_error_notification(device_id, "uSpot - Secure socket connect error") send_error_notification(device_id, "uSpot - Secure socket connect error")
#Software Reboot ?? server_hostname_resets = reset_server_hostname_https(uSpot_profile_id)
if server_hostname_resets:
print("✅ uSpot - server hostname reset successfully")
else:
print("⛔There were issues with the modem server hostname reinitialize process")
else: else:
print(f'<p class="text-danger">Unknown error code: {error_code}</p>',end="") print(f'<p class="text-danger">Unknown error code: {error_code}</p>',end="")