Skip to main content

Interface to the unofficial EcoNet API

Project description

pyeconet

Python3 interface to the unofficial EcoNet API.

[!NOTE] I no longer have a device connect to the Rheem cloud due to migrating to a fully local control option https://github.com/esphome-econet/esphome-econet If anyone is interested in taking over ownership for this project please open an issue to discuss.

[!NOTE] This isn't using an official EcoNet API therefore this library could stop working at any time, without warning.

import asyncio
import logging
import time
import getpass

from pyeconet import EcoNetApiInterface
from pyeconet.equipment import EquipmentType
from pyeconet.equipment.water_heater import WaterHeaterOperationMode

logging.basicConfig()
logging.getLogger().setLevel(logging.DEBUG)


async def main():
    email = input("Enter your email: ").strip()
    password = "" #getpass.getpass(prompt='Enter your password: ')
    api = await EcoNetApiInterface.login(email, password=password)
    all_equipment = await api.get_equipment_by_type([EquipmentType.WATER_HEATER, EquipmentType.THERMOSTAT])
    #api.subscribe()
    #await asyncio.sleep(5)
    for equip_list in all_equipment.values():
        for equipment in equip_list:
            print(f"Name: {equipment.device_name}")
    #        print(f"Set point: {equipment.set_point}")
    #        print(f"Supports modes: {equipment._supports_modes()}")
    #        print(f"Operation modes: {equipment.modes}")
    #        print(f"Operation mode: {equipment.mode}")
            #await equipment._get_energy_usage()
            #equipment.set_set_point(equipment.set_point + 1)
            #equipment.set_mode(OperationMode.ELECTRIC_MODE)
    #await asyncio.sleep(300000)
    #api.unsubscribe()

if __name__ == "__main__":
    loop = asyncio.get_event_loop()
    loop.run_until_complete(main())

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

pyeconet-0.2.1.tar.gz (14.1 kB view details)

Uploaded Source

Built Distribution

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

pyeconet-0.2.1-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file pyeconet-0.2.1.tar.gz.

File metadata

  • Download URL: pyeconet-0.2.1.tar.gz
  • Upload date:
  • Size: 14.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyeconet-0.2.1.tar.gz
Algorithm Hash digest
SHA256 7748f101205e27af71bbd00e74a8f7dda8959636ee55c544b4d042fa8f8fd000
MD5 5b9b81d5d4f5a2b48a5bb63e7ef4ac2b
BLAKE2b-256 98c5005b646497b8c02405a2ed9d4653fe01c92d31de7f02484990d63759a273

See more details on using hashes here.

File details

Details for the file pyeconet-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: pyeconet-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pyeconet-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 100526920d23292d0c4c56038d2a105dc24a2f89d7c95c512693d4e909f0e5fb
MD5 dedfdd7f730d5c2ac3953f1baaf37cb6
BLAKE2b-256 dcb172f6542b38f0cbe8136f3c4ef2e6af4624821e63e0e4114e4397966d4db6

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