Skip to main content

A library (and a command line client) to control your Tado Smart Thermostat.

Project description

Tado python library

Libtado Logo

License: GPL-3.0 GitHub Repo stars

build Docs

A library to control your Tado Smart Thermostat. This repository contains an actual library in libtado/api.py and a proof of concept command line client in libtado/__main__.py.

The tested version of APIs is Tado v2.

Installation

You can download official library with pip install libtado.

But because I do not own a Tado anymore you may want to use a fork of libtado instead. For example you can install the fork that is currently (February 2019) maintained and improved by @germainlefebvre4. Please note that I do not monitor or verify changes of this repository. Please check the source yourself.

git clone https://github.com/germainlefebvre4/libtado.git

Please check out https://libtado.readthedocs.io for more documentation.

Preparation

Retrieve the CLIENT_SECRET before running the script otherwise you will get a 401 Unauthorized Access.

The latest CLIENT_SECRET can be found at https://my.tado.com/webapp/env.js. It will look something like this:

var TD = {
    config: {
        version: 'v588',
        oauth: {
          clientSecret: 'wZaRN7rpjn3FoNyF5IFuxg9uMzYJcvOoQ8QWiIqS3hfk6gLhVlG57j5YNoZL2Rtc'
        }
    }
};

An alternative way to get your CLIENT_SECRET is to enable the Developper Mode when logging in and catch the Headers. You will find the form data like this :

client_id: tado-web-app
client_secret: fndskjnjzkefjNFRNkfKJRNFKRENkjnrek
grant_type: password
password: MyBeautifulPassword
scope: home.user
username: email@example.com

Then you just have to get the value in the attribute client_secret. You will need it to connect to your account through Tado APIs. The client_secret never dies so you can base your script on it.

Usage

Download the repository. You can work inside it. Beware that the examples assume that they can access the file ./libtado/api.py.

Now you can call it in your Pyhton script!

import libtado.api

t = api.Tado('my@email.com', 'myPassword', 'client_secret')

print(t.get_me())
print(t.get_home())
print(t.get_zones())
print(t.get_state(1))

Examples

An example script is provided in the repository as example.py. It shows you how to use the library and expose some structured responses. A more detailed example is available in libtado/__main__.py.

Supported version and deprecations

Python

Python version Supported versions
3.7 2.0.0 > 3.6.x
3.8 3.7.0 > latest
3.9 3.7.0 > latest
3.10 3.7.0 > latest
3.11 3.7.0 > latest
3.12 3.7.0 > latest

Contributing

We thank everyone for their help and contributions to the library.

You want to report a bug? Create an issue

You want to request a feature? Create an issue

You want to contribute to the library? Read the Contributing page.

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

libtado-3.7.16.tar.gz (33.4 kB view details)

Uploaded Source

Built Distribution

libtado-3.7.16-py3-none-any.whl (33.8 kB view details)

Uploaded Python 3

File details

Details for the file libtado-3.7.16.tar.gz.

File metadata

  • Download URL: libtado-3.7.16.tar.gz
  • Upload date:
  • Size: 33.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1020-azure

File hashes

Hashes for libtado-3.7.16.tar.gz
Algorithm Hash digest
SHA256 aa9fbc00bb3d214ff0374e60fc129af2b2c436800c88f6ef2a014eeebb1b705d
MD5 787ddc6f56249fd524261622841d715d
BLAKE2b-256 a166d5d13c3f3cbcff5c6c245b7d6890a1ec9576606f4b37f4524351cba3ab5f

See more details on using hashes here.

File details

Details for the file libtado-3.7.16-py3-none-any.whl.

File metadata

  • Download URL: libtado-3.7.16-py3-none-any.whl
  • Upload date:
  • Size: 33.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1020-azure

File hashes

Hashes for libtado-3.7.16-py3-none-any.whl
Algorithm Hash digest
SHA256 80eb050e67be7d459a2ae1fb80013e6df6cfcb6203b36499eabc9d196a740a5b
MD5 6ca34c47f38238d07a32a5fee0bbdcee
BLAKE2b-256 93c458f877d2735b200ee1246076e251d42d4e679aa28a9c4d2b7bda2c101784

See more details on using hashes here.

Supported by

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