nwp500-python 1.0.2__tar.gz → 1.0.3__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 (91) hide show
  1. {nwp500_python-1.0.2/src/nwp500_python.egg-info → nwp500_python-1.0.3}/PKG-INFO +44 -1
  2. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/README.rst +43 -0
  3. nwp500_python-1.0.3/docs/DEVICE_FEATURE_FIELDS.rst +366 -0
  4. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/DEVICE_STATUS_FIELDS.rst +3 -3
  5. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/index.rst +1 -0
  6. nwp500_python-1.0.3/examples/set_mode_example.py +113 -0
  7. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/setup.cfg +2 -0
  8. nwp500_python-1.0.3/src/nwp500/cli.py +499 -0
  9. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/models.py +40 -11
  10. {nwp500_python-1.0.2 → nwp500_python-1.0.3/src/nwp500_python.egg-info}/PKG-INFO +44 -1
  11. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500_python.egg-info/SOURCES.txt +5 -3
  12. nwp500_python-1.0.3/src/nwp500_python.egg-info/entry_points.txt +2 -0
  13. nwp500_python-1.0.2/src/nwp500/skeleton.py +0 -152
  14. nwp500_python-1.0.2/tests/test_skeleton.py +0 -25
  15. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.coveragerc +0 -0
  16. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.github/copilot-instructions.md +0 -0
  17. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.github/workflows/ci.yml +0 -0
  18. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.github/workflows/release.yml +0 -0
  19. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.gitignore +0 -0
  20. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.pre-commit-config.yaml +0 -0
  21. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/.readthedocs.yml +0 -0
  22. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/AUTHORS.rst +0 -0
  23. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/CHANGELOG.rst +0 -0
  24. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/CONTRIBUTING.rst +0 -0
  25. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/LICENSE.txt +0 -0
  26. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/Makefile +0 -0
  27. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/RELEASE.md +0 -0
  28. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/API_CLIENT.rst +0 -0
  29. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/API_REFERENCE.rst +0 -0
  30. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/AUTHENTICATION.rst +0 -0
  31. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/COMMAND_QUEUE.rst +0 -0
  32. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/DEVELOPMENT.rst +0 -0
  33. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/ENERGY_MONITORING.rst +0 -0
  34. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/ERROR_CODES.rst +0 -0
  35. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/EVENT_EMITTER.rst +0 -0
  36. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/MQTT_CLIENT.rst +0 -0
  37. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/MQTT_MESSAGES.rst +0 -0
  38. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/Makefile +0 -0
  39. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/_static/.gitignore +0 -0
  40. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/authors.rst +0 -0
  41. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/changelog.rst +0 -0
  42. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/conf.py +0 -0
  43. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/contributing.rst +0 -0
  44. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/license.rst +0 -0
  45. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/openapi.yaml +0 -0
  46. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/readme.rst +0 -0
  47. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/docs/requirements.txt +0 -0
  48. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/.ruff.toml +0 -0
  49. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/README.md +0 -0
  50. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/api_client_example.py +0 -0
  51. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/auth_constructor_example.py +0 -0
  52. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/authenticate.py +0 -0
  53. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/combined_callbacks.py +0 -0
  54. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/command_queue_demo.py +0 -0
  55. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/device_feature_callback.py +0 -0
  56. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/device_status_callback.py +0 -0
  57. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/device_status_callback_debug.py +0 -0
  58. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/energy_usage_example.py +0 -0
  59. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/event_emitter_demo.py +0 -0
  60. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/improved_auth_pattern.py +0 -0
  61. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/mask.py +0 -0
  62. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/mqtt_client_example.py +0 -0
  63. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/periodic_device_info.py +0 -0
  64. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/periodic_requests.py +0 -0
  65. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/reconnection_demo.py +0 -0
  66. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/simple_periodic_info.py +0 -0
  67. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/simple_periodic_status.py +0 -0
  68. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/test_api_client.py +0 -0
  69. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/test_mqtt_connection.py +0 -0
  70. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/test_mqtt_messaging.py +0 -0
  71. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/examples/test_periodic_minimal.py +0 -0
  72. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/pyproject.toml +0 -0
  73. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/scripts/format.py +0 -0
  74. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/scripts/lint.py +0 -0
  75. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/scripts/setup-dev.py +0 -0
  76. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/setup.py +0 -0
  77. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/__init__.py +0 -0
  78. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/api_client.py +0 -0
  79. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/auth.py +0 -0
  80. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/config.py +0 -0
  81. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/constants.py +0 -0
  82. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/events.py +0 -0
  83. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500/mqtt_client.py +0 -0
  84. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500_python.egg-info/dependency_links.txt +0 -0
  85. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500_python.egg-info/not-zip-safe +0 -0
  86. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500_python.egg-info/requires.txt +0 -0
  87. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/src/nwp500_python.egg-info/top_level.txt +0 -0
  88. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/tests/conftest.py +0 -0
  89. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/tests/test_command_queue.py +0 -0
  90. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/tests/test_events.py +0 -0
  91. {nwp500_python-1.0.2 → nwp500_python-1.0.3}/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.3
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,46 @@ 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
+ # Monitor continuously (default - writes to CSV)
123
+ python -m nwp500.cli --monitor
124
+
125
+ # Monitor with custom output file
126
+ python -m nwp500.cli --monitor --output my_data.csv
127
+
128
+ **Available CLI Options:**
129
+
130
+ * ``--status``: Print current device status as JSON and exit
131
+ * ``--device-info``: Print comprehensive device information (firmware, model, capabilities) via MQTT as JSON and exit
132
+ * ``--device-feature``: Print device capabilities and feature settings via MQTT as JSON and exit
133
+ * ``--set-mode MODE``: Set operation mode and display response. Valid modes: heat-pump, energy-saver, high-demand, electric, vacation, standby
134
+ * ``--monitor``: Continuously monitor status every 30 seconds and log to CSV (default)
135
+ * ``-o, --output``: Specify CSV output filename for monitoring mode
136
+ * ``--email``: Override email (alternative to environment variable)
137
+ * ``--password``: Override password (alternative to environment variable)
138
+
99
139
  Device Status Fields
100
140
  ====================
101
141
 
@@ -182,12 +222,14 @@ Documentation
182
222
  Comprehensive documentation is available in the ``docs/`` directory:
183
223
 
184
224
  * `Device Status Fields`_ - Complete field reference with units and conversions
225
+ * `Device Feature Fields`_ - Device capabilities and firmware information reference
185
226
  * `MQTT Messages`_ - MQTT protocol documentation
186
227
  * `MQTT Client`_ - MQTT client usage guide
187
228
  * `Authentication`_ - Authentication module documentation
188
229
 
189
230
  .. _MQTT Protocol Documentation: docs/MQTT_MESSAGES.rst
190
231
  .. _Device Status Fields: docs/DEVICE_STATUS_FIELDS.rst
232
+ .. _Device Feature Fields: docs/DEVICE_FEATURE_FIELDS.rst
191
233
  .. _MQTT Messages: docs/MQTT_MESSAGES.rst
192
234
  .. _MQTT Client: docs/MQTT_CLIENT.rst
193
235
  .. _Authentication: docs/AUTHENTICATION.rst
@@ -198,6 +240,7 @@ Data Models
198
240
  The library includes type-safe data models with automatic unit conversions:
199
241
 
200
242
  * **DeviceStatus**: Complete device status with 70+ fields
243
+ * **DeviceFeature**: Device capabilities, firmware versions, and configuration limits
201
244
  * **OperationMode**: Enumeration of available operation modes
202
245
  * **TemperatureUnit**: Celsius/Fahrenheit handling
203
246
  * **MqttRequest/MqttCommand**: MQTT message structures
@@ -59,6 +59,46 @@ 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
+ # Monitor continuously (default - writes to CSV)
86
+ python -m nwp500.cli --monitor
87
+
88
+ # Monitor with custom output file
89
+ python -m nwp500.cli --monitor --output my_data.csv
90
+
91
+ **Available CLI Options:**
92
+
93
+ * ``--status``: Print current device status as JSON and exit
94
+ * ``--device-info``: Print comprehensive device information (firmware, model, capabilities) via MQTT as JSON and exit
95
+ * ``--device-feature``: Print device capabilities and feature settings via MQTT as JSON and exit
96
+ * ``--set-mode MODE``: Set operation mode and display response. Valid modes: heat-pump, energy-saver, high-demand, electric, vacation, standby
97
+ * ``--monitor``: Continuously monitor status every 30 seconds and log to CSV (default)
98
+ * ``-o, --output``: Specify CSV output filename for monitoring mode
99
+ * ``--email``: Override email (alternative to environment variable)
100
+ * ``--password``: Override password (alternative to environment variable)
101
+
62
102
  Device Status Fields
63
103
  ====================
64
104
 
@@ -145,12 +185,14 @@ Documentation
145
185
  Comprehensive documentation is available in the ``docs/`` directory:
146
186
 
147
187
  * `Device Status Fields`_ - Complete field reference with units and conversions
188
+ * `Device Feature Fields`_ - Device capabilities and firmware information reference
148
189
  * `MQTT Messages`_ - MQTT protocol documentation
149
190
  * `MQTT Client`_ - MQTT client usage guide
150
191
  * `Authentication`_ - Authentication module documentation
151
192
 
152
193
  .. _MQTT Protocol Documentation: docs/MQTT_MESSAGES.rst
153
194
  .. _Device Status Fields: docs/DEVICE_STATUS_FIELDS.rst
195
+ .. _Device Feature Fields: docs/DEVICE_FEATURE_FIELDS.rst
154
196
  .. _MQTT Messages: docs/MQTT_MESSAGES.rst
155
197
  .. _MQTT Client: docs/MQTT_CLIENT.rst
156
198
  .. _Authentication: docs/AUTHENTICATION.rst
@@ -161,6 +203,7 @@ Data Models
161
203
  The library includes type-safe data models with automatic unit conversions:
162
204
 
163
205
  * **DeviceStatus**: Complete device status with 70+ fields
206
+ * **DeviceFeature**: Device capabilities, firmware versions, and configuration limits
164
207
  * **OperationMode**: Enumeration of available operation modes
165
208
  * **TemperatureUnit**: Celsius/Fahrenheit handling
166
209
  * **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,113 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Example: Setting operation mode via MQTT and displaying response.
4
+
5
+ This demonstrates how to programmatically change the water heater operation mode
6
+ 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 mode change process
14
+ logging.basicConfig(level=logging.INFO)
15
+ logger = logging.getLogger(__name__)
16
+
17
+
18
+ async def set_mode_example():
19
+ """Example of setting operation mode 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(f"Current mode: {status.operationMode.name}")
51
+
52
+ await mqtt_client.subscribe_device_status(device, on_current_status)
53
+ await mqtt_client.request_device_status(device)
54
+ await asyncio.sleep(3) # Wait for current status
55
+
56
+ # Change to Energy Saver mode
57
+ logger.info("Changing to Energy Saver mode...")
58
+
59
+ # Set up callback to capture mode change response
60
+ mode_changed = False
61
+
62
+ def on_mode_change_response(status):
63
+ nonlocal mode_changed
64
+ logger.info("Mode change response received!")
65
+ logger.info(f"New mode: {status.operationMode.name}")
66
+ logger.info(f"DHW Temperature: {status.dhwTemperature}°F")
67
+ logger.info(f"Tank Charge: {status.dhwChargePer}%")
68
+ mode_changed = True
69
+
70
+ await mqtt_client.subscribe_device_status(device, on_mode_change_response)
71
+
72
+ # Send mode change command (3 = Energy Saver, per MQTT protocol)
73
+ await mqtt_client.set_dhw_mode(device, 3)
74
+
75
+ # Wait for confirmation
76
+ for i in range(15): # Wait up to 15 seconds
77
+ if mode_changed:
78
+ logger.info("Mode change confirmed!")
79
+ break
80
+ await asyncio.sleep(1)
81
+ else:
82
+ logger.warning("Timeout waiting for mode change confirmation")
83
+
84
+ finally:
85
+ await mqtt_client.disconnect()
86
+ logger.info("Disconnected from MQTT")
87
+
88
+
89
+ if __name__ == "__main__":
90
+ print("=== Operation Mode Change Example ===")
91
+ print("This example demonstrates:")
92
+ print("1. Connecting to device via MQTT")
93
+ print("2. Getting current operation mode")
94
+ print("3. Changing to Energy Saver mode")
95
+ print("4. Receiving and displaying the response")
96
+ print()
97
+
98
+ # Note: This requires valid credentials
99
+ print(
100
+ "Note: Update email/password or set NAVIEN_EMAIL/NAVIEN_PASSWORD environment variables"
101
+ )
102
+ print()
103
+
104
+ # Uncomment to run (requires valid credentials)
105
+ # asyncio.run(set_mode_example())
106
+
107
+ print("CLI equivalent commands:")
108
+ print(" python -m nwp500.cli --set-mode energy-saver")
109
+ print(" python -m nwp500.cli --set-mode heat-pump")
110
+ print(" python -m nwp500.cli --set-mode electric")
111
+ print(" python -m nwp500.cli --set-mode high-demand")
112
+ print(" python -m nwp500.cli --set-mode vacation")
113
+ print(" python -m nwp500.cli --set-mode standby")
@@ -49,6 +49,8 @@ dev =
49
49
  %(testing)s
50
50
 
51
51
  [options.entry_points]
52
+ console_scripts =
53
+ nwp-cli = nwp500.cli:run
52
54
 
53
55
  [tool:pytest]
54
56
  addopts =