Skip to main content

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 a "beta state".

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 beware with any FritzOS upgrade this library might stop working, don't uses this if you can't live with that!

Also Remember: I'm doing this for free as a hobby!

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 fritzadvancedthermostat

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 = 'Nils'
    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(device_name)

    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

fritz-advanced-thermostat-0.1.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

fritz_advanced_thermostat-0.1.1-py2.py3-none-any.whl (7.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page