A Python library for monitoring and controlling the Navien NWP500 Heat Pump Water Heater through the Navilink cloud service.
- Documentation: https://nwp500-python.readthedocs.io/
- Source: https://github.com/eman/nwp500-python
- REST and MQTT: The REST API and real-time MQTT (AWS IoT).
- Monitoring: Real-time tracking of temperature, power usage, tank charge, and component status.
- Control: Remote control of target temperatures, operation modes, and vacation settings.
- Scheduling: Reservations, time-of-use (TOU) schedules and anti-legionella cycles.
- Simulator (optional):
nwp500.sim, a physics model of the heater. It estimates recovery time and available hot water, projects the effect of a change to the schedule or settings, and calibrates against a heater's own history.nwp-cli simulateruns it against the live heater or a scenario file. Install withpip install nwp500-python[sim].
pip install nwp500-pythonimport asyncio
from nwp500 import NavienAPIClient, NavienAuthClient, NavienMqttClient
async def main():
async with NavienAuthClient("email@example.com", "password") as auth:
api = NavienAPIClient(auth)
device = await api.get_first_device()
# Status and control go over MQTT.
mqtt = NavienMqttClient(auth)
await mqtt.connect()
try:
got = asyncio.Event()
def on_status(status):
print(f"Tank: {status.dhw_temperature}°F, "
f"setpoint {status.dhw_target_temperature_setting}°F")
got.set()
await mqtt.subscribe_device_status(device, on_status)
await mqtt.request_device_status(device)
await asyncio.wait_for(got.wait(), timeout=20)
await mqtt.set_dhw_temperature(device, 130)
finally:
await mqtt.disconnect()
asyncio.run(main())- Tutorials: Start here if you're new to the library.
- How-to Guides: Practical step-by-step recipes for specific tasks.
- Reference: Technical descriptions of the API, models, and protocol.
- Explanation: How the library and the device work.
We welcome contributions! Please see our Contributing Guide for more details.
This project is licensed under the MIT License. See the LICENSE.txt file for details.