Skip to content

fix: temperature card filters out mislabeled voltage/fan sensors (0.1.40-beta3) - #202

Merged
nofuturekid merged 2 commits into
mainfrom
fix/temperature-sensor-filter
May 30, 2026
Merged

nofuturekid merged 2 commits into
mainfrom
fix/temperature-sensor-filter

Conversation

@nofuturekid

Copy link
Copy Markdown
Owner

What

beta2's Temperature card showed nonsense readings — roughly 91° plus a "CPU Fan" sensor reading 1753° — because the server reports voltages and a fan tachometer under systemMetricsTemperature all mislabeled with unit: CELSIUS. The card trusted the server's summary, so those mislabeled sensors leaked straight into the temperature display.

Root cause

Root-caused from live server data: the Unraid server's systemMetricsTemperature summary mixes in voltage sensors and a fan tach, each tagged unit: CELSIUS. A voltage like ~1.2 and a fan reading like 1753 therefore appeared as bogus "temperatures."

Fix

Stop trusting the server's temperature summary. Instead, select the raw sensors[] and recompute the temperature client-side:

  • Filter by sensor type.
  • Apply a plausibility band of 8–130°C to drop physically implausible values (this is the selectTemperature seam).

This keeps the Temperature card honest regardless of how the server mislabels mixed sensor units.

Context

  • Builds on the 0.1.40 cycle (beta2).
  • This is the ADR-0043 revisit-trigger response.

🤖 Generated with Claude Code

nofuturekid and others added 2 commits May 30, 2026 12:31
The Unraid server reports every lm-sensors channel under
systemMetricsTemperature, all mislabeled unit:CELSIUS, including a fan
tach (value = RPM, e.g. 1753) and voltage rails (value = Volts), all
type:CUSTOM. Its server-computed summary therefore named the fan as the
hottest "temperature" (~91°, "CPU Fan 1753°") and inflated the average.

Stop trusting the server summary. Select the raw sensors[] list on both
the subscription and the GetMetrics poll, project it to an Apollo-free
TempSensorSample seam (mirrors IfaceSample/selectThroughput), and
recompute hottest/average/warning+criticalCount in selectTemperature,
keeping a channel iff value <= MAX_PLAUSIBLE_C (130) && (type != CUSTOM
|| value >= MIN_PLAUSIBLE_C (8)): the upper cap drops fan RPM regardless
of type, the lower floor drops voltage rails but only for the untyped
CUSTOM catch-all. Empty kept set -> Temperature.UNKNOWN.

Tests drive selectTemperature and the Apollo mapper with a fixture shaped
like the real 2026-05-30 server data, pinning that a fan is never shown
as the hottest temperature and its false CRITICAL never inflates the
count.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Document the temperature sensor mislabeling fix in ADR-0043 (server
reports voltages/fans as CELSIUS type CUSTOM; client now selects
sensors[] and filters by type + plausibility band, recompute the summary;
report upstream to unraid/api), add the plain-language CHANGELOG bullet
under [0.1.40-beta3], and bump versionName 0.1.40-beta2 -> 0.1.40-beta3,
versionCode 108 -> 109.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nofuturekid
nofuturekid merged commit e81cf77 into main May 30, 2026
8 checks passed
@nofuturekid
nofuturekid deleted the fix/temperature-sensor-filter branch May 30, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant