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

This version

0.2.2

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyeconet-0.2.2.tar.gz
  • Upload date:
  • Size: 14.2 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.2.tar.gz
Algorithm Hash digest
SHA256 0c07c942a809fc17d638eee3d37c1e8ab4fc2778935f6786861be1a6b88ff84f
MD5 c02a75b027798c8c7e647c0732e21126
BLAKE2b-256 8e4452c3b41e312dd4f5cb3e44fbd0e974d0e34fdb54c1e0bc575ffb0f25320d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyeconet-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 15.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 06e5382fd191bb895826921015c70f8cd82192fb0e57785d795c2ff43c4e4ff0
MD5 01dd93d9aa2084fcbf1f2a1b364a35c5
BLAKE2b-256 993dca462f225fd403412912ddb2f903947eb7bc396f68f315276ca8afd5d86d

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