pyeconet


Namepyeconet JSON
Version 0.1.23 PyPI version JSON
download
home_pagehttps://github.com/w1ll1am23/pyeconet
SummaryInterface to the unofficial EcoNet API
upload_time2024-10-08 01:16:17
maintainerNone
docs_urlNone
authorWilliam Scanlon
requires_python<4,>=3.9
licenseNone
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": null,
    "docs_url": null,
    "requires_python": "<4,>=3.9",
    "maintainer_email": null,
    "keywords": "econet, rheem, api",
    "author": "William Scanlon",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/a7/09/c954d135c1274528acc254c2632c9d45130613c63a50851b90d9938e4478/pyeconet-0.1.23.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": null,
    "summary": "Interface to the unofficial EcoNet API",
    "version": "0.1.23",
    "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": "f57b2d0b9d89014389252026a5af7c19861860f1c47d7dd156cfe1b19f66e95e",
                "md5": "1e4b17c163309f6e3ffc4459ad411c2e",
                "sha256": "297cf0d9bfb07c773c9b1bc6f5c4b1c73e80e590eaa15a40cec8d99cb085a95c"
            },
            "downloads": -1,
            "filename": "pyeconet-0.1.23-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1e4b17c163309f6e3ffc4459ad411c2e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4,>=3.9",
            "size": 13990,
            "upload_time": "2024-10-08T01:16:15",
            "upload_time_iso_8601": "2024-10-08T01:16:15.809067Z",
            "url": "https://files.pythonhosted.org/packages/f5/7b/2d0b9d89014389252026a5af7c19861860f1c47d7dd156cfe1b19f66e95e/pyeconet-0.1.23-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a709c954d135c1274528acc254c2632c9d45130613c63a50851b90d9938e4478",
                "md5": "f3193c939369cea1d5a8decd0842caa8",
                "sha256": "5d04ef612782c770ab2ebad7895f8c744164a0ec45fcd9ef76f315d01f2c6830"
            },
            "downloads": -1,
            "filename": "pyeconet-0.1.23.tar.gz",
            "has_sig": false,
            "md5_digest": "f3193c939369cea1d5a8decd0842caa8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4,>=3.9",
            "size": 12615,
            "upload_time": "2024-10-08T01:16:17",
            "upload_time_iso_8601": "2024-10-08T01:16:17.181161Z",
            "url": "https://files.pythonhosted.org/packages/a7/09/c954d135c1274528acc254c2632c9d45130613c63a50851b90d9938e4478/pyeconet-0.1.23.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-08 01:16:17",
    "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.81825s