Skip to content

Add heatMinOpTemperature field and firmware version tracking#14

Merged
eman merged 3 commits intomainfrom
status_field
Oct 15, 2025
Merged

Add heatMinOpTemperature field and firmware version tracking#14
eman merged 3 commits intomainfrom
status_field

Conversation

@eman
Copy link
Copy Markdown
Owner

@eman eman commented Oct 15, 2025

Summary

This PR adds support for the heatMinOpTemperature field discovered in device status messages and implements a firmware version tracking system for future field changes.

Changes

New Field Support

  • Added heatMinOpTemperature to DeviceStatus model
    • Field type: float
    • Conversion: raw + 20 (e.g., raw value 70 → 90°F)
    • Represents the minimum operating temperature threshold for heat pump activation
    • Value aligns with hpUpperOnTempSetting (heat pump turn-on temperature)

Firmware Tracking System

  • Created constants.KNOWN_FIRMWARE_FIELD_CHANGES

    • Tracks newly discovered fields with metadata (version, description, conversion)
    • Helps users report firmware versions when new fields appear
  • Enhanced unknown field logging

    • INFO level: Fields documented but not yet implemented
    • WARNING level: Completely unknown fields with user reporting instructions
    • Graceful degradation: Unknown fields filtered without crashes

Documentation

  • Updated DEVICE_STATUS_FIELDS.rst with heatMinOpTemperature documentation
  • Created comprehensive FIRMWARE_TRACKING.rst guide
  • Added firmware tracking to documentation index

Testing

  • ✅ CLI successfully retrieves and displays the field
  • ✅ Conversion formula validated (70 → 90°F)
  • ✅ Value makes sense in context (matches heat pump activation threshold)
  • ✅ Code formatted with ruff
  • ✅ Library handles unknown fields gracefully

Notes

During testing, discovered additional recirc* fields (recirculation pump related) that are now logged for future tracking.

Backwards Compatibility

✅ Fully backwards compatible - existing code continues to work without changes.

- Add heatMinOpTemperature field to DeviceStatus model
  - Raw value converted using 'raw + 20' formula (70 -> 90°F)
  - Represents minimum operating temperature for heat pump activation

- Implement firmware version tracking system
  - Add KNOWN_FIRMWARE_FIELD_CHANGES to constants.py for tracking new fields
  - Enhanced logging to differentiate known vs unknown new fields
  - Graceful handling of fields from firmware updates

- Documentation updates
  - Add heatMinOpTemperature to DEVICE_STATUS_FIELDS.rst
  - Create new FIRMWARE_TRACKING.rst guide
  - Add firmware tracking to documentation index

- Improve future maintainability
  - Users can report firmware versions when new fields appear
  - Library continues to function with unknown fields
  - Clear path for adding support for new firmware features

This change ensures compatibility with current firmware while preparing
for future device updates.
@eman eman requested a review from Copilot October 15, 2025 16:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for a newly discovered device status field (heatMinOpTemperature) and implements a systematic approach for tracking and handling firmware-introduced fields.

  • Adds heatMinOpTemperature field to the DeviceStatus model with appropriate conversion logic
  • Creates a firmware tracking system in constants.py to document known field changes
  • Implements graceful handling of unknown fields with informative logging for user reporting

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/nwp500/models.py Adds heatMinOpTemperature field, implements unknown field filtering with logging for known/unknown new fields
src/nwp500/constants.py Creates KNOWN_FIRMWARE_FIELD_CHANGES and LATEST_KNOWN_FIRMWARE dictionaries for tracking field changes
docs/index.rst Adds Firmware Tracking documentation to the index
docs/FIRMWARE_TRACKING.rst Comprehensive guide for firmware version tracking, field reporting, and contribution process
docs/DEVICE_STATUS_FIELDS.rst Documents the heatMinOpTemperature field with conversion formula and description

eman and others added 2 commits October 15, 2025 09:25
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…unknown field handling

- Query live device to populate LATEST_KNOWN_FIRMWARE with actual versions:
  - Controller SW: 184614912
  - Panel SW: 0 (not used on NWP500)
  - WiFi SW: 34013184

- Add unknown field filtering to DeviceFeature.from_dict()
  - Prevents crashes when new feature fields appear (e.g., recirculationUse)
  - Consistent with DeviceStatus handling
  - Logs info message about ignored fields

- Update FIRMWARE_TRACKING.rst with observed versions and features
  - Document heatMinOpTemperature was observed with these versions
  - Note presence of recirc* fields for future implementation

All firmware data collected from live NWP500 device on 2025-10-15.
@eman
Copy link
Copy Markdown
Owner Author

eman commented Oct 15, 2025

Firmware Versions Added

Just queried the live device to populate the firmware version constants with actual data:

Observed Versions (NWP500, 2025-10-15)

  • Controller SW Version: 184614912
  • Panel SW Version: 0 (not used on this device type)
  • WiFi SW Version: 34013184

Additional Changes

  • Added unknown field filtering to DeviceFeature.from_dict() to handle new fields like recirculationUse gracefully
  • Updated documentation with observed firmware versions
  • These versions confirmed to include the heatMinOpTemperature field

The firmware tracking system is now fully populated with real-world data and ready for users to reference when reporting new fields.

@eman eman merged commit f3384b8 into main Oct 15, 2025
10 checks passed
@eman eman deleted the status_field branch October 15, 2025 16:33
@eman eman restored the status_field branch October 15, 2025 17:01
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.

2 participants