nwp500-python 7.2.2__tar.gz → 7.2.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 (173) hide show
  1. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.readthedocs.yml +1 -1
  2. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/CHANGELOG.rst +51 -0
  3. {nwp500_python-7.2.2/src/nwp500_python.egg-info → nwp500_python-7.2.3}/PKG-INFO +30 -3
  4. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/README.rst +28 -1
  5. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/api/nwp500.rst +48 -39
  6. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/conf.py +14 -0
  7. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/enumerations.rst +18 -1
  8. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/mqtt_diagnostics.rst +2 -2
  9. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/mqtt_protocol.rst +2 -4
  10. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/cli.rst +51 -7
  11. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/device_control.rst +4 -4
  12. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/models.rst +0 -1
  13. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/auth.py +8 -2
  14. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/__main__.py +31 -6
  15. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/handlers.py +32 -12
  16. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/output_formatters.py +123 -0
  17. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/rich_output.py +94 -0
  18. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/field_factory.py +1 -0
  19. {nwp500_python-7.2.2 → nwp500_python-7.2.3/src/nwp500_python.egg-info}/PKG-INFO +30 -3
  20. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_cli_basic.py +4 -1
  21. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_cli_commands.py +9 -6
  22. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tox.ini +1 -0
  23. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.agent/workflows/pre-completion-testing.md +0 -0
  24. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.coveragerc +0 -0
  25. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.github/copilot-instructions.md +0 -0
  26. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.github/workflows/ci.yml +0 -0
  27. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.github/workflows/release.yml +0 -0
  28. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.gitignore +0 -0
  29. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/.pre-commit-config.yaml +0 -0
  30. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/AUTHORS.rst +0 -0
  31. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/CONTRIBUTING.rst +0 -0
  32. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/LICENSE.txt +0 -0
  33. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/Makefile +0 -0
  34. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/RELEASE.md +0 -0
  35. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/Makefile +0 -0
  36. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/_static/.gitignore +0 -0
  37. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/authors.rst +0 -0
  38. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/changelog.rst +0 -0
  39. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/configuration.rst +0 -0
  40. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/development/contributing.rst +0 -0
  41. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/development/history.rst +0 -0
  42. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/advanced_features_explained.rst +0 -0
  43. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/authentication.rst +0 -0
  44. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/auto_recovery.rst +0 -0
  45. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/command_queue.rst +0 -0
  46. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/energy_monitoring.rst +0 -0
  47. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/event_system.rst +0 -0
  48. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/reservations.rst +0 -0
  49. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/scheduling_features.rst +0 -0
  50. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/guides/time_of_use.rst +0 -0
  51. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/index.rst +0 -0
  52. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/installation.rst +0 -0
  53. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/license.rst +0 -0
  54. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/openapi.yaml +0 -0
  55. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/data_conversions.rst +0 -0
  56. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/device_features.rst +0 -0
  57. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/device_status.rst +0 -0
  58. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/error_codes.rst +0 -0
  59. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/quick_reference.rst +0 -0
  60. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/protocol/rest_api.rst +0 -0
  61. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/api_client.rst +0 -0
  62. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/auth_client.rst +0 -0
  63. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/events.rst +0 -0
  64. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/exceptions.rst +0 -0
  65. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/python_api/mqtt_client.rst +0 -0
  66. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/quickstart.rst +0 -0
  67. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/docs/requirements.txt +0 -0
  68. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/.ruff.toml +0 -0
  69. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/README.md +0 -0
  70. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/air_filter_reset.py +0 -0
  71. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/anti_legionella.py +0 -0
  72. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/auto_recovery.py +0 -0
  73. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/combined_callbacks.py +0 -0
  74. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/demand_response.py +0 -0
  75. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/device_capabilities.py +0 -0
  76. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/device_status_debug.py +0 -0
  77. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/energy_analytics.py +0 -0
  78. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/error_code_demo.py +0 -0
  79. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/mqtt_diagnostics.py +0 -0
  80. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/power_control.py +0 -0
  81. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/recirculation_control.py +0 -0
  82. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/reconnection_demo.py +0 -0
  83. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/reservation_schedule.py +0 -0
  84. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/simple_auto_recovery.py +0 -0
  85. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/token_restoration.py +0 -0
  86. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/tou_openei.py +0 -0
  87. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/tou_schedule.py +0 -0
  88. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/advanced/water_reservation.py +0 -0
  89. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/beginner/01_authentication.py +0 -0
  90. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/beginner/02_list_devices.py +0 -0
  91. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/beginner/03_get_status.py +0 -0
  92. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/beginner/04_set_temperature.py +0 -0
  93. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/advanced_auth_patterns.py +0 -0
  94. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/command_queue.py +0 -0
  95. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/device_status_callback.py +0 -0
  96. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/error_handling.py +0 -0
  97. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/event_driven_control.py +0 -0
  98. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/improved_auth.py +0 -0
  99. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/legacy_auth_constructor.py +0 -0
  100. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/mqtt_realtime_monitoring.py +0 -0
  101. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/periodic_requests.py +0 -0
  102. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/set_mode.py +0 -0
  103. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/intermediate/vacation_mode.py +0 -0
  104. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/mask.py +0 -0
  105. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/testing/periodic_device_info.py +0 -0
  106. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/testing/simple_periodic_info.py +0 -0
  107. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/testing/test_api_client.py +0 -0
  108. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/testing/test_mqtt_connection.py +0 -0
  109. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/testing/test_mqtt_messaging.py +0 -0
  110. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/examples/testing/test_periodic_minimal.py +0 -0
  111. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/pyproject.toml +0 -0
  112. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/README.md +0 -0
  113. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/bump_version.py +0 -0
  114. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/diagnose_mqtt_connection.py +0 -0
  115. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/extract_changelog.py +0 -0
  116. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/format.py +0 -0
  117. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/lint.py +0 -0
  118. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/setup-dev.py +0 -0
  119. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/scripts/validate_version.py +0 -0
  120. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/setup.cfg +1 -1
  121. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/setup.py +0 -0
  122. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/__init__.py +0 -0
  123. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/api_client.py +0 -0
  124. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/__init__.py +0 -0
  125. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/commands.py +0 -0
  126. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/monitoring.py +0 -0
  127. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/cli/token_storage.py +0 -0
  128. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/command_decorators.py +0 -0
  129. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/config.py +0 -0
  130. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/converters.py +0 -0
  131. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/device_capabilities.py +0 -0
  132. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/device_info_cache.py +0 -0
  133. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/encoding.py +0 -0
  134. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/enums.py +0 -0
  135. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/events.py +0 -0
  136. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/exceptions.py +0 -0
  137. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/factory.py +0 -0
  138. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/models.py +0 -0
  139. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/__init__.py +0 -0
  140. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/client.py +0 -0
  141. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/command_queue.py +0 -0
  142. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/connection.py +0 -0
  143. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/control.py +0 -0
  144. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/diagnostics.py +0 -0
  145. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/periodic.py +0 -0
  146. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/reconnection.py +0 -0
  147. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/subscriptions.py +0 -0
  148. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt/utils.py +0 -0
  149. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/mqtt_events.py +0 -0
  150. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/py.typed +0 -0
  151. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/temperature.py +0 -0
  152. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/topic_builder.py +0 -0
  153. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500/utils.py +0 -0
  154. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500_python.egg-info/SOURCES.txt +0 -0
  155. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500_python.egg-info/dependency_links.txt +0 -0
  156. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500_python.egg-info/entry_points.txt +0 -0
  157. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500_python.egg-info/not-zip-safe +0 -0
  158. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500_python.egg-info/requires.txt +1 -1
  159. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/src/nwp500_python.egg-info/top_level.txt +0 -0
  160. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/conftest.py +0 -0
  161. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_api_helpers.py +0 -0
  162. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_auth.py +0 -0
  163. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_command_decorators.py +0 -0
  164. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_command_queue.py +0 -0
  165. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_device_capabilities.py +0 -0
  166. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_device_info_cache.py +0 -0
  167. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_events.py +0 -0
  168. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_exceptions.py +0 -0
  169. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_model_converters.py +0 -0
  170. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_models.py +0 -0
  171. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_mqtt_client_init.py +0 -0
  172. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_temperature_converters.py +0 -0
  173. {nwp500_python-7.2.2 → nwp500_python-7.2.3}/tests/test_utils.py +0 -0
@@ -19,7 +19,7 @@ formats:
19
19
  build:
20
20
  os: ubuntu-22.04
21
21
  tools:
22
- python: "3.11"
22
+ python: "3.13"
23
23
 
24
24
  python:
25
25
  install:
@@ -2,6 +2,57 @@
2
2
  Changelog
3
3
  =========
4
4
 
5
+ Version 7.2.3 (2026-01-15)
6
+ ==========================
7
+
8
+ Added
9
+ -----
10
+ - **Daily Energy Breakdown by Month**: New ``--month`` option for energy command to show daily energy data for a specific month
11
+
12
+ .. code-block:: bash
13
+
14
+ # Daily breakdown for a single month
15
+ nwp-cli energy --year 2025 --month 12
16
+
17
+ # Monthly summary for multiple months (existing)
18
+ nwp-cli energy --year 2025 --months 10,11,12
19
+
20
+ - Displays daily energy consumption, efficiency, and heat source breakdown
21
+ - Rich formatted output with progress bars and color-coded efficiency percentages
22
+ - Plain text fallback for non-Rich environments
23
+ - Smart routing: single month shows daily data, multiple months show summary
24
+
25
+ Fixed
26
+ -----
27
+ - **Documentation**: Fixed all warnings and broken cross-references in documentation
28
+
29
+ - Fixed docstring formatting in field_factory.py module
30
+ - Fixed broken cross-reference links in enumerations.rst, mqtt_diagnostics.rst, cli.rst, and models.rst
31
+ - Fixed invalid JSON syntax in code examples (removed invalid [...] and ... tokens)
32
+ - Suppressed duplicate object description warnings from re-exported classes
33
+
34
+ - **CLI Documentation**: Updated documentation for all 19 CLI commands
35
+
36
+ - Added missing device-info command documentation
37
+ - Added --raw flag documentation for status, info, and device-info commands
38
+ - Added --month option documentation to energy command
39
+ - Clarified mutually exclusive options (--months vs --month)
40
+
41
+ - **RST Title Hierarchy**: Fixed title level inconsistencies in device_control.rst
42
+
43
+ - **Read the Docs Configuration**: Updated Python version requirement to 3.13 in Read the Docs config
44
+
45
+ - **CI Test Failures**: Fixed ``ModuleNotFoundError`` when running tests without CLI dependencies installed
46
+
47
+ - Wrapped CLI module imports in try-except blocks in test modules
48
+ - Tests are skipped gracefully when optional dependencies (click, rich) are not installed
49
+ - Allows pytest to run without CLI extra, while supporting full test suite with tox
50
+ - Network errors in authentication are now marked as retriable for better resilience
51
+
52
+ Changed
53
+ -------
54
+ - **Installation Documentation**: Updated installation instructions to clarify optional CLI and Rich dependencies
55
+
5
56
  Version 7.2.2 (2025-12-25)
6
57
  ==========================
7
58
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nwp500-python
3
- Version: 7.2.2
3
+ Version: 7.2.3
4
4
  Summary: A library for controlling Navien NWP500 Water Heaters via NaviLink
5
5
  Home-page: https://github.com/eman/nwp500-python
6
6
  Author: Emmanuel Levijarvi
@@ -21,8 +21,8 @@ License-File: LICENSE.txt
21
21
  Requires-Dist: aiohttp>=3.8.0
22
22
  Requires-Dist: awsiotsdk>=1.27.0
23
23
  Requires-Dist: pydantic>=2.0.0
24
- Requires-Dist: click>=8.0.0
25
24
  Provides-Extra: cli
25
+ Requires-Dist: click>=8.0.0; extra == "cli"
26
26
  Requires-Dist: rich>=13.0.0; extra == "cli"
27
27
  Provides-Extra: testing
28
28
  Requires-Dist: setuptools; extra == "testing"
@@ -69,10 +69,28 @@ Quick Start
69
69
  Installation
70
70
  ------------
71
71
 
72
+ Basic Installation (Library Only)
73
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74
+
75
+ For using the library as a Python package without the CLI:
76
+
72
77
  .. code-block:: bash
73
78
 
74
79
  pip install nwp500-python
75
80
 
81
+ This installs the core library with support for API and MQTT clients. No CLI framework is required.
82
+
83
+ Installation with CLI Support
84
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
85
+
86
+ To use the command-line interface with rich formatting and colors:
87
+
88
+ .. code-block:: bash
89
+
90
+ pip install nwp500-python[cli]
91
+
92
+ This includes both the ``click`` CLI framework and the ``rich`` formatting library for enhanced terminal output with formatted tables, progress bars, and colored output.
93
+
76
94
  Basic Usage
77
95
  -----------
78
96
 
@@ -133,7 +151,16 @@ Monitor your device in real-time using MQTT:
133
151
  Command Line Interface
134
152
  ======================
135
153
 
136
- The library includes a command line interface for monitoring and controlling your Navien water heater:
154
+ The library includes a command line interface for monitoring and controlling your Navien water heater.
155
+
156
+ **Installation Requirement:** The CLI requires the ``cli`` extra:
157
+
158
+ .. code-block:: bash
159
+
160
+ pip install nwp500-python[cli]
161
+
162
+ Quick Reference
163
+ ---------------
137
164
 
138
165
  .. code-block:: bash
139
166
 
@@ -29,10 +29,28 @@ Quick Start
29
29
  Installation
30
30
  ------------
31
31
 
32
+ Basic Installation (Library Only)
33
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
34
+
35
+ For using the library as a Python package without the CLI:
36
+
32
37
  .. code-block:: bash
33
38
 
34
39
  pip install nwp500-python
35
40
 
41
+ This installs the core library with support for API and MQTT clients. No CLI framework is required.
42
+
43
+ Installation with CLI Support
44
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
45
+
46
+ To use the command-line interface with rich formatting and colors:
47
+
48
+ .. code-block:: bash
49
+
50
+ pip install nwp500-python[cli]
51
+
52
+ This includes both the ``click`` CLI framework and the ``rich`` formatting library for enhanced terminal output with formatted tables, progress bars, and colored output.
53
+
36
54
  Basic Usage
37
55
  -----------
38
56
 
@@ -93,7 +111,16 @@ Monitor your device in real-time using MQTT:
93
111
  Command Line Interface
94
112
  ======================
95
113
 
96
- The library includes a command line interface for monitoring and controlling your Navien water heater:
114
+ The library includes a command line interface for monitoring and controlling your Navien water heater.
115
+
116
+ **Installation Requirement:** The CLI requires the ``cli`` extra:
117
+
118
+ .. code-block:: bash
119
+
120
+ pip install nwp500-python[cli]
121
+
122
+ Quick Reference
123
+ ---------------
97
124
 
98
125
  .. code-block:: bash
99
126
 
@@ -8,6 +8,7 @@ Subpackages
8
8
  :maxdepth: 4
9
9
 
10
10
  nwp500.cli
11
+ nwp500.mqtt
11
12
 
12
13
  Submodules
13
14
  ----------
@@ -28,6 +29,14 @@ nwp500.auth module
28
29
  :show-inheritance:
29
30
  :undoc-members:
30
31
 
32
+ nwp500.command\_decorators module
33
+ ---------------------------------
34
+
35
+ .. automodule:: nwp500.command_decorators
36
+ :members:
37
+ :show-inheritance:
38
+ :undoc-members:
39
+
31
40
  nwp500.config module
32
41
  --------------------
33
42
 
@@ -36,106 +45,106 @@ nwp500.config module
36
45
  :show-inheritance:
37
46
  :undoc-members:
38
47
 
39
- nwp500.constants module
40
- -----------------------
48
+ nwp500.converters module
49
+ ------------------------
41
50
 
42
- .. automodule:: nwp500.constants
51
+ .. automodule:: nwp500.converters
43
52
  :members:
44
53
  :show-inheritance:
45
54
  :undoc-members:
46
55
 
47
- nwp500.encoding module
48
- ----------------------
56
+ nwp500.device\_capabilities module
57
+ ----------------------------------
49
58
 
50
- .. automodule:: nwp500.encoding
59
+ .. automodule:: nwp500.device_capabilities
51
60
  :members:
52
61
  :show-inheritance:
53
62
  :undoc-members:
54
63
 
55
- nwp500.events module
56
- --------------------
64
+ nwp500.device\_info\_cache module
65
+ ---------------------------------
57
66
 
58
- .. automodule:: nwp500.events
67
+ .. automodule:: nwp500.device_info_cache
59
68
  :members:
60
69
  :show-inheritance:
61
70
  :undoc-members:
62
71
 
63
- nwp500.exceptions module
64
- ------------------------
72
+ nwp500.encoding module
73
+ ----------------------
65
74
 
66
- .. automodule:: nwp500.exceptions
75
+ .. automodule:: nwp500.encoding
67
76
  :members:
68
77
  :show-inheritance:
69
78
  :undoc-members:
70
79
 
71
- nwp500.models module
72
- --------------------
80
+ nwp500.enums module
81
+ -------------------
73
82
 
74
- .. automodule:: nwp500.models
83
+ .. automodule:: nwp500.enums
75
84
  :members:
76
85
  :show-inheritance:
77
86
  :undoc-members:
78
87
 
79
- nwp500.mqtt\_client module
80
- --------------------------
88
+ nwp500.events module
89
+ --------------------
81
90
 
82
- .. automodule:: nwp500.mqtt_client
91
+ .. automodule:: nwp500.events
83
92
  :members:
84
93
  :show-inheritance:
85
94
  :undoc-members:
86
95
 
87
- nwp500.mqtt\_command\_queue module
88
- ----------------------------------
96
+ nwp500.exceptions module
97
+ ------------------------
89
98
 
90
- .. automodule:: nwp500.mqtt_command_queue
99
+ .. automodule:: nwp500.exceptions
91
100
  :members:
92
101
  :show-inheritance:
93
102
  :undoc-members:
94
103
 
95
- nwp500.mqtt\_connection module
96
- ------------------------------
104
+ nwp500.factory module
105
+ ---------------------
97
106
 
98
- .. automodule:: nwp500.mqtt_connection
107
+ .. automodule:: nwp500.factory
99
108
  :members:
100
109
  :show-inheritance:
101
110
  :undoc-members:
102
111
 
103
- nwp500.mqtt\_device\_control module
104
- -----------------------------------
112
+ nwp500.field\_factory module
113
+ ----------------------------
105
114
 
106
- .. automodule:: nwp500.mqtt_device_control
115
+ .. automodule:: nwp500.field_factory
107
116
  :members:
108
117
  :show-inheritance:
109
118
  :undoc-members:
110
119
 
111
- nwp500.mqtt\_periodic module
112
- ----------------------------
120
+ nwp500.models module
121
+ --------------------
113
122
 
114
- .. automodule:: nwp500.mqtt_periodic
123
+ .. automodule:: nwp500.models
115
124
  :members:
116
125
  :show-inheritance:
117
126
  :undoc-members:
118
127
 
119
- nwp500.mqtt\_reconnection module
120
- --------------------------------
128
+ nwp500.mqtt\_events module
129
+ --------------------------
121
130
 
122
- .. automodule:: nwp500.mqtt_reconnection
131
+ .. automodule:: nwp500.mqtt_events
123
132
  :members:
124
133
  :show-inheritance:
125
134
  :undoc-members:
126
135
 
127
- nwp500.mqtt\_subscriptions module
128
- ---------------------------------
136
+ nwp500.temperature module
137
+ -------------------------
129
138
 
130
- .. automodule:: nwp500.mqtt_subscriptions
139
+ .. automodule:: nwp500.temperature
131
140
  :members:
132
141
  :show-inheritance:
133
142
  :undoc-members:
134
143
 
135
- nwp500.mqtt\_utils module
136
- -------------------------
144
+ nwp500.topic\_builder module
145
+ ----------------------------
137
146
 
138
- .. automodule:: nwp500.mqtt_utils
147
+ .. automodule:: nwp500.topic_builder
139
148
  :members:
140
149
  :show-inheritance:
141
150
  :undoc-members:
@@ -78,6 +78,7 @@ extensions = [
78
78
  # Suppress warnings for classes/functions exported in multiple modules
79
79
  suppress_warnings = [
80
80
  "ref.python", # Suppress "more than one target found" warnings
81
+ "py.duplicate", # Suppress all "duplicate" warnings including duplicate_description
81
82
  ]
82
83
 
83
84
  # Add any paths that contain templates here, relative to this directory.
@@ -289,4 +290,17 @@ intersphinx_mapping = {
289
290
  "pyscaffold": ("https://pyscaffold.org/en/stable", None),
290
291
  }
291
292
 
293
+ # Suppress duplicate object description warnings from re-exported classes
294
+ import logging
295
+
296
+ class DuplicateWarningFilter(logging.Filter):
297
+ def filter(self, record):
298
+ # Suppress "duplicate object description" warnings
299
+ return "duplicate object description" not in record.getMessage()
300
+
301
+ # Install the filter when Sphinx initializes
302
+ def setup(app):
303
+ logger = logging.getLogger("sphinx")
304
+ logger.addFilter(DuplicateWarningFilter())
305
+
292
306
  print(f"loading configurations for {project} {version} ...", file=sys.stderr)
@@ -10,6 +10,7 @@ Device Control Commands
10
10
  .. autoclass:: nwp500.enums.CommandCode
11
11
  :members:
12
12
  :undoc-members:
13
+ :no-index:
13
14
 
14
15
  These command IDs are used in MQTT control messages to change device settings
15
16
  and trigger actions. The most commonly used commands include:
@@ -37,6 +38,7 @@ OnOffFlag
37
38
  .. autoclass:: nwp500.enums.OnOffFlag
38
39
  :members:
39
40
  :undoc-members:
41
+ :no-index:
40
42
 
41
43
  Generic on/off flag used throughout status fields for power status, TOU status,
42
44
  recirculation status, vacation mode, anti-legionella, and other boolean settings.
@@ -49,6 +51,7 @@ Operation
49
51
  .. autoclass:: nwp500.enums.Operation
50
52
  :members:
51
53
  :undoc-members:
54
+ :no-index:
52
55
 
53
56
  Device operation state indicating overall device activity.
54
57
 
@@ -58,6 +61,7 @@ DhwOperationSetting
58
61
  .. autoclass:: nwp500.enums.DhwOperationSetting
59
62
  :members:
60
63
  :undoc-members:
64
+ :no-index:
61
65
 
62
66
  User-configured DHW heating mode preference. This determines which heat source(s)
63
67
  the device will use when heating is needed:
@@ -83,6 +87,7 @@ CurrentOperationMode
83
87
  .. autoclass:: nwp500.enums.CurrentOperationMode
84
88
  :members:
85
89
  :undoc-members:
90
+ :no-index:
86
91
 
87
92
  Real-time operational state (read-only). This reflects what the device is actually
88
93
  doing right now, which may differ from the configured mode setting:
@@ -106,6 +111,7 @@ HeatSource
106
111
  .. autoclass:: nwp500.enums.HeatSource
107
112
  :members:
108
113
  :undoc-members:
114
+ :no-index:
109
115
 
110
116
  Currently active heat source (read-only status). This reflects what the device
111
117
  is *currently* using, not what mode it's set to. In Hybrid mode, this field
@@ -117,6 +123,7 @@ DREvent
117
123
  .. autoclass:: nwp500.enums.DREvent
118
124
  :members:
119
125
  :undoc-members:
126
+ :no-index:
120
127
 
121
128
  Demand Response event status. Allows utilities to manage grid load by signaling
122
129
  water heaters to reduce consumption (shed) or pre-heat (load up) before peak periods.
@@ -127,6 +134,7 @@ WaterLevel
127
134
  .. autoclass:: nwp500.enums.WaterLevel
128
135
  :members:
129
136
  :undoc-members:
137
+ :no-index:
130
138
 
131
139
  Hot water level indicator displayed as gauge in app. IDs are non-sequential,
132
140
  likely represent bit positions for multi-level displays.
@@ -137,6 +145,7 @@ FilterChange
137
145
  .. autoclass:: nwp500.enums.FilterChange
138
146
  :members:
139
147
  :undoc-members:
148
+ :no-index:
140
149
 
141
150
  Air filter status for heat pump models. Indicates when air filter maintenance
142
151
  is needed.
@@ -147,6 +156,7 @@ RecirculationMode
147
156
  .. autoclass:: nwp500.enums.RecirculationMode
148
157
  :members:
149
158
  :undoc-members:
159
+ :no-index:
150
160
 
151
161
  Recirculation pump operation mode:
152
162
 
@@ -164,6 +174,7 @@ TouWeekType
164
174
  .. autoclass:: nwp500.enums.TouWeekType
165
175
  :members:
166
176
  :undoc-members:
177
+ :no-index:
167
178
 
168
179
  Day grouping for TOU schedules. Allows separate schedules for weekdays and
169
180
  weekends to account for different electricity rates and usage patterns.
@@ -174,6 +185,7 @@ TouRateType
174
185
  .. autoclass:: nwp500.enums.TouRateType
175
186
  :members:
176
187
  :undoc-members:
188
+ :no-index:
177
189
 
178
190
  Electricity rate period type. Device behavior can be configured for each period:
179
191
 
@@ -190,6 +202,7 @@ TemperatureType
190
202
  .. autoclass:: nwp500.enums.TemperatureType
191
203
  :members:
192
204
  :undoc-members:
205
+ :no-index:
193
206
 
194
207
  Temperature display unit preference (Celsius or Fahrenheit).
195
208
 
@@ -201,6 +214,7 @@ TempFormulaType
201
214
  .. autoclass:: nwp500.enums.TempFormulaType
202
215
  :members:
203
216
  :undoc-members:
217
+ :no-index:
204
218
 
205
219
  Temperature conversion formula type. Different device models use slightly different
206
220
  rounding algorithms when converting internal Celsius values to Fahrenheit:
@@ -219,6 +233,7 @@ UnitType
219
233
  .. autoclass:: nwp500.enums.UnitType
220
234
  :members:
221
235
  :undoc-members:
236
+ :no-index:
222
237
 
223
238
  Navien device/unit model types. Common values:
224
239
 
@@ -236,6 +251,7 @@ DeviceType
236
251
  .. autoclass:: nwp500.enums.DeviceType
237
252
  :members:
238
253
  :undoc-members:
254
+ :no-index:
239
255
 
240
256
  Communication device type (WiFi module model).
241
257
 
@@ -245,6 +261,7 @@ FirmwareType
245
261
  .. autoclass:: nwp500.enums.FirmwareType
246
262
  :members:
247
263
  :undoc-members:
264
+ :no-index:
248
265
 
249
266
  Firmware component types. Devices may have multiple firmware components that
250
267
  can be updated independently.
@@ -290,4 +307,4 @@ For detailed protocol documentation, see:
290
307
 
291
308
  - :doc:`protocol/device_status` - Status field definitions
292
309
  - :doc:`guides/time_of_use` - TOU scheduling and rate types
293
- - :doc:`protocol/control_commands` - Control command usage
310
+ - :doc:`protocol/quick_reference` - Quick reference and control commands
@@ -1116,8 +1116,8 @@ Investigation Checklist
1116
1116
  See Also
1117
1117
  ========
1118
1118
 
1119
- - :doc:`/docs/DEVICE_STATUS_FIELDS` - Device status field reference
1120
- - :doc:`/docs/MQTT_CLIENT` - MQTT client API documentation
1119
+ - :doc:`../protocol/device_status` - Device status field reference
1120
+ - :doc:`../python_api/mqtt_client` - MQTT client API documentation
1121
1121
 
1122
1122
  External Resources
1123
1123
 
@@ -770,8 +770,7 @@ Status Response
770
770
  "operationBusy": 2,
771
771
  "compUse": 2,
772
772
  "heatUpperUse": 1,
773
- "errorCode": 0,
774
- ...
773
+ "errorCode": 0
775
774
  }
776
775
  }
777
776
  }
@@ -796,8 +795,7 @@ Feature/Info Response
796
795
  "controller_sw_version": 184614912,
797
796
  "dhw_temperature_min": 75,
798
797
  "dhw_temperature_max": 130,
799
- "energy_usage_use": 1,
800
- ...
798
+ "energy_usage_use": 1
801
799
  }
802
800
  }
803
801
  }
@@ -94,6 +94,13 @@ Get current device status (one-time query).
94
94
  .. code-block:: bash
95
95
 
96
96
  python3 -m nwp500.cli status
97
+ python3 -m nwp500.cli status --raw
98
+
99
+ **Options:**
100
+
101
+ .. option:: --raw
102
+
103
+ Output raw JSON response (unformatted).
97
104
 
98
105
  **Output:** Device status including water temperature, target temperature, mode,
99
106
  power consumption, tank charge percentage, and component states.
@@ -122,10 +129,38 @@ Show comprehensive device information (firmware, model, capabilities, serial).
122
129
  .. code-block:: bash
123
130
 
124
131
  python3 -m nwp500.cli info
132
+ python3 -m nwp500.cli info --raw
133
+
134
+ **Options:**
135
+
136
+ .. option:: --raw
137
+
138
+ Output raw JSON response (unformatted).
125
139
 
126
140
  **Output:** Device name, MAC address, firmware versions, features supported,
127
141
  temperature ranges, and capabilities.
128
142
 
143
+ device-info
144
+ ^^^^^^^^^^^
145
+
146
+ Show basic device information from REST API (DeviceInfo model).
147
+
148
+ .. code-block:: bash
149
+
150
+ python3 -m nwp500.cli device-info
151
+ python3 -m nwp500.cli device-info --raw
152
+
153
+ **Options:**
154
+
155
+ .. option:: --raw
156
+
157
+ Output raw JSON response (unformatted).
158
+
159
+ **Output:** Basic device information from REST API.
160
+
161
+ **Note:** Use ``info`` command for MQTT-based comprehensive information, or
162
+ ``device-info`` for REST API-based basic information.
163
+
129
164
  serial
130
165
  ^^^^^^
131
166
 
@@ -386,24 +421,27 @@ Energy & Utility Commands
386
421
  energy
387
422
  ^^^^^^
388
423
 
389
- Query historical energy usage data by month.
424
+ Query historical energy usage data by month or daily breakdown.
390
425
 
391
426
  .. code-block:: bash
392
427
 
393
- # Get October 2024
428
+ # Get monthly summary for October 2024
394
429
  python3 -m nwp500.cli energy --year 2024 --months 10
395
430
 
396
431
  # Get multiple months
397
432
  python3 -m nwp500.cli energy --year 2024 --months 8,9,10
398
433
 
399
- # Get full year
434
+ # Get daily breakdown for October 2024
435
+ python3 -m nwp500.cli energy --year 2024 --month 10
436
+
437
+ # Get full year summary
400
438
  python3 -m nwp500.cli energy --year 2024 --months 1,2,3,4,5,6,7,8,9,10,11,12
401
439
 
402
440
  **Syntax:**
403
441
 
404
442
  .. code-block:: bash
405
443
 
406
- python3 -m nwp500.cli energy --year <year> --months <month-list>
444
+ python3 -m nwp500.cli energy --year <year> [--months <month-list> | --month <month>]
407
445
 
408
446
  **Options:**
409
447
 
@@ -413,7 +451,13 @@ Query historical energy usage data by month.
413
451
 
414
452
  .. option:: --months MONTHS
415
453
 
416
- Comma-separated list of months (1-12). **Required.**
454
+ Comma-separated list of months (1-12) for monthly summary. Use either
455
+ ``--months`` OR ``--month``, not both.
456
+
457
+ .. option:: --month MONTH
458
+
459
+ Show daily breakdown for a specific month (1-12). Use either ``--month``
460
+ OR ``--months``, not both.
417
461
 
418
462
  **Output:** Energy usage breakdown by heat pump vs. electric heating.
419
463
 
@@ -427,7 +471,7 @@ Query historical energy usage data by month.
427
471
  "heat_pump_hours": 245,
428
472
  "electric_wh": 302469,
429
473
  "electric_hours": 67,
430
- "by_day": [...]
474
+ "by_day": []
431
475
  }
432
476
 
433
477
  tou
@@ -717,4 +761,4 @@ Related Documentation
717
761
  * :doc:`auth_client` - Python authentication API
718
762
  * :doc:`api_client` - Python REST API
719
763
  * :doc:`mqtt_client` - Python MQTT API
720
- * :doc:`../guides/mqtt_basics` - MQTT protocol guide
764
+ * :doc:`../guides/auto_recovery` - Connection recovery and resilience
@@ -744,7 +744,7 @@ device capabilities without requiring individual checker functions.
744
744
  ^^^^^^^^^^^^^
745
745
 
746
746
  supports()
747
- """"""""""
747
+ ----------
748
748
 
749
749
  .. py:staticmethod:: supports(feature, device_features)
750
750
 
@@ -780,7 +780,7 @@ supports()
780
780
  print("Device doesn't support recirculation pump")
781
781
 
782
782
  assert_supported()
783
- """"""""""""""""""
783
+ ------------------
784
784
 
785
785
  .. py:staticmethod:: assert_supported(feature, device_features)
786
786
 
@@ -807,7 +807,7 @@ assert_supported()
807
807
  print(f"Cannot set recirculation: {e}")
808
808
 
809
809
  get_available_controls()
810
- """"""""""""""""""""""""
810
+ ------------------------
811
811
 
812
812
  .. py:staticmethod:: get_available_controls(device_features)
813
813
 
@@ -830,7 +830,7 @@ get_available_controls()
830
830
  print(f"{status} {feature}")
831
831
 
832
832
  register_capability()
833
- """""""""""""""""""""
833
+ ---------------------
834
834
 
835
835
  .. py:staticmethod:: register_capability(name, check_fn)
836
836
 
@@ -608,4 +608,3 @@ Related Documentation
608
608
  * :doc:`auth_client` - Authentication
609
609
  * :doc:`api_client` - REST API
610
610
  * :doc:`mqtt_client` - MQTT client
611
- * :doc:`constants` - Command codes and constants