Name | vitreaclient JSON |
Version |
0.1.7
JSON |
| download |
home_page | None |
Summary | Python package encapsulating Vitrea box communication protocol. |
upload_time | 2025-08-16 15:39:16 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | Copyright (c) 2018 The Python Packaging Authority
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
...
|
keywords |
home automation
vitrea
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Vitrea
Python package encapsulating the simple Vitrea box communication protocol.
You need to identify the Vitrea box IP address and port to use this package.
Note that the port is not necessarily the port used by the Vitrea app (hint: try +/- 1).
## Installation
```bash
pip install vitreaclient
```
## Usage
```python
from vitreaclient.client import VitreaClient, VitreaResponse, DeviceStatus
import asyncio
async def vitrea_test():
client = VitreaClient(host='192.168.1.100', port=11102)
status_events = []
def on_status(event):
print(f"Event type: {event.type}, Node: {event.node}, Key: {event.key}, Status: {event.status}, data: {event.data}")
status_events.append(event)
client.on(VitreaResponse.STATUS, on_status)
def on_ok(event):
print(f"Event type {event.type}")
client.on(VitreaResponse.OK, on_ok)
# connect and start the read task to listen for incoming messages
await client.connect()
await client.start_read_task()
await client.key_off("018", "2") # Example command to turn on a key
await asyncio.sleep(2)
await client.key_on("018", "2") # Example command to turn off a key
# get the status of all nodes
await client.status_request()
await asyncio.sleep(60) # Give time for response
print(f"Status events received: {len(status_events)}")
# unsubscribe from events
client.off(VitreaResponse.STATUS, on_status)
client.off(VitreaResponse.OK, on_ok)
client.disconnect()
```
## License
See [LICENSE](LICENSE).
Raw data
{
"_id": null,
"home_page": null,
"name": "vitreaclient",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "home automation, vitrea",
"author": null,
"author_email": "SK <skappdevel@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/f5/ff/62557742a65bfa4b0fa85befdfd4acd6de18f5a5ebef4c74c3a58e7048d8/vitreaclient-0.1.7.tar.gz",
"platform": null,
"description": "# Vitrea\n\nPython package encapsulating the simple Vitrea box communication protocol.\nYou need to identify the Vitrea box IP address and port to use this package.\nNote that the port is not necessarily the port used by the Vitrea app (hint: try +/- 1).\n\n## Installation\n\n```bash\npip install vitreaclient\n```\n\n## Usage\n\n```python\nfrom vitreaclient.client import VitreaClient, VitreaResponse, DeviceStatus\nimport asyncio\n\n\nasync def vitrea_test():\n client = VitreaClient(host='192.168.1.100', port=11102)\n\n status_events = []\n def on_status(event):\n print(f\"Event type: {event.type}, Node: {event.node}, Key: {event.key}, Status: {event.status}, data: {event.data}\")\n status_events.append(event)\n\n client.on(VitreaResponse.STATUS, on_status)\n\n def on_ok(event):\n print(f\"Event type {event.type}\")\n\n client.on(VitreaResponse.OK, on_ok)\n\n # connect and start the read task to listen for incoming messages\n await client.connect()\n await client.start_read_task()\n\n await client.key_off(\"018\", \"2\") # Example command to turn on a key\n await asyncio.sleep(2)\n await client.key_on(\"018\", \"2\") # Example command to turn off a key\n\n # get the status of all nodes\n await client.status_request()\n\n await asyncio.sleep(60) # Give time for response\n print(f\"Status events received: {len(status_events)}\")\n # unsubscribe from events\n client.off(VitreaResponse.STATUS, on_status)\n client.off(VitreaResponse.OK, on_ok)\n \n client.disconnect()\n\n\n\n```\n\n## License\nSee [LICENSE](LICENSE).\n\n",
"bugtrack_url": null,
"license": "Copyright (c) 2018 The Python Packaging Authority\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n \n ...\n ",
"summary": "Python package encapsulating Vitrea box communication protocol.",
"version": "0.1.7",
"project_urls": {
"Homepage": "https://github.com/solangek/vitreaclient"
},
"split_keywords": [
"home automation",
" vitrea"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "9c28b87bbd0a7d0380d9c674797f94bada84d5f974061695f3e0706b391d270d",
"md5": "393266ea989eb9d43186a4c1dfc6e9fd",
"sha256": "b3e405470514c0c2e88a2d3108ddb3b798649f473c3703d7e884ee2e1fb57838"
},
"downloads": -1,
"filename": "vitreaclient-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "393266ea989eb9d43186a4c1dfc6e9fd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 26757,
"upload_time": "2025-08-16T15:39:15",
"upload_time_iso_8601": "2025-08-16T15:39:15.526974Z",
"url": "https://files.pythonhosted.org/packages/9c/28/b87bbd0a7d0380d9c674797f94bada84d5f974061695f3e0706b391d270d/vitreaclient-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "f5ff62557742a65bfa4b0fa85befdfd4acd6de18f5a5ebef4c74c3a58e7048d8",
"md5": "ca9f076b5fa1d176ce86060be6751785",
"sha256": "473abd06db8d954f279b37a323fe4cf736e379ceaab5f8718ece76e119345612"
},
"downloads": -1,
"filename": "vitreaclient-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "ca9f076b5fa1d176ce86060be6751785",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 25320,
"upload_time": "2025-08-16T15:39:16",
"upload_time_iso_8601": "2025-08-16T15:39:16.781073Z",
"url": "https://files.pythonhosted.org/packages/f5/ff/62557742a65bfa4b0fa85befdfd4acd6de18f5a5ebef4c74c3a58e7048d8/vitreaclient-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-16 15:39:16",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "solangek",
"github_project": "vitreaclient",
"github_not_found": true,
"lcname": "vitreaclient"
}