Add a short description here!
Project description
Features
Device Monitoring: Access real-time status information including temperatures, power consumption, and tank charge level
Temperature Control: Set target water temperature (100-140°F)
Operation Mode Control: Switch between Heat Pump, Energy Saver, High Demand, Electric, and Vacation modes
Comprehensive Status Data: Access to 70+ device status fields including compressor status, heater status, flow rates, and more
MQTT Protocol Support: Low-level MQTT communication with Navien devices
Automatic Reconnection: Reconnects automatically with exponential backoff during network interruptions
Command Queuing: Commands sent while disconnected are queued and sent automatically when reconnected
Data Models: Type-safe data classes with automatic unit conversions
Quick Start
Installation
pip install nwp500-python
Basic Usage
from nwp500 import NavienAuthClient, NavienAPIClient
# Authentication happens automatically when entering the context
async with NavienAuthClient("your_email@example.com", "your_password") as auth_client:
# Create API client
api_client = NavienAPIClient(auth_client=auth_client)
# Get device data
devices = await api_client.list_devices()
device = devices[0] if devices else None
if device:
# Access status information
status = device.status
print(f"Water Temperature: {status.dhwTemperature}°F")
print(f"Tank Charge: {status.dhwChargePer}%")
print(f"Power Consumption: {status.currentInstPower}W")
# Set temperature
await api_client.set_device_temperature(device, 130)
# Change operation mode
await api_client.set_device_mode(device, "heat_pump")
Device Status Fields
The library provides access to comprehensive device status information:
- Temperature Sensors
Water temperature (current and target)
Tank upper/lower temperatures
Ambient temperature
Discharge, suction, and evaporator temperatures
Inlet temperature
- System Status
Operation mode (Heat Pump, Energy Saver, High Demand, Electric, Vacation)
Compressor status
Heat pump and electric heater status
Evaporator fan status
Tank charge percentage
- Power & Energy
Current power consumption (Watts)
Total energy capacity (Wh)
Available energy capacity (Wh)
- Diagnostics
WiFi signal strength
Error codes
Fault status
Cumulative operation time
Flow rates
Operation Modes
Mode |
ID |
Description |
|---|---|---|
Heat Pump Mode |
1 |
Most energy-efficient mode using only the heat pump. Longest recovery time. |
Energy Saver Mode |
2 |
Default mode. Balances efficiency and recovery time using both heat pump and electric heater. |
High Demand Mode |
3 |
Uses electric heater more frequently for faster recovery time. |
Electric Mode |
4 |
Fastest recovery using only electric heaters. Least energy-efficient. |
Vacation Mode |
5 |
Suspends heating to save energy during extended absences. |
MQTT Protocol
The library supports low-level MQTT communication with Navien devices:
- Control Topics
cmd/{deviceType}/{deviceId}/ctrl - Send control commands
cmd/{deviceType}/{deviceId}/st - Request status updates
- Control Commands
Power control (on/off)
DHW mode changes
Temperature settings
Reservation management
- Status Requests
Device information
General device status
Energy usage queries
Reservation information
See the full MQTT Protocol Documentation for detailed message formats.
Documentation
Comprehensive documentation is available in the docs/ directory:
Device Status Fields - Complete field reference with units and conversions
MQTT Messages - MQTT protocol documentation
MQTT Client - MQTT client usage guide
Authentication - Authentication module documentation
Data Models
The library includes type-safe data models with automatic unit conversions:
DeviceStatus: Complete device status with 70+ fields
OperationMode: Enumeration of available operation modes
TemperatureUnit: Celsius/Fahrenheit handling
MqttRequest/MqttCommand: MQTT message structures
- Temperature conversions are handled automatically:
DHW temperatures: raw_value + 20 (°F)
Heat pump temperatures: raw_value / 10.0 (°F)
Ambient temperature: (raw_value * 9/5) + 32 (°F)
Requirements
Python 3.9+
aiohttp >= 3.8.0
websockets >= 10.0
cryptography >= 3.4.0
pydantic >= 2.0.0
awsiotsdk >= 1.21.0
Development
To set up a development environment, clone the repository and install the required dependencies:
# Clone the repository
git clone https://github.com/eman/nwp500-python.git
cd nwp500-python
# Install in development mode
pip install -e .
# Run tests
pytest
License
This project is licensed under the MIT License - see the LICENSE.txt file for details.
Acknowledgments
This project has been set up using PyScaffold 4.6. For details and usage information on PyScaffold see https://pyscaffold.org/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nwp500_python-1.0.0.tar.gz.
File metadata
- Download URL: nwp500_python-1.0.0.tar.gz
- Upload date:
- Size: 124.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a975d983a6a6167b7de35f8ab7f92f5545a6d2dfef9ba6bbcb98852512ff2cd0
|
|
| MD5 |
90ce55c7800482538a8f6285af9ef8f2
|
|
| BLAKE2b-256 |
43a66ca4a48ab6f999ae22f69ac5c6a76bb84efe27a1971e693bf9e46a8f7877
|
Provenance
The following attestation bundles were made for nwp500_python-1.0.0.tar.gz:
Publisher:
release.yml on eman/nwp500-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nwp500_python-1.0.0.tar.gz -
Subject digest:
a975d983a6a6167b7de35f8ab7f92f5545a6d2dfef9ba6bbcb98852512ff2cd0 - Sigstore transparency entry: 598386301
- Sigstore integration time:
-
Permalink:
eman/nwp500-python@98360edac25e76ec5fbfa81134721cec6d736ecf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/eman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98360edac25e76ec5fbfa81134721cec6d736ecf -
Trigger Event:
push
-
Statement type:
File details
Details for the file nwp500_python-1.0.0-py3-none-any.whl.
File metadata
- Download URL: nwp500_python-1.0.0-py3-none-any.whl
- Upload date:
- Size: 35.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
38de5a8da836b6480f6a2142abc92b236b45875c2d9ad1c2845dc49b1fae6763
|
|
| MD5 |
7c11b33d632bd781ccb791c9dc300791
|
|
| BLAKE2b-256 |
4bfa46d4b0cf37d2395358d8ea854efc28388e27cef3e5cee97593985eee1e7d
|
Provenance
The following attestation bundles were made for nwp500_python-1.0.0-py3-none-any.whl:
Publisher:
release.yml on eman/nwp500-python
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nwp500_python-1.0.0-py3-none-any.whl -
Subject digest:
38de5a8da836b6480f6a2142abc92b236b45875c2d9ad1c2845dc49b1fae6763 - Sigstore transparency entry: 598386312
- Sigstore integration time:
-
Permalink:
eman/nwp500-python@98360edac25e76ec5fbfa81134721cec6d736ecf -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/eman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@98360edac25e76ec5fbfa81134721cec6d736ecf -
Trigger Event:
push
-
Statement type: