Skip to main content

Python library and CLI for controlling Rheem water heaters via the EcoNet API

Project description

pyRheem

A Python library and CLI for controlling Rheem water heaters via the EcoNet API.

Installation

From PyPI

pip install pyrheem

From Source

git clone https://github.com/ril3y/pyrheem.git
cd pyrheem
pip install -e .

Configuration

Set your Rheem EcoNet credentials using environment variables or a .env file:

export RHEEM_EMAIL="your_email@example.com"
export RHEEM_PASSWORD="your_password"

Or create a .env file in your working directory:

RHEEM_EMAIL=your_email@example.com
RHEEM_PASSWORD=your_password

CLI Usage

List Devices

rheem --list

Output:

Locations and Devices:
============================================================

[Location 0] My Home
  ID: abc12345-6789-def0-1234-567890abcdef
  Address: Springfield, IL

  [Device 0] Electric Water Heater
    Serial: XX-XX-XX-XX-XX-XX-XXX
    Setpoint: 120F (range: 110-130)
    Mode: Energy Saver
    Status: Running | Connected

Get Status (JSON)

rheem --status

Set Temperature

# Set first device
rheem --temp 120

# Specify location and device by index
rheem --location 0 --device 0 --temp 125

# Specify by name (partial match)
rheem --location "My Home" --device "Electric" --temp 120

Set Mode

rheem --mode energy       # Energy Saver mode
rheem --mode performance  # Performance mode

Enable/Disable

rheem --enable
rheem --disable

Interactive Mode

rheem

Commands in interactive mode:

  • list - List locations and devices
  • use <location> <device> - Select a device
  • temp <temperature> - Set temperature
  • mode <energy|performance> - Set mode
  • enable / disable - Enable/disable device
  • status - Show current device status
  • refresh - Refresh data from server
  • quit - Exit

All CLI Options

usage: rheem [-h] [--email EMAIL] [--password PASSWORD] [--location LOCATION]
             [--device DEVICE] [--list] [--status] [--temp TEMP]
             [--mode {energy,performance}] [--enable] [--disable] [--quiet]
             [--interactive]

Options:
  --email           Rheem account email
  --password        Rheem account password
  --location, -L    Location index or name (default: 0)
  --device, -d      Device index, serial, or name (default: 0)
  --list, -l        List all locations and devices
  --status, -s      Get all device status as JSON
  --temp, -t        Set temperature in Fahrenheit
  --mode, -m        Set mode: energy or performance
  --enable          Enable the water heater
  --disable         Disable the water heater
  --quiet, -q       Quiet mode (JSON output only)
  --interactive, -i Force interactive mode

Library Usage

from pyrheem import RheemEcoNetAPI

# Initialize and login
api = RheemEcoNetAPI("email@example.com", "password")

if api.login() and api.get_all_data():
    # List all water heaters
    for serial, heater in api.water_heaters.items():
        print(f"{heater.display_name}: {heater.setpoint}F")

    # Get first water heater
    heater = list(api.water_heaters.values())[0]

    # Set temperature
    api.set_temperature(heater, 120)

    # Set mode
    api.set_mode(heater, "energy")  # or "performance"

    # Enable/disable
    api.set_enabled(heater, True)

    # Cleanup
    api.disconnect()

Available Classes

  • RheemEcoNetAPI - Main API client
  • WaterHeater - Water heater device model
  • Location - Location (home) model
  • RheemSession - Session information

RheemEcoNetAPI Methods

Method Description
login() Authenticate with Rheem API
get_all_data() Fetch all locations and devices
get_locations_list() Get list of locations
get_location(identifier) Get location by index, ID, or name
get_device(location, device_id) Get device by index, serial, or name
connect_mqtt() Connect to MQTT for real-time control
set_temperature(heater, temp) Set water heater temperature
set_mode(heater, mode) Set mode ("energy" or "performance")
set_enabled(heater, enabled) Enable or disable water heater
disconnect() Disconnect from MQTT

WaterHeater Properties

Property Type Description
serial_number str Device serial number
display_name str Friendly device name
setpoint int Current temperature setpoint (F)
setpoint_min int Minimum allowed temperature
setpoint_max int Maximum allowed temperature
mode str Current mode (e.g., "Energy Saver")
running str Running status
connected bool Connection status
enabled bool Whether device is enabled

Requirements

  • Python 3.8+
  • requests
  • paho-mqtt

License

MIT License

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

pyrheem-0.1.1.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

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

pyrheem-0.1.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file pyrheem-0.1.1.tar.gz.

File metadata

  • Download URL: pyrheem-0.1.1.tar.gz
  • Upload date:
  • Size: 13.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrheem-0.1.1.tar.gz
Algorithm Hash digest
SHA256 70d0b2948a4f876cfbb6dbec901978b9d17376d0de5793c15926dabcb94614c4
MD5 cca188a4690042e3eacb1449ba9b8e27
BLAKE2b-256 bd51fbe1379c3deb5a4d6c443166535dcc70d33b0329f911c17936f78b25833f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrheem-0.1.1.tar.gz:

Publisher: publish.yml on ril3y/pyrheem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pyrheem-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: pyrheem-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyrheem-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c26bbb8dd089b5878e24d8411a1432a80da312e7089a78effad8fc9d4b230960
MD5 9731394dd182b9171b1832b6878717ea
BLAKE2b-256 f21d6911ca5a5f10d3811cf1a7b2b09be00d3b3c09650046babbb4428ee2394f

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrheem-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ril3y/pyrheem

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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