This commit is contained in:
root
2025-07-22 10:39:13 +02:00
parent 44b2e2189d
commit 4d512685a0
3 changed files with 4 additions and 2 deletions

View File

@@ -8,6 +8,8 @@
Gather data from envea Sensors and store them to the SQlite table
Use the RTC time for the timestamp
This script is run by a service nebuleair-envea-data.service
/usr/bin/python3 /var/www/nebuleair_pro_4g/envea/read_value_v2.py
"""
@@ -31,7 +33,7 @@ rtc_time_str = row[1] # '2025-02-07 12:30:45'
# Fetch connected ENVEA sondes from SQLite config table
cursor.execute("SELECT port, name, coefficient FROM envea_sondes_table WHERE connected = 1")
connected_envea_sondes = cursor.fetchall() # List of tuples (port, name, coefficient)
#print(connected_envea_sondes)
serial_connections = {}
if connected_envea_sondes:
@@ -87,7 +89,7 @@ except Exception as e:
traceback.print_exc()
#print(f" H2S: {data_h2s}, NO2: {data_no2}, O3: {data_o3}")
#print(f" H2S: {data_h2s}, NO2: {data_no2}, O3: {data_o3}, CO : {data_co}, nh3: {data_nh3}, so2: {data_so2} ")
#save to sqlite database
try: