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.2.tar.gz (13.4 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.2-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyrheem-0.1.2.tar.gz
  • Upload date:
  • Size: 13.4 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.2.tar.gz
Algorithm Hash digest
SHA256 eebc46e27649e565e5438624202fb83e68969f9586c6a1deaa3d8519afe38a1f
MD5 b861743047179bcb0a8ecc2f1e792ed5
BLAKE2b-256 f606102e22b5a8cbd385f15a207b1053033b75add9c4f9d6eef43cbba101d412

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrheem-0.1.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: pyrheem-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 95284973200714e5c6847efbf7cddb5740916658849ef4713b8df2b0cbef7e6c
MD5 36cccdafecfe401a2f4a595afffb1786
BLAKE2b-256 2ac685a28424204cd33ba6ff91a4918a5f6b0e6090b93b4da2efc48018a620bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for pyrheem-0.1.2-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