pyeconet
Python3 interface to the unofficial EcoNet API.
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())
Metadata
Release files for pyeconet 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pyeconet-0.3.0.tar.gz | 17.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pyeconet-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 36.3 kB
Release files / pyeconet-0.3.0.tar.gz
| Download URL | pyeconet-0.3.0.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
490e93d64325109d750b476bbe90f04cb8557f730123b2a6a46a0059393c1032
|
|
BLAKE2b-256 checksum How to use checksums |
69c1ce5b72280b41905bcffc9fbb476ddb3488c8a039dd35195cc437263a3a05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / pyeconet-0.3.0-py3-none-any.whl
| Download URL | pyeconet-0.3.0-py3-none-any.whl |
|---|---|
| Size | 18.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5670721c44453ecb0a4b5f64f0c53bbda931f203f75886657306f961ed1dd153
|
|
BLAKE2b-256 checksum How to use checksums |
bb4a879be968604f661549252031523da8ce23c4a82e5196555443de9737df82
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|