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.1.28.tar.gz (13.5 kB view details)

Uploaded Source

Built Distribution

pyeconet-0.1.28-py3-none-any.whl (14.7 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for pyeconet-0.1.28.tar.gz
Algorithm Hash digest
SHA256 ad2645953a48a5b5da996dcfc2e779134685e0fb9f02aa9143ea6d23bd46cb29
MD5 6c189ea209e3307322bf4b0d9d7749af
BLAKE2b-256 ef8df4d645527d42055253f4269a40fb8235de0b8700a9bc8ad4fb5450489287

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyeconet-0.1.28-py3-none-any.whl
Algorithm Hash digest
SHA256 4a860ab4d518c73a77501d7457e89268e3b48a4a744e60f52e22e5a870b945a0
MD5 2ab6ee56eb628daa00421a88737a0731
BLAKE2b-256 57b3702cfb7a54b96d0d1231a15732861c64a6977ecbe9ed170da149aeadb597

See more details on using hashes here.

Supported by

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