# Disclaimer
**This package is not related to or developed by AVM. No relationship between the developer of this package and AVM exists.**
**All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this package are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.**
# Advanced Fritz Thermostat
A library for setting the values [AHA requests](https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf) won't let you!
For basic settings use [Heikos (hthiery)](https://github.com/hthiery) amazing [pyfritzhome](https://github.com/hthiery/python-fritzhome)!
## Disclaimer
This library will always be hacky and will never leave the "beta state", since it uses undocumented API's and selenium for data scraping.
I use this library myself and I give my best to keep it updated.
But with any FritzOS upgrade this library might stop working, don't uses this if you can't live with that!
**Remember:** I'm doing this for **free** as a **hobby**, so be nice!
## Requirements
* Python 3.9.0 or higher
## Tested configurations
| Device | Tested in FritzOS |
|:--------------:|:-----------------:|
| FRITZ!DECT 301 | 7.29 |
| FRITZ!DECT 301 | 7.56 |
If you have a different device or FritzOS version set `experimental=True` this will disable all checks, but beware there might be dragons!
## Setup
Install using `pip`:
```shell
pip install fritz-advanced-thermostat
```
You will also need to [setup a user](https://github.com/hthiery/python-fritzhome#fritzbox-user).
## Example Usage
```python
from fritz_advanced_thermostat import FritzAdvancedThermostat
from fritz_advanced_thermostat import FritzAdvancedThermostatError
host='192.168.178.1'
user='my-user'
password='my-password'
try:
fat = FritzAdvancedThermostat(host, user, password, ssl_verify=False, experimental=False)
print('Available thermostats:')
devices = fat.get_thermostats()
for dev in devices:
print('Device name: ' + dev)
device_name = devices[0]
current_offset = fat.get_thermostat_offset(device_name)
print('Current offset of ' + device_name + ': ' + str(current_offset))
fat.set_thermostat_offset(device_name, current_offset + 1)
fat.commit()
new_offset = fat.get_thermostat_offset(device_name, force_reload=True)
print('New offset of ' + device_name + ': ' + str(new_offset))
except FritzAdvancedThermostatError as err:
print('An error ouccured, check the logs!')
print(err)
```
## Contribute
Contributions are always welcome, just open a PR, specially if you find a way to obtain the thermostat data without selenium!
Raw data
{
"_id": null,
"home_page": "https://github.com/mietzen/python-fritz-advanced-thermostat",
"name": "fritz-advanced-thermostat",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "fritzbox smarthome avm thermostat",
"author": "Nils Stein",
"author_email": "github.nstein@mailbox.org",
"download_url": "",
"platform": null,
"description": "# Disclaimer\n\n**This package is not related to or developed by AVM. No relationship between the developer of this package and AVM exists.**\n\n**All trademarks, logos and brand names are the property of their respective owners. All company, product and service names used in this package are for identification purposes only. Use of these names,trademarks and brands does not imply endorsement.**\n\n\n# Advanced Fritz Thermostat\n\nA library for setting the values [AHA requests](https://avm.de/fileadmin/user_upload/Global/Service/Schnittstellen/AHA-HTTP-Interface.pdf) won't let you!\n\nFor basic settings use [Heikos (hthiery)](https://github.com/hthiery) amazing [pyfritzhome](https://github.com/hthiery/python-fritzhome)!\n\n## Disclaimer\n\nThis library will always be hacky and will never leave the \"beta state\", since it uses undocumented API's and selenium for data scraping.\nI use this library myself and I give my best to keep it updated.\n\nBut with any FritzOS upgrade this library might stop working, don't uses this if you can't live with that!\n\n**Remember:** I'm doing this for **free** as a **hobby**, so be nice!\n\n## Requirements\n\n* Python 3.9.0 or higher\n\n## Tested configurations\n\n| Device | Tested in FritzOS |\n|:--------------:|:-----------------:|\n| FRITZ!DECT 301 | 7.29 |\n| FRITZ!DECT 301 | 7.56 |\n\nIf you have a different device or FritzOS version set `experimental=True` this will disable all checks, but beware there might be dragons!\n\n## Setup\n\nInstall using `pip`:\n\n```shell\npip install fritz-advanced-thermostat\n```\n\nYou will also need to [setup a user](https://github.com/hthiery/python-fritzhome#fritzbox-user).\n\n## Example Usage\n\n```python\nfrom fritz_advanced_thermostat import FritzAdvancedThermostat\nfrom fritz_advanced_thermostat import FritzAdvancedThermostatError\n\nhost='192.168.178.1'\nuser='my-user'\npassword='my-password'\n\ntry:\n fat = FritzAdvancedThermostat(host, user, password, ssl_verify=False, experimental=False)\n\n print('Available thermostats:')\n devices = fat.get_thermostats()\n for dev in devices:\n print('Device name: ' + dev)\n\n device_name = devices[0]\n current_offset = fat.get_thermostat_offset(device_name)\n print('Current offset of ' + device_name + ': ' + str(current_offset))\n fat.set_thermostat_offset(device_name, current_offset + 1)\n fat.commit()\n\n new_offset = fat.get_thermostat_offset(device_name, force_reload=True)\n print('New offset of ' + device_name + ': ' + str(new_offset))\nexcept FritzAdvancedThermostatError as err:\n print('An error ouccured, check the logs!')\n print(err)\n```\n\n## Contribute\n\nContributions are always welcome, just open a PR, specially if you find a way to obtain the thermostat data without selenium!\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A library for setting FRITZ!DECT thermostat values (e.g. offset, holidays, timer), that can't be set via AHA requests.",
"version": "0.2.5",
"project_urls": {
"Homepage": "https://github.com/mietzen/python-fritz-advanced-thermostat"
},
"split_keywords": [
"fritzbox",
"smarthome",
"avm",
"thermostat"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "30c94b481cb228a290295cc88b6a59cc78e5ce80d7327d8c24dfc4096e9b5260",
"md5": "80f69b22e5ba6f136f198d0c98e74fb5",
"sha256": "0cb7bf8639f84c79fa5b36bdcb823a2a4b21d356a0740c7a5929937e7a2b9f1c"
},
"downloads": -1,
"filename": "fritz_advanced_thermostat-0.2.5-py3-none-any.whl",
"has_sig": false,
"md5_digest": "80f69b22e5ba6f136f198d0c98e74fb5",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8879,
"upload_time": "2023-09-09T11:58:38",
"upload_time_iso_8601": "2023-09-09T11:58:38.461888Z",
"url": "https://files.pythonhosted.org/packages/30/c9/4b481cb228a290295cc88b6a59cc78e5ce80d7327d8c24dfc4096e9b5260/fritz_advanced_thermostat-0.2.5-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-09 11:58:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mietzen",
"github_project": "python-fritz-advanced-thermostat",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "fritz-advanced-thermostat"
}