Skip to content

Fix SMART temperature parsing in smart-v1 - #635

Merged
VVelox merged 2 commits into
librenms:masterfrom
githonk:fix/smart-v1-temperature
Sep 6, 2026
Merged

Fix SMART temperature parsing in smart-v1#635
VVelox merged 2 commits into
librenms:masterfrom
githonk:fix/smart-v1-temperature

Conversation

@githonk

@githonk githonk commented Sep 6, 2026

Copy link
Copy Markdown
Contributor

Fixes two issues in snmp/smart-v1 related to SMART temperature handling:

  1. Fix drive_drip typo: should be drive_trip.

  2. Fix max_temp selection logic in the three cases selecting the maximum temperature from SMART attributes 190 and 194.

The defined() calls incorrectly contain && expressions. The && expression is evaluated first and its result is passed to defined(), rather than testing whether the individual value is defined and numeric.

The conditions are corrected so that the presence and numeric validity of SMART attributes 190 and 194 are tested independently.

No other SMART parsing logic is changed.

Fix "drive_drip" typo: should be "drive_trip"
Fix max_temp selection logic in the three cases selecting the maximum temperature from SMART attributes 190 and 194.

The defined() calls incorrectly contain && expressions. The && expression is evaluated first and its result is passed to defined(), rather than testing whether the individual value is defined and numeric.

The conditions are corrected so that the presence and numeric validity of SMART attributes 190 and 194 are tested independently.

No other SMART parsing logic is changed.
@CLAassistant

CLAassistant commented Sep 6, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@VVelox
VVelox merged commit 37a7d54 into librenms:master Sep 6, 2026
3 checks passed
@VVelox

VVelox commented Sep 6, 2026

Copy link
Copy Markdown
Collaborator

derp, thanks

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.

3 participants