pyrademacher


Namepyrademacher JSON
Version 0.14.3 PyPI version JSON
download
home_pagehttps://github.com/peribeir/pyrademacher
SummaryControl devices connected to your Rademacher Homepilot (or Start2Smart) hub
upload_time2024-10-15 21:22:06
maintainerNone
docs_urlNone
authorPedro Ribeiro
requires_python>=3.10
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # pyrademacher

Python Library to read/control devices connected to your Rademacher HomePilot (or Start2Smart) hub.

This library uses the latest REST API, so you must update your hub to the latest firmware if you want to use this library.

## Installation

Use pip to install pyrademacher lib:
```bash
pip install pyrademacher
```

## Usage

### API Class

With the HomePilotApi class you can acess the REST API directly:
```python
from homepilot.api import HomePilotApi

api = HomePilotApi("hostname", "password") # password can be empty if not defined ("")

print(asyncio.run(asyncio.run(api.get_devices()))) # get all devices

asyncio.run(api.async_open_cover(did=1)) # open cover for device id 1 (assuming it's a cover device)
```

### Manager Class

You can use the HomePilotManager helper class to more easily manage the devices:
```python
import asyncio
from homepilot.manager import HomePilotManager
from homepilot.api import HomePilotApi

api = HomePilotApi("hostname", "password") # password can be empty if not defined ("")

manager = asyncio.run(HomePilotManager.async_build_manager(api))
asyncio.run(manager.update_states())

print(manager.devices["1"].is_closed)
print(manager.devices["1"].cover_position)

print(manager.devices["-1"].fw_version) # ID -1 is reserved for the hub itself
```
Each device in manager.devices is an instance of the specific device class.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/peribeir/pyrademacher",
    "name": "pyrademacher",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": null,
    "author": "Pedro Ribeiro",
    "author_email": "pedroeusebio@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/2e/b4/15d09b0d29ea153a0428ce3106b7ac6dc763c3a5515403745d7e5855c8d6/pyrademacher-0.14.3.tar.gz",
    "platform": null,
    "description": "# pyrademacher\n\nPython Library to read/control devices connected to your Rademacher HomePilot (or Start2Smart) hub.\n\nThis library uses the latest REST API, so you must update your hub to the latest firmware if you want to use this library.\n\n## Installation\n\nUse pip to install pyrademacher lib:\n```bash\npip install pyrademacher\n```\n\n## Usage\n\n### API Class\n\nWith the HomePilotApi class you can acess the REST API directly:\n```python\nfrom homepilot.api import HomePilotApi\n\napi = HomePilotApi(\"hostname\", \"password\") # password can be empty if not defined (\"\")\n\nprint(asyncio.run(asyncio.run(api.get_devices()))) # get all devices\n\nasyncio.run(api.async_open_cover(did=1)) # open cover for device id 1 (assuming it's a cover device)\n```\n\n### Manager Class\n\nYou can use the HomePilotManager helper class to more easily manage the devices:\n```python\nimport asyncio\nfrom homepilot.manager import HomePilotManager\nfrom homepilot.api import HomePilotApi\n\napi = HomePilotApi(\"hostname\", \"password\") # password can be empty if not defined (\"\")\n\nmanager = asyncio.run(HomePilotManager.async_build_manager(api))\nasyncio.run(manager.update_states())\n\nprint(manager.devices[\"1\"].is_closed)\nprint(manager.devices[\"1\"].cover_position)\n\nprint(manager.devices[\"-1\"].fw_version) # ID -1 is reserved for the hub itself\n```\nEach device in manager.devices is an instance of the specific device class.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Control devices connected to your Rademacher Homepilot (or Start2Smart) hub",
    "version": "0.14.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/peribeir/pyrademacher/issues",
        "Homepage": "https://github.com/peribeir/pyrademacher"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "23124a138bfca04eeb8a1a31e6972fae96ad858ea18dd36558ed9377ce530442",
                "md5": "2c330daa1f0ae436c2b757f459778cab",
                "sha256": "cde3f3c55db2f6f7f125f566670d6f4edc03bf5abc9ca2b5d57a6ee0079f650d"
            },
            "downloads": -1,
            "filename": "pyrademacher-0.14.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2c330daa1f0ae436c2b757f459778cab",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 42722,
            "upload_time": "2024-10-15T21:22:05",
            "upload_time_iso_8601": "2024-10-15T21:22:05.095483Z",
            "url": "https://files.pythonhosted.org/packages/23/12/4a138bfca04eeb8a1a31e6972fae96ad858ea18dd36558ed9377ce530442/pyrademacher-0.14.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2eb415d09b0d29ea153a0428ce3106b7ac6dc763c3a5515403745d7e5855c8d6",
                "md5": "a9f67e26423ff784f375ad384327bd74",
                "sha256": "6fde320ee72456d0a07da1271c75c9810ed405ce72f45476f086414dea61b770"
            },
            "downloads": -1,
            "filename": "pyrademacher-0.14.3.tar.gz",
            "has_sig": false,
            "md5_digest": "a9f67e26423ff784f375ad384327bd74",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 33959,
            "upload_time": "2024-10-15T21:22:06",
            "upload_time_iso_8601": "2024-10-15T21:22:06.126415Z",
            "url": "https://files.pythonhosted.org/packages/2e/b4/15d09b0d29ea153a0428ce3106b7ac6dc763c3a5515403745d7e5855c8d6/pyrademacher-0.14.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-15 21:22:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "peribeir",
    "github_project": "pyrademacher",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "pyrademacher"
}
        
Elapsed time: 0.36971s