# 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.
```python
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())
```
Raw data
{
"_id": null,
"home_page": "https://github.com/w1ll1am23/pyeconet",
"name": "pyeconet",
"maintainer": null,
"docs_url": null,
"requires_python": "<4,>=3.8",
"maintainer_email": null,
"keywords": "econet, rheem, api",
"author": "William Scanlon",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/59/34/34032e1df7b68a4435a5c70363e44534f8c76626afd8bb1720bf2a1b826a/pyeconet-0.1.25.tar.gz",
"platform": null,
"description": "# pyeconet\nPython3 interface to the unofficial EcoNet API.\n\n> [!NOTE]\n> I no longer have a device connect to the Rheem cloud due to migrating to a fully local control option \n> https://github.com/esphome-econet/esphome-econet\n> If anyone is interested in taking over ownership for this project please open an issue to discuss.\n\n> [!NOTE]\n> This isn't using an official EcoNet API therefore this library could stop working at any time, without warning.\n\n\n\n```python\nimport asyncio\nimport logging\nimport time\nimport getpass\n\nfrom pyeconet import EcoNetApiInterface\nfrom pyeconet.equipment import EquipmentType\nfrom pyeconet.equipment.water_heater import WaterHeaterOperationMode\n\nlogging.basicConfig()\nlogging.getLogger().setLevel(logging.DEBUG)\n\n\nasync def main():\n email = input(\"Enter your email: \").strip()\n password = \"\" #getpass.getpass(prompt='Enter your password: ')\n api = await EcoNetApiInterface.login(email, password=password)\n all_equipment = await api.get_equipment_by_type([EquipmentType.WATER_HEATER, EquipmentType.THERMOSTAT])\n #api.subscribe()\n #await asyncio.sleep(5)\n for equip_list in all_equipment.values():\n for equipment in equip_list:\n print(f\"Name: {equipment.device_name}\")\n # print(f\"Set point: {equipment.set_point}\")\n # print(f\"Supports modes: {equipment._supports_modes()}\")\n # print(f\"Operation modes: {equipment.modes}\")\n # print(f\"Operation mode: {equipment.mode}\")\n #await equipment._get_energy_usage()\n #equipment.set_set_point(equipment.set_point + 1)\n #equipment.set_mode(OperationMode.ELECTRIC_MODE)\n #await asyncio.sleep(300000)\n #api.unsubscribe()\n\nif __name__ == \"__main__\":\n loop = asyncio.get_event_loop()\n loop.run_until_complete(main())\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Interface to the unofficial EcoNet API",
"version": "0.1.25",
"project_urls": {
"Bug Reports": "https://github.com/w1ll1am23/pyeconet/issues",
"Homepage": "https://github.com/w1ll1am23/pyeconet",
"Source": "https://github.com/w1ll1am23/pyeconet"
},
"split_keywords": [
"econet",
" rheem",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "d4aee645e1bd216ad70c686fd9be1d7632cbb8cb5bc7aad3af858e2111611cdd",
"md5": "850da351ff7cdb5ac507711dca3d2892",
"sha256": "6d7533f856f4ce9b9e8d0d7ba9d14635aea0aaa1e3668453a2d1dbeac9839007"
},
"downloads": -1,
"filename": "pyeconet-0.1.25-py3-none-any.whl",
"has_sig": false,
"md5_digest": "850da351ff7cdb5ac507711dca3d2892",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4,>=3.8",
"size": 14251,
"upload_time": "2025-01-10T03:55:54",
"upload_time_iso_8601": "2025-01-10T03:55:54.838179Z",
"url": "https://files.pythonhosted.org/packages/d4/ae/e645e1bd216ad70c686fd9be1d7632cbb8cb5bc7aad3af858e2111611cdd/pyeconet-0.1.25-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "593434032e1df7b68a4435a5c70363e44534f8c76626afd8bb1720bf2a1b826a",
"md5": "affe8d140aa365c2816c7f5e2aea1bdd",
"sha256": "dafeaaf874bd6b126a0914c9041325ea18d775b5a1ce228e93b9ca6f14239178"
},
"downloads": -1,
"filename": "pyeconet-0.1.25.tar.gz",
"has_sig": false,
"md5_digest": "affe8d140aa365c2816c7f5e2aea1bdd",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4,>=3.8",
"size": 13123,
"upload_time": "2025-01-10T03:55:56",
"upload_time_iso_8601": "2025-01-10T03:55:56.917420Z",
"url": "https://files.pythonhosted.org/packages/59/34/34032e1df7b68a4435a5c70363e44534f8c76626afd8bb1720bf2a1b826a/pyeconet-0.1.25.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-10 03:55:56",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "w1ll1am23",
"github_project": "pyeconet",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyeconet"
}