Repository navigation
v0.5.0
v0.5.0
🎉 Highlights
This release introduces a stateful alert engine with hysteresis-based deadbands, replaces the lm-sensors dependency with a native sysfs hwmon parser (~7.2× faster, zero subprocess spawns), and adds dynamic battery discovery so the daemon works out-of-the-box on non-standard hardware (MacBook macsmc-battery, BAT1, auxiliary cells, etc.).
✨ Features
-
Stateful AlertManager with hysteresis & severity suppression (
98ab6da)
Replace pairwise edge-detection with a latch-basedAlertManagerclass. Deadband thresholds eliminate notification storms for charge %, battery/CPU temperature, and battery health. Critical alerts now suppress lower-severity duplicates. -
Auto-discover battery sysfs path (
7706638)
Scan/sys/class/power_supplyat startup instead of hardcodingBAT0. Prioritises internal system batteries over peripherals (e.g. wireless mice). SupportsBAT1,macsmc-battery,bat.0@aux:1, and other vendor naming schemes. -
Native sysfs hwmon parser replaces lm-sensors (
bb534de)
Parse/sys/class/hwmondirectly for AMD, Intel, ARM, and NVMe thermal/power sensors. Removes thesensorsCLI dependency entirely. See empirical benchmark.
🐛 Bug Fixes
- Alert tick interval corrected to 1 s (
273aded) - High-charge alert no longer unlatches on
Fullstatus or brief AC toggles (fe30f6e) – re-arm now strictly requires discharge below the 75 % deadband. - UPower D-Bus object path matches daemon normalisation (
29a75c6) – special characters (-,.,:,@) are sanitised to_, fixing resolution for non-standard battery names. - Guard against 0 / negative
voltage_design_v(8d08454) – prevents permanent overvoltage false alarms on unsupported firmware. Overheat advice now differs between charging and discharging states. - GPU pairing preserved on multi-GPU / multi-AMDGPU systems (
b379434,c107375) – temperature and power are always committed from the same device; deterministichwmonenumeration order. - Accept 0 W GPU power (D3cold / runtime-PM sleep) and valid sub-zero temps down to −50 °C (
5b810e0,4d73568).
♻️ Refactoring & Cleanup
- Extract
formatUpowerDevicePathas a pure helper; keepupowerPropsingle-purpose (aea6d7e). - Remove legacy
alert()wrapper and module-scopeddefaultAlertManagersingleton; standardise onAlertManagerclass (9027a31). - Remove redundant
getLatestSample()DB query on daemon startup (3904130). - Integrate
AlertManagerinto daemon lifecycle; decouple alert evaluation from historical SQLite rows; reset latches on battery removal (5df3bf4). - Extract named constants
MIN_BAT_TEMP_TENTHS_C/MIN_HWMON_TEMP_MCwith ACPI & hwmon unit-scaling docs (b83531e).
📝 Documentation
- Document stateful hysteresis alert engine, deadband thresholds, and priority suppression in README (
1c97a70). - Clarify overvoltage re-arm boundary ("at or below 10 % above design voltage") (
3863c6a). - Update battery telemetry source labels to reflect dynamic discovery (
555af7b). - Document UPower
up_device_compute_object_pathsanitisation algorithm (103029b). - Add empirical lm-sensors vs native hwmon evaluation with benchmark data (
3c7b474). - Qualify hwmon driver-specific channel mappings and refine execution-latency claim (~5–8 ms/cycle) (
0d10130,4bd65b4). - Clarify discovery rationale and test-environment fallback in config (
7830783).
🔧 Build & Install
- Remove
lm_sensorsprerequisite check frominstall.sh(19243b3). - Remove unused release-assets block from
.release-it.json(a68a3bf).
🧪 Tests
- Comprehensive
AlertManagersuites: hysteresis bands, glitch debouncing, latch reset, priority suppression, and legacy-call persistence (98ab6da,7526b04,fe30f6e). - UPower D-Bus path sanitisation for
BAT0,macsmc-battery,bat.0@aux:1(cd6c9ce,29a75c6). - Multi-battery discovery and fallback handling (
7706638). - Dual-AMDGPU and hybrid iGPU + dGPU pairing fixtures (
c107375,b379434). - Replace
spawnSyncmocks with realistic sysfs directory-structure tests for AMD, Intel, ARM, NVMe, and edge-failure cases (381e8c1).