Migrate monitoring scripts from Python 2 to Python 3.

Replace the dhtreader.so extension with adafruit-circuitpython-dht and run the daemon with python3.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-08-14 19:53:00 +08:00
co-authored by Cursor
parent 6f12d2c459
commit adb8573833
12 changed files with 113 additions and 28 deletions
+5 -4
View File
@@ -1,11 +1,12 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import logging
import time
import dhtreader
import updateMysql
import readMysql
import updateMysql
import thmonitor_common as common
@@ -77,7 +78,7 @@ def main():
logging.info(
'Single run temperature and humidity reading '
'[version: 1.1, Jonathan Ervine, 2015-06-17]'
'[version: 2.0, Python 3]'
)
return sensor_read(cfg, dev_type, dhtpin)