update
This commit is contained in:
0
envea/read_value_loop.py → envea/old/read_value_loop.py
Executable file → Normal file
0
envea/read_value_loop.py → envea/old/read_value_loop.py
Executable file → Normal file
0
envea/read_value_loop_json.py → envea/old/read_value_loop_json.py
Executable file → Normal file
0
envea/read_value_loop_json.py → envea/old/read_value_loop_json.py
Executable file → Normal 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:
|
||||
|
||||
Reference in New Issue
Block a user