Commit Graph
9 Commits
Author SHA1 Message Date
jonnyandCursor 9493e58c29 Install liblgpio from source when apt packages are missing.
Bookworm does not ship python3-lgpio; the pip module needs liblgpio.so.1. Build Joan's lg library during install and look on system dist-packages at runtime.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 23:32:15 +08:00
jonnyandCursor 7da6ced1c4 Read the DHT sensor with lgpio instead of Adafruit bitbang.
Userspace pulse timing misses DHT22 edges on Raspberry Pi OS, which produced empty readings. Log the real failure reason and clarify that PIN is BCM GPIO numbering.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 22:58:30 +08:00
jonnyandCursor f061673880 Avoid Adafruit PulseIn hangs when claiming the DHT GPIO pin.
libgpiod_pulsein fails with "Unable to set line N to input" on Raspberry Pi OS, so read via bitbang and release the pin after a single-shot run.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 22:25:17 +08:00
jonnyandCursor 85f4107938 Default database table to TempHumid when missing from config.
Preserves compatibility with existing /etc/thMonitor.conf files created before the table option was added.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-17 22:09:04 +08:00
jonnyandCursor 2d1e319160 Make the MySQL table name configurable instead of hardcoding TempHumid.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-16 11:44:18 +08:00
jonnyandCursor 8010cd9045 Require --install and print help when install.sh is run with no arguments.
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 23:18:34 +08:00
jonny 6c73f3e706 Add setup/install script 2026-08-14 23:08:28 +08:00
jonnyandCursor adb8573833 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>
2026-08-14 19:53:00 +08:00
jonnyandCursor 6f12d2c459 Fix sensor validation, MySQL retries, and chart query bugs.
Reject implausible readings, close DB connections on retry, and return chart data in chronological order.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-14 19:40:49 +08:00