update
This commit is contained in:
@@ -20,7 +20,7 @@ import re
|
|||||||
import sqlite3
|
import sqlite3
|
||||||
|
|
||||||
# database connection
|
# 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()
|
cursor = conn.cursor()
|
||||||
|
|
||||||
#get config data from SQLite table
|
#get config data from SQLite table
|
||||||
@@ -205,7 +205,7 @@ try:
|
|||||||
# 1. Set AIRCARTO URL
|
# 1. Set AIRCARTO URL
|
||||||
print('➡️Set aircarto URL')
|
print('➡️Set aircarto URL')
|
||||||
aircarto_profile_id = 0
|
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'
|
command = f'AT+UHTTP={aircarto_profile_id},1,"{aircarto_url}"\r'
|
||||||
ser_sara.write(command.encode('utf-8'))
|
ser_sara.write(command.encode('utf-8'))
|
||||||
response_SARA_1 = read_complete_response(ser_sara, wait_for_lines=["OK"])
|
response_SARA_1 = read_complete_response(ser_sara, wait_for_lines=["OK"])
|
||||||
|
|||||||
@@ -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
|
#@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/moduleair_pro_4g/logs -name "*.log" -type f -exec truncate -s 0 {} \;
|
||||||
|
|
||||||
0 0 * * * find /var/www/nebuleair_pro_4g/logs -name "*.log" -type f -exec truncate -s 0 {} \;
|
|
||||||
|
|
||||||
|
|||||||
@@ -76,6 +76,7 @@ install_dependencies() {
|
|||||||
"git"
|
"git"
|
||||||
"apache2"
|
"apache2"
|
||||||
"php"
|
"php"
|
||||||
|
"php-sqlite3"
|
||||||
"sqlite3"
|
"sqlite3"
|
||||||
"python3"
|
"python3"
|
||||||
"python3-pip"
|
"python3-pip"
|
||||||
@@ -88,6 +89,7 @@ install_dependencies() {
|
|||||||
"python3-serial"
|
"python3-serial"
|
||||||
"python3-requests"
|
"python3-requests"
|
||||||
"python3-schedule"
|
"python3-schedule"
|
||||||
|
"python3-rpi.gpio"
|
||||||
)
|
)
|
||||||
|
|
||||||
for package in "${packages[@]}"; do
|
for package in "${packages[@]}"; do
|
||||||
@@ -112,7 +114,6 @@ install_python_packages() {
|
|||||||
"pyserial"
|
"pyserial"
|
||||||
"requests"
|
"requests"
|
||||||
"schedule"
|
"schedule"
|
||||||
"RPi.GPIO"
|
|
||||||
"gpiozero"
|
"gpiozero"
|
||||||
"smbus2"
|
"smbus2"
|
||||||
"adafruit-circuitpython-bme280"
|
"adafruit-circuitpython-bme280"
|
||||||
|
|||||||
@@ -88,7 +88,7 @@ JSON PAYLOAD (Micro-Spot Servers)
|
|||||||
}
|
}
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import board
|
#import board
|
||||||
import json
|
import json
|
||||||
import serial
|
import serial
|
||||||
import time
|
import time
|
||||||
|
|||||||
Reference in New Issue
Block a user