Name | hargassner JSON |
Version |
1.0.3
JSON |
| download |
home_page | |
Summary | Query Hargassner equipment information through their Web API |
upload_time | 2023-12-27 17:37:52 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.8 |
license | MIT License Copyright (c) 2023 Markus Cserna 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 |
hargassner
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Hargassner API
This Python module enables you to query information about your Hargassner devices from their Web portal.
Your device must be connected to the Web portal of Hargassner (https://web.hargassner.at). To use the module, you will
need access to the following information:
| Information | Description |
|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| Username | This is your username that you use to log into the web portal. |
| Password | This is your password that you use to log into the web portal. |
| Client Secret | The client secret is a cryptographic key derived from your login information. It can be found in the developer tools from your browser while navigating the web portal. Look for a POST request "login" and inspect the JSON information that is sent to the Hargassner server. It will contain your username, password and the client secret. |
| Installation ID | This is the ID of your installation. You can find it in the address bar of your browser when you navigate through the web portal (https://web.hargassner.at/installations/<name>-<installation-id>/info). |
## Usage/Examples
```python
from hargassner.client import HargassnerAPI
# MAIN
if __name__ == "__main__":
h = HargassnerAPI()
h.username = '<your Hargassner username>'
h.password = '<your Hargassner password>'
h.client_secret = '<your client secret from Hargassner web'
h.installation = '<your Hargassner installation ID>'
h.authdat = 'auth.dat'
h.debug = True
j = h.query_api()
if 'data' in j:
for w in j['data']:
if w['widget'] == 'EVENTS':
for e in w['values']:
print('Ereignis: ' +e['created_at'] + " -> "+ e['text'])
elif w['widget'] == 'HEATER':
print('Name:' + w['values']['name'])
print('State:' + w['values']['state'])
print('Abgastemperatur: ' + str(w['values']['smoke_temperature']))
print('Kesseltemperatur: ' + str(w['values']['heater_temperature_current']))
print('Aussentemperatur: ' + str(w['values']['outdoor_temperature']))
elif w['widget'] == 'BUFFER':
print('Puffer Füllgrad: ' + str(w['values']['buffer_charge']))
print('Puffer Temperatur Oben: ' + str(w['values']['buffer_temperature_top']))
print('Puffer Temperatur Mitte: ' + str(w['values']['buffer_temperature_center']))
print('Puffer Temperatur Unten: ' + str(w['values']['buffer_temperature_bottom']))
else:
print("PROBLEM")
```
Raw data
{
"_id": null,
"home_page": "",
"name": "hargassner",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "hargassner",
"author": "",
"author_email": "Markus Cserna <oss@cserna.at>",
"download_url": "https://files.pythonhosted.org/packages/5b/19/acb906dba4a9f3d6b7c7d7418ec8bf0fff99688230b088ea19fb0da3347e/hargassner-1.0.3.tar.gz",
"platform": null,
"description": "\n# Hargassner API\n\nThis Python module enables you to query information about your Hargassner devices from their Web portal.\n\nYour device must be connected to the Web portal of Hargassner (https://web.hargassner.at). To use the module, you will\nneed access to the following information:\n\n| Information | Description |\n|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Username | This is your username that you use to log into the web portal. |\n| Password | This is your password that you use to log into the web portal. |\n| Client Secret | The client secret is a cryptographic key derived from your login information. It can be found in the developer tools from your browser while navigating the web portal. Look for a POST request \"login\" and inspect the JSON information that is sent to the Hargassner server. It will contain your username, password and the client secret. |\n| Installation ID | This is the ID of your installation. You can find it in the address bar of your browser when you navigate through the web portal (https://web.hargassner.at/installations/<name>-<installation-id>/info). |\n\n\n## Usage/Examples\n\n```python\nfrom hargassner.client import HargassnerAPI\n\n# MAIN\nif __name__ == \"__main__\":\n h = HargassnerAPI()\n h.username = '<your Hargassner username>'\n h.password = '<your Hargassner password>'\n h.client_secret = '<your client secret from Hargassner web'\n h.installation = '<your Hargassner installation ID>'\n h.authdat = 'auth.dat'\n h.debug = True\n j = h.query_api()\n\n if 'data' in j:\n for w in j['data']:\n if w['widget'] == 'EVENTS':\n for e in w['values']:\n print('Ereignis: ' +e['created_at'] + \" -> \"+ e['text'])\n elif w['widget'] == 'HEATER':\n print('Name:' + w['values']['name'])\n print('State:' + w['values']['state'])\n print('Abgastemperatur: ' + str(w['values']['smoke_temperature']))\n print('Kesseltemperatur: ' + str(w['values']['heater_temperature_current']))\n print('Aussentemperatur: ' + str(w['values']['outdoor_temperature']))\n elif w['widget'] == 'BUFFER':\n print('Puffer F\u00fcllgrad: ' + str(w['values']['buffer_charge']))\n print('Puffer Temperatur Oben: ' + str(w['values']['buffer_temperature_top']))\n print('Puffer Temperatur Mitte: ' + str(w['values']['buffer_temperature_center']))\n print('Puffer Temperatur Unten: ' + str(w['values']['buffer_temperature_bottom']))\n else:\n print(\"PROBLEM\")\n\n```\n\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Markus Cserna 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. ",
"summary": "Query Hargassner equipment information through their Web API",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/deawin/hargassner-api",
"Issues": "https://github.com/deawin/hargassner-api/issues"
},
"split_keywords": [
"hargassner"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "601e8de46609b01e4637d6843dfe1a061110c52c5f8001412f40a75314721083",
"md5": "f784034b77ecfc10e4b1c8784e43b169",
"sha256": "6c2d1b8f740b09dd8dd87651cba82dcb406995ad61fb5e9db98efc7d51a1ce24"
},
"downloads": -1,
"filename": "hargassner-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f784034b77ecfc10e4b1c8784e43b169",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 4919,
"upload_time": "2023-12-27T17:37:50",
"upload_time_iso_8601": "2023-12-27T17:37:50.192465Z",
"url": "https://files.pythonhosted.org/packages/60/1e/8de46609b01e4637d6843dfe1a061110c52c5f8001412f40a75314721083/hargassner-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "5b19acb906dba4a9f3d6b7c7d7418ec8bf0fff99688230b088ea19fb0da3347e",
"md5": "46143adc5f78e641fdb5420e0a26888c",
"sha256": "41b49b6508953e9dd5ff11e2c1b98077ccd1f750cadfd506e482bb9f22fc7434"
},
"downloads": -1,
"filename": "hargassner-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "46143adc5f78e641fdb5420e0a26888c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 4043,
"upload_time": "2023-12-27T17:37:52",
"upload_time_iso_8601": "2023-12-27T17:37:52.168457Z",
"url": "https://files.pythonhosted.org/packages/5b/19/acb906dba4a9f3d6b7c7d7418ec8bf0fff99688230b088ea19fb0da3347e/hargassner-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-27 17:37:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "deawin",
"github_project": "hargassner-api",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "hargassner"
}