Add SpoolBuddy System tab with live OS stats from Raspberry Pi

The daemon now collects CPU temp, core count, load average, memory/disk
  usage, OS info, and system uptime every heartbeat using stdlib-only reads
  from /proc and /sys. Stats are sent as a JSON blob in the heartbeat
  payload, stored in a new system_stats TEXT column, and displayed in a
  new "System" tab in SpoolBuddy Settings with color-coded usage bars.
This commit is contained in:
maziggy
2026-03-26 09:57:09 +01:00
parent 1df5130df2
commit 77cb7158d2
14 changed files with 974 additions and 427 deletions
+6
View File
@@ -1424,6 +1424,12 @@ async def run_migrations(conn):
except OperationalError:
pass # Already applied
# Migration: Add system_stats JSON blob column to spoolbuddy_devices
try:
await conn.execute(text("ALTER TABLE spoolbuddy_devices ADD COLUMN system_stats TEXT"))
except OperationalError:
pass # Already applied
# Migration: Convert ams_labels table from (printer_id, ams_id) key to ams_serial_number key
# Labels are now keyed by AMS serial number so they persist when the AMS is moved to another printer.
try: