nwp500-python 1.0.2__tar.gz → 1.0.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (92) hide show
  1. {nwp500_python-1.0.2/src/nwp500_python.egg-info → nwp500_python-1.0.4}/PKG-INFO +57 -1
  2. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/README.rst +56 -0
  3. nwp500_python-1.0.4/docs/DEVICE_FEATURE_FIELDS.rst +366 -0
  4. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/DEVICE_STATUS_FIELDS.rst +3 -3
  5. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/index.rst +1 -0
  6. nwp500_python-1.0.4/examples/set_dhw_temperature_example.py +120 -0
  7. nwp500_python-1.0.4/examples/set_mode_example.py +113 -0
  8. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/setup.cfg +2 -0
  9. nwp500_python-1.0.4/src/nwp500/cli.py +576 -0
  10. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/models.py +39 -10
  11. {nwp500_python-1.0.2 → nwp500_python-1.0.4/src/nwp500_python.egg-info}/PKG-INFO +57 -1
  12. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500_python.egg-info/SOURCES.txt +6 -3
  13. nwp500_python-1.0.4/src/nwp500_python.egg-info/entry_points.txt +2 -0
  14. nwp500_python-1.0.2/src/nwp500/skeleton.py +0 -152
  15. nwp500_python-1.0.2/tests/test_skeleton.py +0 -25
  16. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.coveragerc +0 -0
  17. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.github/copilot-instructions.md +0 -0
  18. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.github/workflows/ci.yml +0 -0
  19. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.github/workflows/release.yml +0 -0
  20. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.gitignore +0 -0
  21. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.pre-commit-config.yaml +0 -0
  22. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/.readthedocs.yml +0 -0
  23. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/AUTHORS.rst +0 -0
  24. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/CHANGELOG.rst +0 -0
  25. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/CONTRIBUTING.rst +0 -0
  26. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/LICENSE.txt +0 -0
  27. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/Makefile +0 -0
  28. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/RELEASE.md +0 -0
  29. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/API_CLIENT.rst +0 -0
  30. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/API_REFERENCE.rst +0 -0
  31. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/AUTHENTICATION.rst +0 -0
  32. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/COMMAND_QUEUE.rst +0 -0
  33. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/DEVELOPMENT.rst +0 -0
  34. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/ENERGY_MONITORING.rst +0 -0
  35. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/ERROR_CODES.rst +0 -0
  36. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/EVENT_EMITTER.rst +0 -0
  37. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/MQTT_CLIENT.rst +0 -0
  38. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/MQTT_MESSAGES.rst +0 -0
  39. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/Makefile +0 -0
  40. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/_static/.gitignore +0 -0
  41. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/authors.rst +0 -0
  42. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/changelog.rst +0 -0
  43. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/conf.py +0 -0
  44. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/contributing.rst +0 -0
  45. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/license.rst +0 -0
  46. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/openapi.yaml +0 -0
  47. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/readme.rst +0 -0
  48. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/docs/requirements.txt +0 -0
  49. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/.ruff.toml +0 -0
  50. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/README.md +0 -0
  51. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/api_client_example.py +0 -0
  52. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/auth_constructor_example.py +0 -0
  53. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/authenticate.py +0 -0
  54. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/combined_callbacks.py +0 -0
  55. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/command_queue_demo.py +0 -0
  56. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/device_feature_callback.py +0 -0
  57. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/device_status_callback.py +0 -0
  58. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/device_status_callback_debug.py +0 -0
  59. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/energy_usage_example.py +0 -0
  60. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/event_emitter_demo.py +0 -0
  61. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/improved_auth_pattern.py +0 -0
  62. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/mask.py +0 -0
  63. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/mqtt_client_example.py +0 -0
  64. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/periodic_device_info.py +0 -0
  65. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/periodic_requests.py +0 -0
  66. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/reconnection_demo.py +0 -0
  67. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/simple_periodic_info.py +0 -0
  68. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/simple_periodic_status.py +0 -0
  69. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/test_api_client.py +0 -0
  70. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/test_mqtt_connection.py +0 -0
  71. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/test_mqtt_messaging.py +0 -0
  72. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/examples/test_periodic_minimal.py +0 -0
  73. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/pyproject.toml +0 -0
  74. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/scripts/format.py +0 -0
  75. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/scripts/lint.py +0 -0
  76. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/scripts/setup-dev.py +0 -0
  77. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/setup.py +0 -0
  78. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/__init__.py +0 -0
  79. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/api_client.py +0 -0
  80. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/auth.py +0 -0
  81. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/config.py +0 -0
  82. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/constants.py +0 -0
  83. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/events.py +0 -0
  84. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500/mqtt_client.py +0 -0
  85. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500_python.egg-info/dependency_links.txt +0 -0
  86. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500_python.egg-info/not-zip-safe +0 -0
  87. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500_python.egg-info/requires.txt +0 -0
  88. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/src/nwp500_python.egg-info/top_level.txt +0 -0
  89. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/tests/conftest.py +0 -0
  90. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/tests/test_command_queue.py +0 -0
  91. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/tests/test_events.py +0 -0
  92. {nwp500_python-1.0.2 → nwp500_python-1.0.4}/tox.ini +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nwp500-python
3
- Version: 1.0.2
3
+ Version: 1.0.4
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: Emmanuel Levijarvi
@@ -96,6 +96,59 @@ Basic Usage
96
96
  # Change operation mode
97
97
  await api_client.set_device_mode(device, "heat_pump")
98
98
 
99
+ Command Line Interface
100
+ ======================
101
+
102
+ The library includes a command line interface for quick monitoring and device information retrieval:
103
+
104
+ .. code-block:: bash
105
+
106
+ # Set credentials via environment variables
107
+ export NAVIEN_EMAIL="your_email@example.com"
108
+ export NAVIEN_PASSWORD="your_password"
109
+
110
+ # Get current device status (one-time)
111
+ python -m nwp500.cli --status
112
+
113
+ # Get device information
114
+ python -m nwp500.cli --device-info
115
+
116
+ # Get device feature/capability information
117
+ python -m nwp500.cli --device-feature
118
+
119
+ # Set operation mode and see response
120
+ python -m nwp500.cli --set-mode energy-saver
121
+
122
+ # Set DHW target temperature and see response
123
+ python -m nwp500.cli --set-dhw-temp 140
124
+
125
+ # Set temperature and then get updated status
126
+ python -m nwp500.cli --set-dhw-temp 140 --status
127
+
128
+ # Set mode and then get updated status
129
+ python -m nwp500.cli --set-mode energy-saver --status
130
+
131
+ # Just get current status (one-time)
132
+ python -m nwp500.cli --status
133
+
134
+ # Monitor continuously (default - writes to CSV)
135
+ python -m nwp500.cli --monitor
136
+
137
+ # Monitor with custom output file
138
+ python -m nwp500.cli --monitor --output my_data.csv
139
+
140
+ **Available CLI Options:**
141
+
142
+ * ``--status``: Print current device status as JSON. Can be combined with control commands to see updated status.
143
+ * ``--device-info``: Print comprehensive device information (firmware, model, capabilities) via MQTT as JSON and exit
144
+ * ``--device-feature``: Print device capabilities and feature settings via MQTT as JSON and exit
145
+ * ``--set-mode MODE``: Set operation mode and display response. Valid modes: heat-pump, energy-saver, high-demand, electric, vacation, standby
146
+ * ``--set-dhw-temp TEMP``: Set DHW (Domestic Hot Water) target temperature in Fahrenheit (115-150°F) and display response
147
+ * ``--monitor``: Continuously monitor status every 30 seconds and log to CSV (default)
148
+ * ``-o, --output``: Specify CSV output filename for monitoring mode
149
+ * ``--email``: Override email (alternative to environment variable)
150
+ * ``--password``: Override password (alternative to environment variable)
151
+
99
152
  Device Status Fields
100
153
  ====================
101
154
 
@@ -182,12 +235,14 @@ Documentation
182
235
  Comprehensive documentation is available in the ``docs/`` directory:
183
236
 
184
237
  * `Device Status Fields`_ - Complete field reference with units and conversions
238
+ * `Device Feature Fields`_ - Device capabilities and firmware information reference
185
239
  * `MQTT Messages`_ - MQTT protocol documentation
186
240
  * `MQTT Client`_ - MQTT client usage guide
187
241
  * `Authentication`_ - Authentication module documentation
188
242
 
189
243
  .. _MQTT Protocol Documentation: docs/MQTT_MESSAGES.rst
190
244
  .. _Device Status Fields: docs/DEVICE_STATUS_FIELDS.rst
245
+ .. _Device Feature Fields: docs/DEVICE_FEATURE_FIELDS.rst
191
246
  .. _MQTT Messages: docs/MQTT_MESSAGES.rst
192
247
  .. _MQTT Client: docs/MQTT_CLIENT.rst
193
248
  .. _Authentication: docs/AUTHENTICATION.rst
@@ -198,6 +253,7 @@ Data Models
198
253
  The library includes type-safe data models with automatic unit conversions:
199
254
 
200
255
  * **DeviceStatus**: Complete device status with 70+ fields
256
+ * **DeviceFeature**: Device capabilities, firmware versions, and configuration limits
201
257
  * **OperationMode**: Enumeration of available operation modes
202
258
  * **TemperatureUnit**: Celsius/Fahrenheit handling
203
259
  * **MqttRequest/MqttCommand**: MQTT message structures
@@ -59,6 +59,59 @@ Basic Usage
59
59
  # Change operation mode
60
60
  await api_client.set_device_mode(device, "heat_pump")
61
61
 
62
+ Command Line Interface
63
+ ======================
64
+
65
+ The library includes a command line interface for quick monitoring and device information retrieval:
66
+
67
+ .. code-block:: bash
68
+
69
+ # Set credentials via environment variables
70
+ export NAVIEN_EMAIL="your_email@example.com"
71
+ export NAVIEN_PASSWORD="your_password"
72
+
73
+ # Get current device status (one-time)
74
+ python -m nwp500.cli --status
75
+
76
+ # Get device information
77
+ python -m nwp500.cli --device-info
78
+
79
+ # Get device feature/capability information
80
+ python -m nwp500.cli --device-feature
81
+
82
+ # Set operation mode and see response
83
+ python -m nwp500.cli --set-mode energy-saver
84
+
85
+ # Set DHW target temperature and see response
86
+ python -m nwp500.cli --set-dhw-temp 140
87
+
88
+ # Set temperature and then get updated status
89
+ python -m nwp500.cli --set-dhw-temp 140 --status
90
+
91
+ # Set mode and then get updated status
92
+ python -m nwp500.cli --set-mode energy-saver --status
93
+
94
+ # Just get current status (one-time)
95
+ python -m nwp500.cli --status
96
+
97
+ # Monitor continuously (default - writes to CSV)
98
+ python -m nwp500.cli --monitor
99
+
100
+ # Monitor with custom output file
101
+ python -m nwp500.cli --monitor --output my_data.csv
102
+
103
+ **Available CLI Options:**
104
+
105
+ * ``--status``: Print current device status as JSON. Can be combined with control commands to see updated status.
106
+ * ``--device-info``: Print comprehensive device information (firmware, model, capabilities) via MQTT as JSON and exit
107
+ * ``--device-feature``: Print device capabilities and feature settings via MQTT as JSON and exit
108
+ * ``--set-mode MODE``: Set operation mode and display response. Valid modes: heat-pump, energy-saver, high-demand, electric, vacation, standby
109
+ * ``--set-dhw-temp TEMP``: Set DHW (Domestic Hot Water) target temperature in Fahrenheit (115-150°F) and display response
110
+ * ``--monitor``: Continuously monitor status every 30 seconds and log to CSV (default)
111
+ * ``-o, --output``: Specify CSV output filename for monitoring mode
112
+ * ``--email``: Override email (alternative to environment variable)
113
+ * ``--password``: Override password (alternative to environment variable)
114
+
62
115
  Device Status Fields
63
116
  ====================
64
117
 
@@ -145,12 +198,14 @@ Documentation
145
198
  Comprehensive documentation is available in the ``docs/`` directory:
146
199
 
147
200
  * `Device Status Fields`_ - Complete field reference with units and conversions
201
+ * `Device Feature Fields`_ - Device capabilities and firmware information reference
148
202
  * `MQTT Messages`_ - MQTT protocol documentation
149
203
  * `MQTT Client`_ - MQTT client usage guide
150
204
  * `Authentication`_ - Authentication module documentation
151
205
 
152
206
  .. _MQTT Protocol Documentation: docs/MQTT_MESSAGES.rst
153
207
  .. _Device Status Fields: docs/DEVICE_STATUS_FIELDS.rst
208
+ .. _Device Feature Fields: docs/DEVICE_FEATURE_FIELDS.rst
154
209
  .. _MQTT Messages: docs/MQTT_MESSAGES.rst
155
210
  .. _MQTT Client: docs/MQTT_CLIENT.rst
156
211
  .. _Authentication: docs/AUTHENTICATION.rst
@@ -161,6 +216,7 @@ Data Models
161
216
  The library includes type-safe data models with automatic unit conversions:
162
217
 
163
218
  * **DeviceStatus**: Complete device status with 70+ fields
219
+ * **DeviceFeature**: Device capabilities, firmware versions, and configuration limits
164
220
  * **OperationMode**: Enumeration of available operation modes
165
221
  * **TemperatureUnit**: Celsius/Fahrenheit handling
166
222
  * **MqttRequest/MqttCommand**: MQTT message structures
@@ -0,0 +1,366 @@
1
+ Device Feature Fields
2
+ =====================
3
+
4
+ This document lists the fields found in the ``DeviceFeature`` object returned by MQTT device info requests.
5
+
6
+ The DeviceFeature data contains comprehensive device capabilities, configuration, and firmware information received via MQTT when calling ``request_device_info()``. This data is much more detailed than the basic device information available through the REST API and corresponds to the actual device specifications and capabilities as documented in the official Navien NWP500 Installation and User manuals.
7
+
8
+ .. list-table::
9
+ :header-rows: 1
10
+ :widths: 15 8 8 49 20
11
+
12
+ * - Field Name
13
+ - Type
14
+ - Units
15
+ - Description
16
+ - Conversion Formula
17
+ * - ``countryCode``
18
+ - int
19
+ - None
20
+ - Country/region code where device is certified for operation (1=USA, complies with FCC Part 15 Class B, NSF/ANSI 372)
21
+ - None
22
+ * - ``modelTypeCode``
23
+ - int
24
+ - None
25
+ - Model type identifier: NWP500 series electric heat pump water heater model variant
26
+ - None
27
+ * - ``controlTypeCode``
28
+ - int
29
+ - None
30
+ - Control system type: Advanced digital control with LCD display and WiFi connectivity
31
+ - None
32
+ * - ``volumeCode``
33
+ - int
34
+ - Gallons
35
+ - Tank nominal capacity: 50, 65, or 80 gallons (NWP500-50/65/80 models)
36
+ - None
37
+ * - ``controllerSwVersion``
38
+ - int
39
+ - None
40
+ - Main controller firmware version - controls heat pump, heating elements, and system logic
41
+ - None
42
+ * - ``panelSwVersion``
43
+ - int
44
+ - None
45
+ - Front panel display firmware version - manages LCD display and user interface
46
+ - None
47
+ * - ``wifiSwVersion``
48
+ - int
49
+ - None
50
+ - WiFi module firmware version - handles NaviLink app connectivity and cloud communication
51
+ - None
52
+ * - ``controllerSwCode``
53
+ - int
54
+ - None
55
+ - Controller firmware variant/branch identifier for support and compatibility
56
+ - None
57
+ * - ``panelSwCode``
58
+ - int
59
+ - None
60
+ - Panel firmware variant/branch identifier for display features and UI capabilities
61
+ - None
62
+ * - ``wifiSwCode``
63
+ - int
64
+ - None
65
+ - WiFi firmware variant/branch identifier for communication protocol version
66
+ - None
67
+ * - ``controllerSerialNumber``
68
+ - str
69
+ - None
70
+ - Unique serial number of the main controller board for warranty and service identification
71
+ - None
72
+ * - ``powerUse``
73
+ - int
74
+ - Boolean
75
+ - Power control capability (1=supported) - can be turned on/off via controls (always 1 for NWP500)
76
+ - None
77
+ * - ``holidayUse``
78
+ - int
79
+ - Boolean
80
+ - Vacation mode support (1=supported) - energy-saving mode for 0-99 days with minimal operations
81
+ - None
82
+ * - ``programReservationUse``
83
+ - int
84
+ - Boolean
85
+ - Scheduled operation support (1=supported) - programmable heating schedules and timers
86
+ - None
87
+ * - ``dhwUse``
88
+ - int
89
+ - Boolean
90
+ - Domestic hot water functionality (1=available) - primary function of water heater (always 1)
91
+ - None
92
+ * - ``dhwTemperatureSettingUse``
93
+ - int
94
+ - Boolean
95
+ - Temperature adjustment capability (1=supported) - user can modify target temperature
96
+ - None
97
+ * - ``dhwTemperatureMin``
98
+ - int
99
+ - °F
100
+ - Minimum DHW temperature setting: 95°F (35°C) - safety and efficiency lower limit
101
+ - ``raw + 20``
102
+ * - ``dhwTemperatureMax``
103
+ - int
104
+ - °F
105
+ - Maximum DHW temperature setting: 150°F (65.5°C) - scald protection upper limit
106
+ - ``raw + 20``
107
+ * - ``smartDiagnosticUse``
108
+ - int
109
+ - Boolean
110
+ - Self-diagnostic capability (1=available) - 10-minute startup diagnostic, error code system
111
+ - None
112
+ * - ``wifiRssiUse``
113
+ - int
114
+ - Boolean
115
+ - WiFi signal monitoring (1=supported) - reports signal strength in dBm for connectivity diagnostics
116
+ - None
117
+ * - ``temperatureType``
118
+ - TemperatureUnit
119
+ - Enum
120
+ - Default temperature unit preference (CELSIUS=1, FAHRENHEIT=2) - factory set to Fahrenheit for USA
121
+ - Enum
122
+ * - ``tempFormulaType``
123
+ - int
124
+ - None
125
+ - Temperature calculation method identifier for internal sensor calibration and conversions
126
+ - None
127
+ * - ``energyUsageUse``
128
+ - int
129
+ - Boolean
130
+ - Energy monitoring support (1=available) - tracks kWh consumption for heat pump and electric elements
131
+ - None
132
+ * - ``freezeProtectionUse``
133
+ - int
134
+ - Boolean
135
+ - Freeze protection capability (1=available) - automatic heating when tank drops below threshold
136
+ - None
137
+ * - ``freezeProtectionTempMin``
138
+ - int
139
+ - °F
140
+ - Minimum freeze protection threshold: 43°F (6°C) - factory default activation temperature
141
+ - ``raw + 20``
142
+ * - ``freezeProtectionTempMax``
143
+ - int
144
+ - °F
145
+ - Maximum freeze protection threshold: typically 65°F - user-adjustable upper limit
146
+ - ``raw + 20``
147
+ * - ``mixingValueUse``
148
+ - int
149
+ - Boolean
150
+ - Thermostatic mixing valve support (1=available) - for temperature limiting at point of use
151
+ - None
152
+ * - ``drSettingUse``
153
+ - int
154
+ - Boolean
155
+ - Demand Response support (1=available) - CTA-2045 compliance for utility load management
156
+ - None
157
+ * - ``antiLegionellaSettingUse``
158
+ - int
159
+ - Boolean
160
+ - Anti-Legionella function (1=available) - periodic heating to 140°F (60°C) to prevent bacteria
161
+ - None
162
+ * - ``hpwhUse``
163
+ - int
164
+ - Boolean
165
+ - Heat Pump Water Heater mode (1=supported) - primary efficient heating method using refrigeration cycle
166
+ - None
167
+ * - ``dhwRefillUse``
168
+ - int
169
+ - Boolean
170
+ - Tank refill detection (1=supported) - monitors for "dry fire" conditions during refill
171
+ - None
172
+ * - ``ecoUse``
173
+ - int
174
+ - Boolean
175
+ - ECO safety switch (1=available) - Energy Cut Off high-temperature limit protection
176
+ - None
177
+ * - ``electricUse``
178
+ - int
179
+ - Boolean
180
+ - Electric-only mode (1=supported) - heating element only operation for maximum recovery speed
181
+ - None
182
+ * - ``heatpumpUse``
183
+ - int
184
+ - Boolean
185
+ - Heat pump only mode (1=supported) - most efficient operation using only refrigeration cycle
186
+ - None
187
+ * - ``energySaverUse``
188
+ - int
189
+ - Boolean
190
+ - Energy Saver mode (1=supported) - hybrid efficiency mode balancing speed and efficiency (default)
191
+ - None
192
+ * - ``highDemandUse``
193
+ - int
194
+ - Boolean
195
+ - High Demand mode (1=supported) - hybrid boost mode prioritizing fast recovery over efficiency
196
+ - None
197
+
198
+ Operation Mode Support Matrix
199
+ -----------------------------
200
+
201
+ The NWP500 supports five primary operation modes as indicated by the capability flags:
202
+
203
+ .. list-table::
204
+ :header-rows: 1
205
+ :widths: 15 15 15 55
206
+
207
+ * - Mode ID
208
+ - Mode Name
209
+ - Capability Flag
210
+ - Description & Performance Characteristics
211
+ * - 1
212
+ - Heat Pump Only
213
+ - ``heatpumpUse``
214
+ - **Most Efficient** - Uses only the heat pump compressor and evaporator. Longest recovery time but highest energy efficiency. Performance varies with ambient temperature and humidity.
215
+ * - 2
216
+ - Energy Saver (Default)
217
+ - ``energySaverUse``
218
+ - **Balanced Efficiency** - Hybrid mode combining heat pump with backup electric elements. Factory default setting balances efficiency with reasonable recovery time.
219
+ * - 3
220
+ - High Demand
221
+ - ``highDemandUse``
222
+ - **Fastest Recovery** - Hybrid mode prioritizing speed over efficiency. Uses heat pump plus more frequent electric element operation for maximum hot water supply.
223
+ * - 4
224
+ - Electric Only
225
+ - ``electricUse``
226
+ - **Emergency/Service Mode** - Uses only 3,755W heating elements (upper and lower, not simultaneously). Least efficient but operates in all conditions. Auto-reverts after 72 hours.
227
+ * - 5
228
+ - Vacation
229
+ - ``holidayUse``
230
+ - **Maximum Energy Savings** - Suspends normal heating for 0-99 days. Only freeze protection and anti-seize operations continue. Heating resumes 9 hours before vacation end.
231
+
232
+ Hardware Specifications from Manual Cross-Reference
233
+ ---------------------------------------------------
234
+
235
+ The device feature data corresponds to these official NWP500 specifications:
236
+
237
+ **Electrical System**
238
+ * Input: 208-240V AC, 60Hz, 1-Phase
239
+ * Current Draw: 208V (25.9A) / 240V (28.8A)
240
+ * Circuit Protection: 30A breaker required
241
+ * Heating Elements: 3,755W @ 208V or 5,000W @ 240V (upper and lower)
242
+ * Heat Pump Compressor: 11.6A
243
+ * Evaporator Fan: 0.22A
244
+
245
+ **Physical Models**
246
+ * NWP500-50: 50 gallon, Ø21.7" × 63" (229 lbs)
247
+ * NWP500-65: 65 gallon, Ø25" × 63" (265 lbs)
248
+ * NWP500-80: 80 gallon, Ø25" × 71.6" (282 lbs)
249
+
250
+ **Safety & Compliance Features**
251
+ * FCC ID: P53-EMC3290 (Class B digital device)
252
+ * IC: 23507-EMC3290 (Industry Canada RSS-210)
253
+ * NSF/ANSI 372 certified (lead-free wetted surfaces <0.25%)
254
+ * Temperature & Pressure relief valve (150 psi)
255
+ * ECO (Energy Cut Off) high-limit safety switch
256
+
257
+ **Smart Features & Connectivity**
258
+ * NaviLink WiFi app connectivity
259
+ * Self-diagnostic system with error codes
260
+ * CTA-2045 Demand Response module support
261
+ * Anti-Legionella periodic disinfection (1-30 day intervals)
262
+ * Programmable operation schedules
263
+
264
+ Firmware Version Interpretation
265
+ -------------------------------
266
+
267
+ The device returns three separate firmware components for comprehensive system identification:
268
+
269
+ **Main Controller (``controllerSwVersion``, ``controllerSwCode``)**
270
+ * Manages heat pump compressor, heating elements, temperature sensors
271
+ * Controls operation mode logic and safety interlocks
272
+ * Handles diagnostic routines and error detection
273
+ * Serial number provided for warranty tracking
274
+
275
+ **Display Panel (``panelSwVersion``, ``panelSwCode``)**
276
+ * User interface and LCD display management
277
+ * Button input processing and menu navigation
278
+ * Status indicator control and user feedback
279
+
280
+ **WiFi Module (``wifiSwVersion``, ``wifiSwCode``)**
281
+ * NaviLink cloud connectivity and app communication
282
+ * Wireless network management and security
283
+ * Remote monitoring and control capabilities
284
+
285
+ Temperature Range Validation
286
+ ----------------------------
287
+
288
+ The reported temperature ranges align with official specifications and use the same conversion patterns as DeviceStatus fields:
289
+
290
+ * **DHW Range**: 95°F to 150°F (factory default: 120°F for safety) - uses ``raw + 20`` conversion
291
+ * **Freeze Protection**: Activates at 43°F, prevents tank freezing - uses ``raw + 20`` conversion
292
+ * **Anti-Legionella**: Heats to 140°F at programmed intervals (requires mixing valve)
293
+ * **Scald Protection**: Built-in limits with recommendation for thermostatic mixing valves
294
+
295
+ **Conversion Pattern Consistency**: Temperature fields in DeviceFeature use the same ``raw + 20``
296
+ conversion formula as corresponding fields in DeviceStatus, ensuring consistent temperature
297
+ handling across all device data structures.
298
+
299
+ Usage Example
300
+ -------------
301
+
302
+ .. code-block:: python
303
+
304
+ import asyncio
305
+ from nwp500 import NavienAuthClient, NavienMqttClient, NavienAPIClient
306
+
307
+ async def analyze_device_capabilities():
308
+ async with NavienAuthClient("email@example.com", "password") as auth_client:
309
+ # Get device list
310
+ api_client = NavienAPIClient(auth_client)
311
+ devices = await api_client.list_devices()
312
+ device = devices[0]
313
+
314
+ # Connect MQTT and request device features
315
+ mqtt_client = NavienMqttClient(auth_client)
316
+ await mqtt_client.connect()
317
+
318
+ # Set up callback to analyze device capabilities
319
+ def analyze_features(feature):
320
+ print(f"=== Device Capability Analysis ===")
321
+ print(f"Model: NWP500-{feature.volumeCode} ({feature.volumeCode} gallon)")
322
+ print(f"Controller FW: v{feature.controllerSwVersion} (Code: {feature.controllerSwCode})")
323
+ print(f"Panel FW: v{feature.panelSwVersion} (Code: {feature.panelSwCode})")
324
+ print(f"WiFi FW: v{feature.wifiSwVersion} (Code: {feature.wifiSwCode})")
325
+ print(f"Serial: {feature.controllerSerialNumber}")
326
+
327
+ print(f"\n=== Temperature Capabilities ===")
328
+ print(f"DHW Range: {feature.dhwTemperatureMin}°F - {feature.dhwTemperatureMax}°F")
329
+ print(f"Freeze Protection: {feature.freezeProtectionTempMin}°F - {feature.freezeProtectionTempMax}°F")
330
+ print(f"Default Unit: {feature.temperatureType.name}")
331
+
332
+ print(f"\n=== Supported Operation Modes ===")
333
+ modes = []
334
+ if feature.heatpumpUse: modes.append("Heat Pump Only")
335
+ if feature.energySaverUse: modes.append("Energy Saver (Default)")
336
+ if feature.highDemandUse: modes.append("High Demand")
337
+ if feature.electricUse: modes.append("Electric Only")
338
+ if feature.holidayUse: modes.append("Vacation Mode")
339
+ print(f"Available: {', '.join(modes)}")
340
+
341
+ print(f"\n=== Smart Features ===")
342
+ features = []
343
+ if feature.smartDiagnosticUse: features.append("Self-Diagnostics")
344
+ if feature.wifiRssiUse: features.append("WiFi Monitoring")
345
+ if feature.energyUsageUse: features.append("Energy Tracking")
346
+ if feature.antiLegionellaSettingUse: features.append("Anti-Legionella")
347
+ if feature.drSettingUse: features.append("Demand Response")
348
+ if feature.mixingValueUse: features.append("Mixing Valve Support")
349
+ print(f"Available: {', '.join(features)}")
350
+
351
+ await mqtt_client.subscribe_device_feature(device, analyze_features)
352
+ await mqtt_client.request_device_info(device)
353
+
354
+ # Wait for response
355
+ await asyncio.sleep(5)
356
+ await mqtt_client.disconnect()
357
+
358
+ asyncio.run(analyze_device_capabilities())
359
+
360
+ See Also
361
+ --------
362
+
363
+ * :doc:`DEVICE_STATUS_FIELDS` - Real-time device status field reference
364
+ * :doc:`MQTT_CLIENT` - MQTT client usage guide for device communication
365
+ * :doc:`API_CLIENT` - REST API client for device management
366
+ * :doc:`ERROR_CODES` - Complete error code reference for diagnostics
@@ -117,12 +117,12 @@ This document lists the fields found in the ``status`` object of device status m
117
117
  - integer
118
118
  - °F
119
119
  - Temperature of the upper part of the tank.
120
- - ``raw + 20``
120
+ - ``(raw / 10) * 9/5 + 32`` (decicelsius to Fahrenheit)
121
121
  * - ``tankLowerTemperature``
122
122
  - integer
123
123
  - °F
124
124
  - Temperature of the lower part of the tank.
125
- - ``raw + 20``
125
+ - ``(raw / 10) * 9/5 + 32`` (decicelsius to Fahrenheit)
126
126
  * - ``dischargeTemperature``
127
127
  - integer
128
128
  - °F
@@ -142,7 +142,7 @@ This document lists the fields found in the ``status`` object of device status m
142
142
  - integer
143
143
  - °F
144
144
  - Ambient air temperature measured at the heat pump air intake.
145
- - ``(raw * 9/5) + 32``
145
+ - ``(raw / 22.4) * 9/5 + 32``
146
146
  * - ``targetSuperHeat``
147
147
  - integer
148
148
  - °F
@@ -322,6 +322,7 @@ Documentation
322
322
 
323
323
  API Reference (OpenAPI) <API_REFERENCE>
324
324
  Device Status Fields <DEVICE_STATUS_FIELDS>
325
+ Device Feature Fields <DEVICE_FEATURE_FIELDS>
325
326
  Error Codes <ERROR_CODES>
326
327
  MQTT Messages <MQTT_MESSAGES>
327
328
 
@@ -0,0 +1,120 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Example: Setting DHW target temperature via MQTT and displaying response.
4
+
5
+ This demonstrates how to programmatically change the water heater DHW
6
+ (Domestic Hot Water) target temperature and receive confirmation of the change.
7
+ """
8
+
9
+ import asyncio
10
+ import logging
11
+ from nwp500 import NavienAuthClient, NavienAPIClient, NavienMqttClient
12
+
13
+ # Set up logging to see the temperature change process
14
+ logging.basicConfig(level=logging.INFO)
15
+ logger = logging.getLogger(__name__)
16
+
17
+
18
+ async def set_dhw_temperature_example():
19
+ """Example of setting DHW target temperature programmatically."""
20
+
21
+ # Use environment variables or replace with your credentials
22
+ email = "your_email@example.com"
23
+ password = "your_password"
24
+
25
+ async with NavienAuthClient(email, password) as auth_client:
26
+ # Get device information
27
+ api_client = NavienAPIClient(auth_client)
28
+ devices = await api_client.list_devices()
29
+
30
+ if not devices:
31
+ logger.error("No devices found")
32
+ return
33
+
34
+ device = devices[0]
35
+ logger.info(f"Found device: {device.device_info.device_name}")
36
+
37
+ # Connect MQTT client
38
+ mqtt_client = NavienMqttClient(auth_client)
39
+ await mqtt_client.connect()
40
+ logger.info("MQTT client connected")
41
+
42
+ try:
43
+ # Get current status first
44
+ logger.info("Getting current device status...")
45
+ current_status = None
46
+
47
+ def on_current_status(status):
48
+ nonlocal current_status
49
+ current_status = status
50
+ logger.info(
51
+ f"Current DHW target temperature: {status.dhwTargetTemperatureSetting}°F"
52
+ )
53
+ logger.info(f"Current DHW temperature: {status.dhwTemperature}°F")
54
+
55
+ await mqtt_client.subscribe_device_status(device, on_current_status)
56
+ await mqtt_client.request_device_status(device)
57
+ await asyncio.sleep(3) # Wait for current status
58
+
59
+ # Set new target temperature to 140°F
60
+ target_temperature = 140
61
+ logger.info(f"Setting DHW target temperature to {target_temperature}°F...")
62
+
63
+ # Set up callback to capture temperature change response
64
+ temp_changed = False
65
+
66
+ def on_temp_change_response(status):
67
+ nonlocal temp_changed
68
+ logger.info("Temperature change response received!")
69
+ logger.info(
70
+ f"New target temperature: {status.dhwTargetTemperatureSetting}°F"
71
+ )
72
+ logger.info(f"Current DHW temperature: {status.dhwTemperature}°F")
73
+ logger.info(f"Operation mode: {status.operationMode.name}")
74
+ logger.info(f"Tank charge: {status.dhwChargePer}%")
75
+ temp_changed = True
76
+
77
+ await mqtt_client.subscribe_device_status(device, on_temp_change_response)
78
+
79
+ # Send temperature change command using display temperature value
80
+ await mqtt_client.set_dhw_temperature_display(device, target_temperature)
81
+
82
+ # Wait for confirmation
83
+ for i in range(15): # Wait up to 15 seconds
84
+ if temp_changed:
85
+ logger.info("Temperature change confirmed!")
86
+ break
87
+ await asyncio.sleep(1)
88
+ else:
89
+ logger.warning("Timeout waiting for temperature change confirmation")
90
+
91
+ finally:
92
+ await mqtt_client.disconnect()
93
+ logger.info("Disconnected from MQTT")
94
+
95
+
96
+ if __name__ == "__main__":
97
+ print("=== DHW Temperature Change Example ===")
98
+ print("This example demonstrates:")
99
+ print("1. Connecting to device via MQTT")
100
+ print("2. Getting current DHW target temperature")
101
+ print("3. Setting new DHW target temperature to 140°F")
102
+ print("4. Receiving and displaying the response")
103
+ print()
104
+
105
+ # Note: This requires valid credentials
106
+ print(
107
+ "Note: Update email/password or set NAVIEN_EMAIL/NAVIEN_PASSWORD environment variables"
108
+ )
109
+ print()
110
+
111
+ # Uncomment to run (requires valid credentials)
112
+ # asyncio.run(set_dhw_temperature_example())
113
+
114
+ print("CLI equivalent commands:")
115
+ print(" python -m nwp500.cli --set-dhw-temp 140")
116
+ print(" python -m nwp500.cli --set-dhw-temp 130")
117
+ print(" python -m nwp500.cli --set-dhw-temp 150")
118
+ print()
119
+ print("Valid temperature range: 115-150°F")
120
+ print("Note: The device may cap temperatures at 150°F maximum")