This commit is contained in:
PaulVua
2025-02-10 10:06:16 +01:00
parent 7cac769795
commit 1cb1b05b51
10 changed files with 200 additions and 77 deletions

View File

@@ -17,7 +17,9 @@ conn = sqlite3.connect("/var/www/nebuleair_pro_4g/sqlite/sensors.db")
cursor = conn.cursor()
# Retrieve the last 10 sensor readings
cursor.execute("SELECT * FROM data_NPM ORDER BY timestamp DESC LIMIT 10")
#cursor.execute("SELECT * FROM data_NPM ORDER BY timestamp DESC LIMIT 10")
cursor.execute("SELECT * FROM data_BME280 ORDER BY timestamp DESC LIMIT 10")
#cursor.execute("SELECT * FROM timestamp_table")
rows = cursor.fetchall()
rows.reverse() # Reverse the order in Python (to get ascending order)