A library for setting FRITZ!DECT thermostat values (e.g. offset, holidays, timer), that can't be set via AHA requests.
Project description
Advanced Fritz Thermostat
A library for setting the values AHA requests won't let you!
For basic settings use Heikos (hthiery) amazing pyfritzhome!
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 |
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
:
pip install fritz-advanced-thermostat
You will also need to setup a user.
Example Usage
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!
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for fritz-advanced-thermostat-0.2.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 19a374596979be71a40a6eec95174f0fc2eb1f66b7dc53379cefe9cc9450ceca |
|
MD5 | 6f5d9c69c68bb48ea99a5863ce3dd8f0 |
|
BLAKE2b-256 | 96b97631862b41115e7437c18e5d354c3a9cda68a8a9077cd8135978fd6fafac |
Hashes for fritz_advanced_thermostat-0.2.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebf15af77f0233bca7f1a96a08d21683f06a8c617707036a6dac1bfe89ffad8d |
|
MD5 | 249f21e4863f7151a8af8bf6d0f6f5c9 |
|
BLAKE2b-256 | 2d03a228810d6b39089a7b1fb8a8e2c03900ca6700daf41854779b3fdaa23c9a |
Hashes for fritz_advanced_thermostat-0.2.3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec145ae01e6db578d52969576534270e8597370b7d7a7e6c870c78b162fda561 |
|
MD5 | 909af4832168933ffe1b0b3581d56325 |
|
BLAKE2b-256 | 93e1d97d092309a59e1eee4d7ba2938fc9e428038eac4e8223d27b37b88c1a1a |