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,8 +1,9 @@
#!/usr/bin/env python
# -*- coding:utf-8 -*-
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import time
import logging
import time
import dhtreader
import updateMysql
import thmonitor_common as common
@@ -91,7 +92,7 @@ def main():
logging.info(
'Multiple (infinite loop) temperature and humidity reading '
'[version: 1.1, Jonathan Ervine, 2015-06-17]'
'[version: 2.0, Python 3]'
)
run_loop(cfg, dev_type, dhtpin)