mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-26 10:51:36 -04:00
* Warn in the navbar when a hard drive runs hot. The navbar already warns about high CPU temperature; add the equivalent for drive temperature, since an overheating disk risks data loss and a user running an off-grid library won't be watching for it. - controller/lib/smart.py: build_smart_stats() returns the per-drive list plus warning thresholds (55C warn / 65C critical) so the frontend stays dumb. Reading SMART wakes a spun-down drive, so drives in standby are detected with `smartctl -n standby` (which works through the USB-SATA bridges where `hdparm -C` only reports "unknown") and NOT read; their last-known reading is reused instead. - controller/lib/status_worker.py: collect SMART on a slow 60s cadence (cached on app.state) rather than the 5s status loop, so the poll does not keep USB drives awake. The result flows into the same cached payload via a new collect_all_status(smart_stats=...) kwarg. - Frontend: useDriveTemperature() reports the hottest drive; Nav.js shows a yellow/red `hdd` icon with a popup, mirroring the CPU warning. Verified on hardware: smart_stats reports real temps and SMART runs once a minute, not every 5s. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> * Address Greptile review on HDD temperature warning. - _drive_is_asleep also treats SLEEP mode as asleep, not just STANDBY. smartctl -n standby exits "Device is in SLEEP mode, exit(2)" for the deeper power mode; matching only "STANDBY" meant a SLEEP drive was read and woken — the exact failure the check prevents. (TDD: added a failing SLEEP test, then fixed.) - useDriveTemperature uses ?? instead of || for the temperature fallback to express "fall back only on null/undefined". Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| test_admin.py | ||
| test_admin_api.py | ||
| test_api.py | ||
| test_config.py | ||
| test_defaults.py | ||
| test_disks.py | ||
| test_disks_api.py | ||
| test_docker_services.py | ||
| test_fstab.py | ||
| test_fstab_migration.py | ||
| test_fstab_yaml.py | ||
| test_mount_executor.py | ||
| test_onboarding.py | ||
| test_onboarding_api.py | ||
| test_readiness.py | ||
| test_ready_api.py | ||
| test_reconciler.py | ||
| test_samba.py | ||
| test_samba_api.py | ||
| test_schemas.py | ||
| test_scripts.py | ||
| test_scripts_api.py | ||
| test_services_api.py | ||
| test_smart.py | ||
| test_status.py | ||
| test_status_api.py | ||
| test_status_worker.py | ||
| test_systemd.py | ||
| test_wrol_mode.py | ||