Skip to content

About

Python package for interacting with Navien NWP500 water heaters

Topics

Resources

Contributing

Stars

4 stars

Watchers

2 watching

Forks

Repository files navigation

nwp500-python

PyPI-v Python-versions CI-status Docs-status Code-style License

Python library for Navien NWP500 Heat Pump Water Heater

A Python library for monitoring and controlling the Navien NWP500 Heat Pump Water Heater through the Navilink cloud service.

Features

  • 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 simulate runs it against the live heater or a scenario file. Install with pip install nwp500-python[sim].

Getting Started

pip install nwp500-python

Quick Example

import 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())

Documentation

  • 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.

Contributing

We welcome contributions! Please see our Contributing Guide for more details.

License

This project is licensed under the MIT License. See the LICENSE.txt file for details.

About

Python package for interacting with Navien NWP500 water heaters

Topics

Resources

Contributing

Stars

4 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages