nwp500-python 1.1.3__tar.gz → 1.1.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.
- {nwp500_python-1.1.3/src/nwp500_python.egg-info → nwp500_python-1.1.4}/PKG-INFO +1 -1
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/DEVICE_STATUS_FIELDS.rst +1 -1
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/ENERGY_MONITORING.rst +39 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/MQTT_CLIENT.rst +214 -4
- {nwp500_python-1.1.3 → nwp500_python-1.1.4/src/nwp500_python.egg-info}/PKG-INFO +1 -1
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.coveragerc +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.github/copilot-instructions.md +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.github/workflows/ci.yml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.github/workflows/release.yml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.gitignore +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.pre-commit-config.yaml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/.readthedocs.yml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/AUTHORS.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/CHANGELOG.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/CONTRIBUTING.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/LICENSE.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/Makefile +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/README.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/RELEASE.md +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/API_CLIENT.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/API_REFERENCE.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/AUTHENTICATION.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/COMMAND_QUEUE.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/DEVELOPMENT.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/DEVICE_FEATURE_FIELDS.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/ERROR_CODES.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/EVENT_EMITTER.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/MQTT_MESSAGES.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/Makefile +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/_static/.gitignore +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/authors.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/changelog.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/conf.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/contributing.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/index.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/license.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/openapi.yaml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/readme.rst +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/docs/requirements.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/.ruff.toml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/README.md +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/api_client_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/auth_constructor_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/authenticate.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/combined_callbacks.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/command_queue_demo.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/device_feature_callback.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/device_status_callback.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/device_status_callback_debug.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/energy_usage_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/event_emitter_demo.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/improved_auth_pattern.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/mask.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/mqtt_client_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/periodic_device_info.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/periodic_requests.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/power_control_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/reconnection_demo.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/set_dhw_temperature_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/set_mode_example.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/simple_periodic_info.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/simple_periodic_status.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/test_api_client.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/test_mqtt_connection.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/test_mqtt_messaging.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/examples/test_periodic_minimal.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/pyproject.toml +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/scripts/format.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/scripts/lint.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/scripts/setup-dev.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/setup.cfg +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/setup.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/__init__.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/api_client.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/auth.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/cli.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/config.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/constants.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/events.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/models.py +1 -1
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500/mqtt_client.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500_python.egg-info/SOURCES.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500_python.egg-info/dependency_links.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500_python.egg-info/entry_points.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500_python.egg-info/not-zip-safe +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500_python.egg-info/requires.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/src/nwp500_python.egg-info/top_level.txt +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/tests/conftest.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/tests/test_command_queue.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/tests/test_events.py +0 -0
- {nwp500_python-1.1.3 → nwp500_python-1.1.4}/tox.ini +0 -0
|
@@ -147,7 +147,7 @@ This document lists the fields found in the ``status`` object of device status m
|
|
|
147
147
|
- integer
|
|
148
148
|
- °F
|
|
149
149
|
- Target superheat value - the desired temperature difference ensuring complete refrigerant vaporization.
|
|
150
|
-
- ``raw / 10
|
|
150
|
+
- ``(raw / 10) * 9/5 + 32`` (decicelsius to Fahrenheit)
|
|
151
151
|
* - ``compUse``
|
|
152
152
|
- bool
|
|
153
153
|
- None
|
|
@@ -79,6 +79,45 @@ Total upper electric heater runtime in minutes -
|
|
|
79
79
|
``heater2RunningMinuteTotal`` (int): Total lower electric heater runtime
|
|
80
80
|
in minutes
|
|
81
81
|
|
|
82
|
+
Historical Energy Usage
|
|
83
|
+
-----------------------
|
|
84
|
+
|
|
85
|
+
Request detailed daily energy usage data for specific months:
|
|
86
|
+
|
|
87
|
+
.. code:: python
|
|
88
|
+
|
|
89
|
+
from nwp500 import NavienMqttClient, EnergyUsageResponse
|
|
90
|
+
|
|
91
|
+
def on_energy_usage(energy: EnergyUsageResponse):
|
|
92
|
+
print(f"Total Usage: {energy.total.total_usage} Wh")
|
|
93
|
+
print(f"Heat Pump: {energy.total.heat_pump_percentage:.1f}%")
|
|
94
|
+
print(f"Electric: {energy.total.heat_element_percentage:.1f}%")
|
|
95
|
+
|
|
96
|
+
# Daily breakdown
|
|
97
|
+
for day in energy.daily:
|
|
98
|
+
print(f"Day {day.day}: {day.total_usage} Wh")
|
|
99
|
+
|
|
100
|
+
# Subscribe to energy usage responses
|
|
101
|
+
await mqtt_client.subscribe_energy_usage(device, on_energy_usage)
|
|
102
|
+
|
|
103
|
+
# Request energy usage for September 2025
|
|
104
|
+
await mqtt_client.request_energy_usage(device, year=2025, months=[9])
|
|
105
|
+
|
|
106
|
+
# Request multiple months
|
|
107
|
+
await mqtt_client.request_energy_usage(device, year=2025, months=[7, 8, 9])
|
|
108
|
+
|
|
109
|
+
**Key Methods:**
|
|
110
|
+
|
|
111
|
+
- ``request_energy_usage(device, year, months)``: Request historical data
|
|
112
|
+
- ``subscribe_energy_usage(device, callback)``: Subscribe to energy usage responses
|
|
113
|
+
|
|
114
|
+
**Response Fields:**
|
|
115
|
+
|
|
116
|
+
- ``total.total_usage`` (int): Total energy consumption in Wh
|
|
117
|
+
- ``total.heat_pump_percentage`` (float): Percentage from heat pump
|
|
118
|
+
- ``total.heat_element_percentage`` (float): Percentage from electric heaters
|
|
119
|
+
- ``daily`` (list): Daily breakdown of usage per day
|
|
120
|
+
|
|
82
121
|
Energy Capacity
|
|
83
122
|
---------------
|
|
84
123
|
|
|
@@ -396,6 +396,41 @@ Publish a message to an MQTT topic.
|
|
|
396
396
|
Device Command Methods
|
|
397
397
|
^^^^^^^^^^^^^^^^^^^^^^
|
|
398
398
|
|
|
399
|
+
Complete MQTT API Reference
|
|
400
|
+
''''''''''''''''''''''''''''
|
|
401
|
+
|
|
402
|
+
This section provides a comprehensive reference of all available MQTT client methods for requesting data and controlling devices.
|
|
403
|
+
|
|
404
|
+
**Request Methods & Corresponding Subscriptions**
|
|
405
|
+
|
|
406
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
407
|
+
| Request Method | Subscribe Method | Response Type |
|
|
408
|
+
+====================================+=======================================+========================================+
|
|
409
|
+
| ``request_device_status()`` | ``subscribe_device_status()`` | ``DeviceStatus`` object |
|
|
410
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
411
|
+
| ``request_device_info()`` | ``subscribe_device_feature()`` | ``DeviceFeature`` object |
|
|
412
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
413
|
+
| ``request_energy_usage()`` | ``subscribe_energy_usage()`` | ``EnergyUsageResponse`` object |
|
|
414
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
415
|
+
| ``set_power()`` | ``subscribe_device_status()`` | Updated ``DeviceStatus`` |
|
|
416
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
417
|
+
| ``set_dhw_mode()`` | ``subscribe_device_status()`` | Updated ``DeviceStatus`` |
|
|
418
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
419
|
+
| ``set_dhw_temperature()`` | ``subscribe_device_status()`` | Updated ``DeviceStatus`` |
|
|
420
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
421
|
+
| ``set_dhw_temperature_display()`` | ``subscribe_device_status()`` | Updated ``DeviceStatus`` |
|
|
422
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
423
|
+
|
|
424
|
+
**Generic Subscriptions**
|
|
425
|
+
|
|
426
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
427
|
+
| Method | Purpose | Response Type |
|
|
428
|
+
+====================================+=======================================+========================================+
|
|
429
|
+
| ``subscribe_device()`` | Subscribe to all device messages | Raw ``dict`` (all message types) |
|
|
430
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
431
|
+
| ``subscribe()`` | Subscribe to any MQTT topic | Raw ``dict`` |
|
|
432
|
+
+------------------------------------+---------------------------------------+----------------------------------------+
|
|
433
|
+
|
|
399
434
|
request_device_status()
|
|
400
435
|
'''''''''''''''''''''''
|
|
401
436
|
|
|
@@ -403,12 +438,26 @@ request_device_status()
|
|
|
403
438
|
|
|
404
439
|
await mqtt_client.request_device_status(device: Device) -> int
|
|
405
440
|
|
|
406
|
-
Request current device status.
|
|
441
|
+
Request current device status including temperatures, operation mode, power consumption, and error codes.
|
|
407
442
|
|
|
408
443
|
**Command:** ``16777219``
|
|
409
444
|
|
|
410
445
|
**Topic:** ``cmd/{device_type}/navilink-{device_id}/st``
|
|
411
446
|
|
|
447
|
+
**Response:** Subscribe with ``subscribe_device_status()`` to receive ``DeviceStatus`` objects
|
|
448
|
+
|
|
449
|
+
**Example:**
|
|
450
|
+
|
|
451
|
+
.. code:: python
|
|
452
|
+
|
|
453
|
+
def on_status(status: DeviceStatus):
|
|
454
|
+
print(f"Water Temp: {status.dhwTemperature}°F")
|
|
455
|
+
print(f"Mode: {status.operationMode}")
|
|
456
|
+
print(f"Power: {status.currentInstPower}W")
|
|
457
|
+
|
|
458
|
+
await mqtt_client.subscribe_device_status(device, on_status)
|
|
459
|
+
await mqtt_client.request_device_status(device)
|
|
460
|
+
|
|
412
461
|
request_device_info()
|
|
413
462
|
'''''''''''''''''''''
|
|
414
463
|
|
|
@@ -416,12 +465,59 @@ request_device_info()
|
|
|
416
465
|
|
|
417
466
|
await mqtt_client.request_device_info(device: Device) -> int
|
|
418
467
|
|
|
419
|
-
Request device information.
|
|
468
|
+
Request device information including firmware version, serial number, temperature limits, and capabilities.
|
|
420
469
|
|
|
421
470
|
**Command:** ``16777217``
|
|
422
471
|
|
|
423
472
|
**Topic:** ``cmd/{device_type}/navilink-{device_id}/st/did``
|
|
424
473
|
|
|
474
|
+
**Response:** Subscribe with ``subscribe_device_feature()`` to receive ``DeviceFeature`` objects
|
|
475
|
+
|
|
476
|
+
**Example:**
|
|
477
|
+
|
|
478
|
+
.. code:: python
|
|
479
|
+
|
|
480
|
+
def on_feature(feature: DeviceFeature):
|
|
481
|
+
print(f"Firmware: {feature.controllerSwVersion}")
|
|
482
|
+
print(f"Serial: {feature.controllerSerialNumber}")
|
|
483
|
+
print(f"Temp Range: {feature.dhwTemperatureMin}-{feature.dhwTemperatureMax}°F")
|
|
484
|
+
|
|
485
|
+
await mqtt_client.subscribe_device_feature(device, on_feature)
|
|
486
|
+
await mqtt_client.request_device_info(device)
|
|
487
|
+
|
|
488
|
+
request_energy_usage()
|
|
489
|
+
''''''''''''''''''''''
|
|
490
|
+
|
|
491
|
+
.. code:: python
|
|
492
|
+
|
|
493
|
+
await mqtt_client.request_energy_usage(device: Device, year: int, months: list[int]) -> int
|
|
494
|
+
|
|
495
|
+
Request historical daily energy usage data for specified month(s). Returns heat pump and electric heating element consumption with daily breakdown.
|
|
496
|
+
|
|
497
|
+
**Command:** ``16777225``
|
|
498
|
+
|
|
499
|
+
**Topic:** ``cmd/{device_type}/navilink-{device_id}/st/energy-usage-daily-query/rd``
|
|
500
|
+
|
|
501
|
+
**Response:** Subscribe with ``subscribe_energy_usage()`` to receive ``EnergyUsageResponse`` objects
|
|
502
|
+
|
|
503
|
+
**Parameters:**
|
|
504
|
+
|
|
505
|
+
- ``year``: Year to query (e.g., 2025)
|
|
506
|
+
- ``months``: List of months to query (1-12). Can request multiple months.
|
|
507
|
+
|
|
508
|
+
**Example:**
|
|
509
|
+
|
|
510
|
+
.. code:: python
|
|
511
|
+
|
|
512
|
+
def on_energy(energy: EnergyUsageResponse):
|
|
513
|
+
print(f"Total Usage: {energy.total.total_usage} Wh")
|
|
514
|
+
print(f"Heat Pump: {energy.total.heat_pump_percentage:.1f}%")
|
|
515
|
+
for day in energy.daily:
|
|
516
|
+
print(f"Day {day.day}: {day.total_usage} Wh")
|
|
517
|
+
|
|
518
|
+
await mqtt_client.subscribe_energy_usage(device, on_energy)
|
|
519
|
+
await mqtt_client.request_energy_usage(device, year=2025, months=[9])
|
|
520
|
+
|
|
425
521
|
set_power()
|
|
426
522
|
'''''''''''
|
|
427
523
|
|
|
@@ -435,6 +531,8 @@ Turn device on or off.
|
|
|
435
531
|
|
|
436
532
|
**Mode:** ``power-on`` or ``power-off``
|
|
437
533
|
|
|
534
|
+
**Response:** Device status is updated; subscribe with ``subscribe_device_status()`` to see changes
|
|
535
|
+
|
|
438
536
|
set_dhw_mode()
|
|
439
537
|
''''''''''''''
|
|
440
538
|
|
|
@@ -456,6 +554,8 @@ Set DHW (Domestic Hot Water) operation mode. This sets the ``dhwOperationSetting
|
|
|
456
554
|
* ``4``: High Demand (faster recovery - Hybrid: Boost)
|
|
457
555
|
* ``5``: Vacation (suspend heating for 0-99 days)
|
|
458
556
|
|
|
557
|
+
**Response:** Device status is updated; subscribe with ``subscribe_device_status()`` to see changes
|
|
558
|
+
|
|
459
559
|
**Important:** Setting the mode updates ``dhwOperationSetting`` but does not immediately change ``operationMode``. The ``operationMode`` field reflects the device's current operational state and changes automatically when the device starts/stops heating. See :doc:`DEVICE_STATUS_FIELDS` for details on the relationship between these fields.
|
|
460
560
|
|
|
461
561
|
set_dhw_temperature()
|
|
@@ -465,13 +565,44 @@ set_dhw_temperature()
|
|
|
465
565
|
|
|
466
566
|
await mqtt_client.set_dhw_temperature(device: Device, temperature: int) -> int
|
|
467
567
|
|
|
468
|
-
Set DHW target temperature.
|
|
568
|
+
Set DHW target temperature using the **MESSAGE value** (20°F lower than display).
|
|
469
569
|
|
|
470
570
|
**Command:** ``33554433``
|
|
471
571
|
|
|
472
572
|
**Mode:** ``dhw-temperature``
|
|
473
573
|
|
|
474
|
-
**Parameters:**
|
|
574
|
+
**Parameters:**
|
|
575
|
+
|
|
576
|
+
- ``temperature``: Target temperature in Fahrenheit (message value, not display value)
|
|
577
|
+
|
|
578
|
+
**Response:** Device status is updated; subscribe with ``subscribe_device_status()`` to see changes
|
|
579
|
+
|
|
580
|
+
**Important:** The temperature in the message is 20°F lower than what displays on the device/app:
|
|
581
|
+
|
|
582
|
+
- Message value 120°F → Display shows 140°F
|
|
583
|
+
- Message value 130°F → Display shows 150°F
|
|
584
|
+
|
|
585
|
+
set_dhw_temperature_display()
|
|
586
|
+
''''''''''''''''''''''''''''''
|
|
587
|
+
|
|
588
|
+
.. code:: python
|
|
589
|
+
|
|
590
|
+
await mqtt_client.set_dhw_temperature_display(device: Device, display_temperature: int) -> int
|
|
591
|
+
|
|
592
|
+
Set DHW target temperature using the **DISPLAY value** (what you see on device/app). This is a convenience method that automatically converts display temperature to message value.
|
|
593
|
+
|
|
594
|
+
**Parameters:**
|
|
595
|
+
|
|
596
|
+
- ``display_temperature``: Target temperature as shown on display/app (Fahrenheit)
|
|
597
|
+
|
|
598
|
+
**Response:** Device status is updated; subscribe with ``subscribe_device_status()`` to see changes
|
|
599
|
+
|
|
600
|
+
**Example:**
|
|
601
|
+
|
|
602
|
+
.. code:: python
|
|
603
|
+
|
|
604
|
+
# Set display temperature to 140°F (sends 120°F in message)
|
|
605
|
+
await mqtt_client.set_dhw_temperature_display(device, 140)
|
|
475
606
|
|
|
476
607
|
signal_app_connection()
|
|
477
608
|
'''''''''''''''''''''''
|
|
@@ -484,6 +615,85 @@ Signal that the app has connected.
|
|
|
484
615
|
|
|
485
616
|
**Topic:** ``evt/{device_type}/navilink-{device_id}/app-connection``
|
|
486
617
|
|
|
618
|
+
Subscription Methods
|
|
619
|
+
''''''''''''''''''''
|
|
620
|
+
|
|
621
|
+
subscribe_device_status()
|
|
622
|
+
.........................
|
|
623
|
+
|
|
624
|
+
.. code:: python
|
|
625
|
+
|
|
626
|
+
await mqtt_client.subscribe_device_status(
|
|
627
|
+
device: Device,
|
|
628
|
+
callback: Callable[[DeviceStatus], None]
|
|
629
|
+
) -> int
|
|
630
|
+
|
|
631
|
+
Subscribe to device status messages with automatic parsing into ``DeviceStatus`` objects. Use this after calling ``request_device_status()`` or any control commands to receive updates.
|
|
632
|
+
|
|
633
|
+
**Emits Events:**
|
|
634
|
+
|
|
635
|
+
- ``status_received``: Every status update (DeviceStatus)
|
|
636
|
+
- ``temperature_changed``: Temperature changed (old_temp, new_temp)
|
|
637
|
+
- ``mode_changed``: Operation mode changed (old_mode, new_mode)
|
|
638
|
+
- ``power_changed``: Power consumption changed (old_power, new_power)
|
|
639
|
+
- ``heating_started``: Device started heating (status)
|
|
640
|
+
- ``heating_stopped``: Device stopped heating (status)
|
|
641
|
+
- ``error_detected``: Error code detected (error_code, status)
|
|
642
|
+
- ``error_cleared``: Error code cleared (error_code)
|
|
643
|
+
|
|
644
|
+
subscribe_device_feature()
|
|
645
|
+
..........................
|
|
646
|
+
|
|
647
|
+
.. code:: python
|
|
648
|
+
|
|
649
|
+
await mqtt_client.subscribe_device_feature(
|
|
650
|
+
device: Device,
|
|
651
|
+
callback: Callable[[DeviceFeature], None]
|
|
652
|
+
) -> int
|
|
653
|
+
|
|
654
|
+
Subscribe to device feature/info messages with automatic parsing into ``DeviceFeature`` objects. Use this after calling ``request_device_info()`` to receive device capabilities and firmware info.
|
|
655
|
+
|
|
656
|
+
**Emits Events:**
|
|
657
|
+
|
|
658
|
+
- ``feature_received``: Feature/info received (DeviceFeature)
|
|
659
|
+
|
|
660
|
+
subscribe_energy_usage()
|
|
661
|
+
........................
|
|
662
|
+
|
|
663
|
+
.. code:: python
|
|
664
|
+
|
|
665
|
+
await mqtt_client.subscribe_energy_usage(
|
|
666
|
+
device: Device,
|
|
667
|
+
callback: Callable[[EnergyUsageResponse], None]
|
|
668
|
+
) -> int
|
|
669
|
+
|
|
670
|
+
Subscribe to energy usage query responses with automatic parsing into ``EnergyUsageResponse`` objects. Use this after calling ``request_energy_usage()`` to receive historical energy data.
|
|
671
|
+
|
|
672
|
+
subscribe_device()
|
|
673
|
+
..................
|
|
674
|
+
|
|
675
|
+
.. code:: python
|
|
676
|
+
|
|
677
|
+
await mqtt_client.subscribe_device(
|
|
678
|
+
device: Device,
|
|
679
|
+
callback: Callable[[str, dict], None]
|
|
680
|
+
) -> int
|
|
681
|
+
|
|
682
|
+
Subscribe to all messages from a device (no parsing). Receives all message types as raw dictionaries. Use the specific subscription methods above for automatic parsing.
|
|
683
|
+
|
|
684
|
+
subscribe()
|
|
685
|
+
...........
|
|
686
|
+
|
|
687
|
+
.. code:: python
|
|
688
|
+
|
|
689
|
+
await mqtt_client.subscribe(
|
|
690
|
+
topic: str,
|
|
691
|
+
callback: Callable[[str, dict], None],
|
|
692
|
+
qos: mqtt.QoS = mqtt.QoS.AT_LEAST_ONCE
|
|
693
|
+
) -> int
|
|
694
|
+
|
|
695
|
+
Subscribe to any MQTT topic. Supports wildcards (``#``, ``+``). Receives raw dictionary messages.
|
|
696
|
+
|
|
487
697
|
Periodic Request Methods (Optional)
|
|
488
698
|
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
489
699
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -380,7 +380,6 @@ class DeviceStatus:
|
|
|
380
380
|
|
|
381
381
|
# Convert fields with 'raw / 10.0' formula (non-temperature fields)
|
|
382
382
|
div_10_fields = [
|
|
383
|
-
"targetSuperHeat",
|
|
384
383
|
"currentInletTemperature",
|
|
385
384
|
"currentDhwFlowRate",
|
|
386
385
|
"hpUpperOnDiffTempSetting",
|
|
@@ -414,6 +413,7 @@ class DeviceStatus:
|
|
|
414
413
|
"evaporatorTemperature",
|
|
415
414
|
"ambientTemperature",
|
|
416
415
|
"currentSuperHeat",
|
|
416
|
+
"targetSuperHeat",
|
|
417
417
|
]
|
|
418
418
|
for field_name in heat_pump_temp_fields:
|
|
419
419
|
if field_name in converted_data:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|