pyeconet


Namepyeconet JSON
Version 0.1.22 PyPI version JSON
download
home_pagehttps://github.com/w1ll1am23/pyeconet
SummaryInterface to the unofficial EcoNet API
upload_time2023-10-25 20:17:40
maintainer
docs_urlNone
authorWilliam Scanlon
requires_python>=3.9, <4
license
keywords econet rheem api
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyeconet
Python3 interface to the unofficial EcoNet API.

**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": "",
    "docs_url": null,
    "requires_python": ">=3.9, <4",
    "maintainer_email": "",
    "keywords": "econet,rheem,api",
    "author": "William Scanlon",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/d6/2a/cc4eeae6c3372d92b15f11390c84eb47586459efe3599ec6088d52d733fb/pyeconet-0.1.22.tar.gz",
    "platform": null,
    "description": "# pyeconet\nPython3 interface to the unofficial EcoNet API.\n\n**NOTE** This isn't using an official EcoNet API therefore this library could stop working at any time, without warning.\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": "",
    "summary": "Interface to the unofficial EcoNet API",
    "version": "0.1.22",
    "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": "3c8873c0777da0c5e58e4e9e9c9162c4b337c3f545636daaa565da30a50c99a0",
                "md5": "9902164f4bd3bab3eed2081190d67ad0",
                "sha256": "44ecdceb0563825a29125859bb5712a0fdb8f6bdb98c8525635f2fb12082a017"
            },
            "downloads": -1,
            "filename": "pyeconet-0.1.22-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9902164f4bd3bab3eed2081190d67ad0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9, <4",
            "size": 13933,
            "upload_time": "2023-10-25T20:17:39",
            "upload_time_iso_8601": "2023-10-25T20:17:39.364181Z",
            "url": "https://files.pythonhosted.org/packages/3c/88/73c0777da0c5e58e4e9e9c9162c4b337c3f545636daaa565da30a50c99a0/pyeconet-0.1.22-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d62acc4eeae6c3372d92b15f11390c84eb47586459efe3599ec6088d52d733fb",
                "md5": "df818f2cb8166e25a98c7386fe0152d5",
                "sha256": "b8ba1c242817392608d0ba46cdbbea9305d08dff3a4ca1a4dd2c1931520582a2"
            },
            "downloads": -1,
            "filename": "pyeconet-0.1.22.tar.gz",
            "has_sig": false,
            "md5_digest": "df818f2cb8166e25a98c7386fe0152d5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9, <4",
            "size": 12567,
            "upload_time": "2023-10-25T20:17:40",
            "upload_time_iso_8601": "2023-10-25T20:17:40.879953Z",
            "url": "https://files.pythonhosted.org/packages/d6/2a/cc4eeae6c3372d92b15f11390c84eb47586459efe3599ec6088d52d733fb/pyeconet-0.1.22.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-25 20:17:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "w1ll1am23",
    "github_project": "pyeconet",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyeconet"
}
        
Elapsed time: 0.14665s