# py-electrolux-ocp
## New details on API
Looks like electrolux finally opened their api, will be rewriting this wrapper to reference their api directly (remove reverse engineered api)
<https://developer.electrolux.one/documentation/reference>
## What is this
Python package wrapper around Electrolux OneApp (OCP) api
Early version, this package APIs might change
## Prerequisites
```
pip install pyelectroluxocp
```
## Usage examples
Example to connect via websockets and listen for appliance state changes
```py
import asyncio
import json
from pyelectroluxocp import OneAppApi
async def main():
async with OneAppApi("__username__", "__password__") as client:
appliances = await client.get_appliances_list()
print("appliances found: ", json.dumps([x.get("applianceData").get("applianceName")+" "+x.get("applianceId") for x in appliances]))
def state_update_callback(a):
print("appliance state updated", json.dumps((a)))
await client.watch_for_appliance_state_updates([appliances[0].get("applianceId")], state_update_callback)
asyncio.run(main())
```
## TODOs
- Better error messages on known scenarios (login failed)
Raw data
{
"_id": null,
"home_page": null,
"name": "pyelectroluxocp",
"maintainer": "Woyken",
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "home, automation, electrolux, aeg, ocp, oneapp, api",
"author": "Woyken",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/00/3f/434a4831de76fd5387bc131cd4681d5cffea2adf6017cd8dad58ab516c34/pyelectroluxocp-0.0.19.tar.gz",
"platform": null,
"description": "# py-electrolux-ocp\n\n## New details on API\n\nLooks like electrolux finally opened their api, will be rewriting this wrapper to reference their api directly (remove reverse engineered api)\n<https://developer.electrolux.one/documentation/reference>\n\n## What is this\n\nPython package wrapper around Electrolux OneApp (OCP) api\n\nEarly version, this package APIs might change\n\n## Prerequisites\n\n```\npip install pyelectroluxocp\n```\n\n## Usage examples\n\nExample to connect via websockets and listen for appliance state changes\n```py\nimport asyncio\nimport json\nfrom pyelectroluxocp import OneAppApi\n\nasync def main():\n async with OneAppApi(\"__username__\", \"__password__\") as client:\n appliances = await client.get_appliances_list()\n\n print(\"appliances found: \", json.dumps([x.get(\"applianceData\").get(\"applianceName\")+\" \"+x.get(\"applianceId\") for x in appliances]))\n\n def state_update_callback(a):\n print(\"appliance state updated\", json.dumps((a)))\n await client.watch_for_appliance_state_updates([appliances[0].get(\"applianceId\")], state_update_callback)\n\nasyncio.run(main())\n```\n\n## TODOs\n\n- Better error messages on known scenarios (login failed)\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Electrolux OneApp OCP API",
"version": "0.0.19",
"project_urls": {
"Bug Tracker": "https://github.com/Woyken/py-electrolux-ocp/issues",
"Changelog": "https://github.com/Woyken/py-electrolux-ocp/releases/",
"Documentation": "https://github.com/Woyken/py-electrolux-ocp/blob/main/README.md",
"Homepage": "https://github.com/Woyken/py-electrolux-ocp/",
"Repository": "https://github.com/Woyken/py-electrolux-ocp.git"
},
"split_keywords": [
"home",
" automation",
" electrolux",
" aeg",
" ocp",
" oneapp",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "f76ea1f05d1829b13297d35640214a4839f760420eac9dfc813743f575d9907f",
"md5": "befc636210beaf87e21539aa8b694c8e",
"sha256": "516a4262215ecf7d87f34741ef4dd318d5281913e94937e312146854c32d975d"
},
"downloads": -1,
"filename": "pyelectroluxocp-0.0.19-py3-none-any.whl",
"has_sig": false,
"md5_digest": "befc636210beaf87e21539aa8b694c8e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 18647,
"upload_time": "2024-08-27T06:50:53",
"upload_time_iso_8601": "2024-08-27T06:50:53.771681Z",
"url": "https://files.pythonhosted.org/packages/f7/6e/a1f05d1829b13297d35640214a4839f760420eac9dfc813743f575d9907f/pyelectroluxocp-0.0.19-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "003f434a4831de76fd5387bc131cd4681d5cffea2adf6017cd8dad58ab516c34",
"md5": "68a267a9fa344bbe4b8bcae23f7f5627",
"sha256": "8116a0d6ca993542d897ae2e0a8ded6fc7ce0a499d5afc3a6352a512cad9c399"
},
"downloads": -1,
"filename": "pyelectroluxocp-0.0.19.tar.gz",
"has_sig": false,
"md5_digest": "68a267a9fa344bbe4b8bcae23f7f5627",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 15399,
"upload_time": "2024-08-27T06:50:55",
"upload_time_iso_8601": "2024-08-27T06:50:55.249475Z",
"url": "https://files.pythonhosted.org/packages/00/3f/434a4831de76fd5387bc131cd4681d5cffea2adf6017cd8dad58ab516c34/pyelectroluxocp-0.0.19.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-27 06:50:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Woyken",
"github_project": "py-electrolux-ocp",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "pyelectroluxocp"
}