Skip to main content

A package to manipulate and monitor Emerald Heat Pump Hot Water Systems

Project description

emerald_hws_py

Python package for controlling Emerald Heat Pump Hot Water Systems

Overview

This package provides an interface to control and monitor Emerald Heat Pump Hot Water Systems through their API and MQTT service.

Installation

pip install emerald_hws

Usage

from emerald_hws.emeraldhws import EmeraldHWS

# Basic usage with default connection settings
client = EmeraldHWS("your_email@example.com", "your_password")
client.connect()

# List all hot water systems
hws_list = client.listHWS()
print(f"Found {len(hws_list)} hot water systems")

# Get status of first HWS
hws_id = hws_list[0]
status = client.getFullStatus(hws_id)
print(f"Current temperature: {status['last_state'].get('temp_current')}")

# Turn on the hot water system
client.turnOn(hws_id)

Configuration Options

Connection Timeout

The module will automatically reconnect to the MQTT service periodically to prevent stale connections. You can configure this timeout:

# Set connection timeout to 6 hours (360 minutes)
client = EmeraldHWS("your_email@example.com", "your_password", connection_timeout_minutes=360)

Health Check

The module can proactively check for message activity and reconnect if no messages have been received for a specified period:

# Set health check to check every 30 minutes
client = EmeraldHWS("your_email@example.com", "your_password", health_check_minutes=30)

# Disable health check
client = EmeraldHWS("your_email@example.com", "your_password", health_check_minutes=0)

Callback for Updates

You can register a callback function to be notified when the state of any hot water system changes:

def my_callback():
    print("Hot water system state updated!")

client = EmeraldHWS("your_email@example.com", "your_password", update_callback=my_callback)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

emerald_hws-0.0.11.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emerald_hws-0.0.11-py3-none-any.whl (9.3 kB view details)

Uploaded Python 3

File details

Details for the file emerald_hws-0.0.11.tar.gz.

File metadata

  • Download URL: emerald_hws-0.0.11.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for emerald_hws-0.0.11.tar.gz
Algorithm Hash digest
SHA256 d6ab715c52cd83391160766970c279aaaa7ff47f3ca31954cdc83f4e9d60c00b
MD5 0cb6eaa8b2504e4c6d72da84be0dbda0
BLAKE2b-256 ae8b5dcedd71a2552fcc2e62fd405c758bc8c5c8f1a44837e80688ddad050f48

See more details on using hashes here.

File details

Details for the file emerald_hws-0.0.11-py3-none-any.whl.

File metadata

  • Download URL: emerald_hws-0.0.11-py3-none-any.whl
  • Upload date:
  • Size: 9.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for emerald_hws-0.0.11-py3-none-any.whl
Algorithm Hash digest
SHA256 2c3e166ab2a536cfdb2490a514428c200de1f17ba5fa997682e5cdd784e3ba93
MD5 59cfe2b4703a0da5abc12e5b9d7d4373
BLAKE2b-256 8d2b001652f5d1227f6f49243d146c1e3477ddafae968dcd30db5d703e94b64c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page