From 806f95df75f565f7f117a3d628600951b7f605da Mon Sep 17 00:00:00 2001 From: root Date: Mon, 23 Jun 2025 13:32:16 +0200 Subject: [PATCH] update --- SARA/reboot/start.py | 4 ++-- cron_jobs | 4 +--- installation.sh | 3 ++- loop/SARA_send_data_v2.py | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/SARA/reboot/start.py b/SARA/reboot/start.py index db8f135..60e443f 100644 --- a/SARA/reboot/start.py +++ b/SARA/reboot/start.py @@ -20,7 +20,7 @@ import re import sqlite3 # database connection -conn = sqlite3.connect("/var/www/nebuleair_pro_4g/sqlite/sensors.db") +conn = sqlite3.connect("/var/www/moduleair_pro_4g/sqlite/sensors.db") cursor = conn.cursor() #get config data from SQLite table @@ -205,7 +205,7 @@ try: # 1. Set AIRCARTO URL print('➡️Set aircarto URL') aircarto_profile_id = 0 - aircarto_url="data.nebuleair.fr" + aircarto_url="data.moduleair.fr" command = f'AT+UHTTP={aircarto_profile_id},1,"{aircarto_url}"\r' ser_sara.write(command.encode('utf-8')) response_SARA_1 = read_complete_response(ser_sara, wait_for_lines=["OK"]) diff --git a/cron_jobs b/cron_jobs index d785d6d..cae2589 100755 --- a/cron_jobs +++ b/cron_jobs @@ -4,7 +4,5 @@ #@reboot sleep 30 && /usr/bin/python3 /var/www/moduleair_pro_4g/SARA/reboot/start.py >> /var/www/moduleair_pro_4g/logs/app.log 2>&1 -0 0 * * * > /var/www/moduleair_pro_4g/logs/master.log - -0 0 * * * find /var/www/nebuleair_pro_4g/logs -name "*.log" -type f -exec truncate -s 0 {} \; +0 0 * * * find /var/www/moduleair_pro_4g/logs -name "*.log" -type f -exec truncate -s 0 {} \; diff --git a/installation.sh b/installation.sh index ee2c84e..f57ca10 100644 --- a/installation.sh +++ b/installation.sh @@ -76,6 +76,7 @@ install_dependencies() { "git" "apache2" "php" + "php-sqlite3" "sqlite3" "python3" "python3-pip" @@ -88,6 +89,7 @@ install_dependencies() { "python3-serial" "python3-requests" "python3-schedule" + "python3-rpi.gpio" ) for package in "${packages[@]}"; do @@ -112,7 +114,6 @@ install_python_packages() { "pyserial" "requests" "schedule" - "RPi.GPIO" "gpiozero" "smbus2" "adafruit-circuitpython-bme280" diff --git a/loop/SARA_send_data_v2.py b/loop/SARA_send_data_v2.py index ab03986..c3df7a5 100755 --- a/loop/SARA_send_data_v2.py +++ b/loop/SARA_send_data_v2.py @@ -88,7 +88,7 @@ JSON PAYLOAD (Micro-Spot Servers) } """ -import board +#import board import json import serial import time