Expected Reading Time: 9 minutes
In times like these, when heating costs are skyrocketing, it is even more worthwhile to regulate your energy consumption. Not everyone lives in a perfectly insulated house and therefore needs to turn up the heating less often and less. Tado makes it possible with its smart radiator thermostats to regulate the temperature to the degree. If you also use the Tado Auto-Assist, you can save a lot of energy. It should be said in advance that this post is not paid advertising.
I have been using three Tado radiator thermostats for a little over a year now and am very satisfied. Especially in winter, I'm looking forward to coming home and not standing in a freezer while taking a shower. However, the whole thing always had a catch. Automated and "smart" ran the whole thing only with a Tado Auto-Assist subscription for € 24.99 a year or € 2.99 a year. Who still has an old Tado Bridge with V2, the subscription is free. All those who, like me, bought a starter package with a V3 Bridge afterwards, look down the tube.
With a price of €170 for the bridge and three thermostats, that's not exactly pleasing, since the purchase is already not that cheap and you have to save at least €26 per year in heating costs through the subscription and the Auto-Assist to get any benefit at all. There are definitely cheaper alternatives, but Tado appealed to me the most visually and the geofencing functionality makes a big difference. The same goes for the window-open detection, which works without additional sensors on the windows. Accordingly, it would be nice to be able to use the whole thing for free, right?
What does geofencing mean?
Tado itself describes it as follows:
When Geofencing for a block of time in your Smart Schedule activates the settings of this block will only be active if your home is in the Home mode is.
When Geofencing disabled is the time block regardless of the location of the home members and regardless of whether tado° is in the Home or Away mode is active.
Tado support page - What does the geofencing switch do for a time block in the smart schedule?
Depending on the location of all Tado users in a household, the heating is switched on or off, for example. The criteria for this and how warm it should be, for example, can be configured individually.
The problem
Now we are back to the initial problem. But this only works with the Auto-Assist subscription. Or maybe not? Through the API of Tado it is possible to read the status of your home. If you do not have a subscription, the Tado app sends notifications to alert you about the status.
For example, no one is at home and a notification is sent from the Tado app with the question and possibility to switch from HOME mode to AWAY mode and thus possibly turn off all heaters. However, since this does not happen automatically and you are not constantly looking at your phone, it is quite possible that you miss out on these savings. This is annoying for the environment and the wallet.
The same scheme as described for geofencing applies to window open detection. Notifications are sent, but this is far from full automation.
Requirements in the Tado App
In order to be able to use the Tado Auto-Assist at all, you have to activate some settings. These can be seen in the pictures. On the one hand, you have to activate the window open detection for all desired rooms and on the other hand, the location-based control on the devices of each Tado user. For example, if only one user has activated this function, only his location will be taken into account.
YouTube video implementation
Solution for a free Tado Auto-Assist
The Tado community naturally also includes developers who have not let themselves be deprived of the opportunity to use the API for their own purposes and to prevent a subscription obligation.
How is the whole thing implemented?
With the help of a Python module called pyTado programmed from Chris Jewell the foundation stone has been laid. And that already in 2016 or until the last update in 2019. He describes the module as follows:
PyTado is a Python module that implements an interface to the Tado web API. It allows the user to interact with their Tado heating system to monitor or control their heating system, which goes beyond what Tado itself currently offers.
In the meantime, there is another maintainer who has also made changes in 2023. All data can now be read from the Tado API. This means we have complete information about everything related to our system. However, the whole thing still had to be implemented in such a way that the functionalities used by the Auto-Assist are integrated.
For this implementation, the GitHub user adrianslabu (Adrian Slabu) is responsible. In his GitHub repository he used the pyTado module to replicate the functions of the Auto-Assist. And it really works flawlessly. I don't want to go into more detail about the technical implementation, as that would go beyond the scope. For that you can have a look at the source code in his repository.
On which platforms can I run the solution?
Basically, with the Python script, it is possible to run it anywhere Python can be installed. For someone like me, who likes to have everything in Docker as a container, this was not a solution and too much effort to run it on my server with Python.
Accordingly, I looked into whether and how the whole thing could also be made available as a Docker image. On the basis of the python:alpine
image, the script is added. Of course, we also need the pyTado module mentioned above. So that we can set a variable user name and password for our Tado account, two environment variables are set, which are picked up again in the slightly adapted script. Finally, the script is only started via CMD command in the Dockerfile.
This Docker Image solution makes it possible to run the script on almost any device. Especially single board computers (SBC) like a RaspberryPi or ODROID or any other low power device are perfect to keep the script running continuously.
Currently the Docker image for linux/amd64, linux/arm/v7 and linux/arm64 available. If there is a need for another platform, please post in the comments. You can find the Docker image in the Docker Hub registry. I take care to keep the image up to date and to react quickly in case of changes.
Docker implementation
Link to Docker Hub repository: saschabrockel/tado_aa
To start the container now you can either use the command docker run
or use a compose file. The container logs the data just like the original script and you can check what exactly happened or happened. By the way, you don't get notifications on your smartphone anymore, because the script already reacts automatically to changes and a reminder is not necessary anymore.
Updates in 2023 on geofencing & open window detection
It is now also possible to specify which of the two features you want to use. Numerous requests in the comments have now prompted me to implement these in Docker as well. You can use the environment variables GEOFENCING
and OPENWINDOWDETECTION
with the boolean values true
or false
to specify whether you want to activate the respective feature. The default value is true
for both. Even if you do not specify the variables at all. You can also see this in the logs. You should definitely use one of the two, because otherwise the app is useless.
Currently the logs look a bit cluttered because the PyTado module contains a small bug where you can't turn off the debug logs. At least you can see from the status 200 responses that everything is working.
Docker Run Script:
docker run --name tado_aa --restart always -e USERNAME=YOURUSERNAME -e PASSWORD=YOURPASSWORD -e GEOFENCING=True -e OPENWINDOWDETECTION=True saschabrockel/tado_aa:latest
Docker Compose:
version: "3"
services:
tado_aa:
restart: always
container_name: tado_aa
image: saschabrockel/tado_aa:latest
environment:
- USERNAME=YOURUSERNAME
- PASSWORD=YOURPASSWORD
- GEOFENCING=True
- OPENWINDOWDETECTION=True
Of course, you can also use the Compose file in Portainer as its own stack. If everything works, you should see logs that look like this:
19-08-2022 00:29:41 # Galaxy-S21 is at home, activating HOME mode.
19-08-2022 00:29:41 # Done!
19-08-2022 00:29:41 # Waiting for a change in devices location or for an open window...
19-08-2022 05:00:54 # Your home is in HOME mode, the device Galaxy-S21 is at home.
19-08-2022 05:00:54 # Waiting for a change in devices location or for an open window...
20-08-2022 07:29:41 # Your home is in HOME Mode, the device Galaxy-S21 is at home.
20-08-2022 07:29:41 # Waiting for a change in devices location or for an open window...
21-08-2022 15:13:21 # Are no devices at home, activating AWAY mode.
21-08-2022 15:13:21 # Done!
21-08-2022 15:13:21 # Waiting for a change in devices location or for an open window...
21-08-2022 21:22:28 # Galaxy-S21 is at home, activating HOME mode.
21-08-2022 21:22:28 # Done!
21-08-2022 21:22:28 # Waiting for a change in devices location or for an open window...
22-08-2022 01:26:35 # Bathroom: open window detected, activating the OpenWindow mode.
22-08-2022 01:26:35 # Done!
22-08-2022 01:26:35 # Waiting for a change in devices location or for an open window...
Troubleshooting
If you have a message in your logs that is similar to the following, then you have the problem that the container cannot communicate with the outside world and therefore has no Internet. You can solve the problem with the procedure described below the message.
2023/12/13 09:24:13,stdout, "13-12-2023 08:24:13 # HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=tado-web-app&client_secret=wZaRN7rpjn3FoNyF5IFuxg9uMzYJcvOoQ8QWiIqS3hfk6gLhVlG57j5YNoZL2Rtc&grant_type=password&password=password&scope=home.user&username=Username (Caused by NameResolutionError(\": Failed to resolve 'auth.tado.com' ([Errno -3] Try again)\")"
You must have your docker-compose.yml
customize. Add the following lines under tado_aa:
added:
network_mode: host
ports:
- 443:443
The whole thing should now work. Otherwise, please take a look at the comments, where users are happy to exchange ideas.
Conclusion
It is now very easy for the end user to use Tado Auto-Assist free of charge. This applies to both geofencing and window open detection. The only requirements are a device that runs around the clock and supports Docker. Even a Synology NAS can be used for this purpose.
I hope this free alternative to the expensive subscription will help you reduce your heating costs in the coming winters. If you have any questions or comments, feel free to post a comment.
107 Comments
Joachim · 7. October 2022 at 08:28
Hello Sascha,
great. With your Docker image, this is now running on my Synology DS 920plus.
However, I have a question. Do you know where I can set the time for Docker. In my log it says 08:13:56 for time and in the log column it says 07.10.2022 06:13:56 # DONE!
So thank you for this great post.
Greetings and have a nice day
Joachim
Sascha Brockel · 7. October 2022 at 15:29
You have to add the following to the "environment:": TZ=Europe/Berlin
So then like this:
[email protected]
PASSWORD=password
TZ=Europe/Berlin
TZ here stands for Timezone and I'm assuming you're from Germany 🙂
Benjamin · 21. October 2022 at 11:56
How can I use the whole thing with a Synology NAS? And how does the automation work?
Benjamin · 21. October 2022 at 12:34
Okay, I really could have saved myself the trouble of asking that. This is really foolproof. I simply installed Docker on the NAS in the Synology package center and searched there under Image for tado_aa. Once your Docker image is added just fill in USERNAME and PASSWORD (also added TZ as in the answer above). Once the process is started the automation runs all by itself and the geofancing and window open setting is executed. Thanks that thanks to you this bad habit of Tado for the service to ask extra money has an end!
Sascha · 21. November 2022 at 16:21
Since yesterday, the page auth.tado.com needed for login seems to be unreachable. Is there another way to connect?
Sascha Brockel · 21. November 2022 at 16:42
Hey,
I have just updated the Docker image. Maybe that helps. Everything works fine for me. Once times
docker compose -f docker-compose-tado.yml pull
. So just as an example. Stop container, pop new image and start container again. Feel free to give feedback.Benjamin · 21. October 2022 at 12:35
This is really foolproof. Just installed Docker on the NAS in the Synology package center and searched for tado_aa under Image. Once your Docker image is added just fill in USERNAME and PASSWORD (also added TZ as in the answer above). Once the process is started the automation runs all by itself and the geofancing and window open setting is executed. Thanks that thanks to you this bad habit of Tado for the service to ask extra money has an end!
Marc Hagemann · 29. October 2022 at 14:26
Is there a tutorial somewhere (foolproof) to get this working on a Raspberry Pi 2b. I still have one unused. But I am not an expert Linux
Sascha Brockel · 29. October 2022 at 17:29
Of course, the RPI2b is already a bone. But as long as it can run Docker or a Python script, that's possible. This is already a special case somewhere. Unfortunately, it can only be done perfectly foolproof for a very specific example. Say you may have to flash an image on which you can also install Docker and if that is done, then this tutorial is enough. I always think something like a Docker installation from me would be superfluous, since there are umpteen other sources that explain it, but it would probably sometimes be better to write another article about it and link it here. I'll take a look when I get a chance.
Marc Hagemann · 3. November 2022 at 07:46
Now everything worked with a Raspberry Pi 2b. Installed Docker incl. Portainer and created the stack according to your instructions. Contrary to the instructions in your Youtube video, I had to configure username and password not in the advanced settings, but as in your example above, directly in the main stack. Otherwise I always got the message that the credentials were wrong.
Danny · 9. November 2022 at 17:23
Hello Sascha,
I get the following error on the Raspberry after I execute the first command
docker run -name tado_aa -restart always -e USERNAME=YOURUSERNAME -e PASSWORD=YOURPASSWORD saschabrockel/tado_aa:latest
Error:
Traceback (most recent call last):
File "/app/tado_aa.py", line 10, in
import logging
File "/usr/local/lib/python3.10/logging/__init__.py", line 57, in
_startTime = time.time()
PermissionError: [Errno 1] Operation not permitted
Can you help there?
Thank you
Sascha Brockel · 18. November 2022 at 07:16
Hey Danny, this seems very specific. Off the top of my head, here's what I found on StackOverflow: https://stackoverflow.com/questions/70195968/dockerfile-raspberry-pi-python-pip-install-permissionerror-errno-1-operation
Try what is said in the solution. I think that should be the solution.
Many greetings
Thomas Krajcsy · 17. November 2022 at 12:53
Hi Sascha, thanks in advance for the ingenious Docker solution.
I have a tado app question: how to turn on Auto-Assist in de app without signing up for a plan (paid) ... does tado really want to collect 2,99€ per month from each family member? Once I turned on Auto-Assist by taking 1 week free plan ... and then cancelled in time.
Thank you,
Thomas
Sascha Brockel · 18. November 2022 at 07:12
Hello Thomas, this may be a little misleadingly worded. Namely, it is the case that the Auto-Assist in the app still remains set to "Inactive". But that doesn't matter, since the Docker container is effectively the Auto-Assist. Just self-hosted. So you can safely leave everything on Inactive there. Many greetings.
Sascha Brockel · 19. November 2022 at 17:12
I have to correct myself. Tado seems to have changed something. For me, it no longer works as it should. But I did not notice, because I was not there. Anyway, I get notifications. In the logs of the Docker container everything still looks good. But there was also an update of the script. I will bring it to Docker as soon as possible as well. Then you have to stop or completely shut down the container once and then start or pull it again to get the latest version.
Thomas · 17. November 2022 at 15:52
Hello Sascha, first of all THANK YOU for the ingenious Docker solution and the really understandable instructions for installation. I have a tado installation running at home, but with a V2 run. My brother in law has now also bought tado, but with V3 ... therefore your solution 😉
Unfortunately, I now have the following problem: How can you enablen the Auto-Assist on the iPhone in the tado APP, without having to opt for a paid plan? My brother-in-law has done this, with this 7-day trial version, which he canceled in time again, so we could try the "self-hosting" only after 7 days - that works so far, but are now facing the problem that his wife can not activate Auto-Assist in the same household. Does this mean that tado requires each household resident this 2.99€, ie for a 4 person household 12€ / month?! Or is there something wrong? Is there a way to activate Auto-Assist without a plan? Does every household resident have to buy a plan and then cancel it right away in order for the APP to activate Auto-Assist? We have now tested the situation so that the cell phone controls the scene without Auto-Assist. SMSs continue to come?! -> If you turn off or log off the phone without AA, everything works as you described.
Do you have an idea?
THANKS in advance!
Thomas
Sascha Brockel · 21. November 2022 at 16:50
I also noticed that Tado has adjusted something there. You can probably skip that part now. The logs for me say that it still works. I had it but actually also that the notifications still came to the phone. I just updated the Docker image though. Maybe that will change something. So the auto-assist may safely stay on inactive. So no worries. Nothing with paying. I think you meant with SMS the notifications. That with the trial version was in any case unfortunately not correct. But this is all new now. Update the Docker image to the latest version. You can do that for example with
docker compose -f docker-compose-tado.yml pull
docker. Here, docker-compose-tado.yml stands for the name of your compose file. See how it behaves after the update. Feel free to comment again.Many greetings
Torben · 3. December 2022 at 19:01
Hello Sascha,
first of all, thank you for the detailed instructions. Unfortunately, I can not get it to run. I have to admit that I am a complete newbie in this field. I have a Raspberry Pi Zero 2W on which I installed Docker & Portainer, but I can't create a stack there. I always get the meaningless error "portainer failed to deploy stack" without any details.
When I run the run script the container is shown in portainer, but nothing is controlled at Tado and I don't get any info in the container log.
When running the command, I also get the following warning:
WARNING: The requested image's platform (linux/arm/v7) does not match the detected host platform (linux/arm/v6) and no specific platform was requested
Could it be because the pi only runs arm/v6?
Thank you very much for your help,
Torben
Sascha Brockel · 4. December 2022 at 00:25
Hello Torben, you have recognized that correctly. But I took care of it directly. I thought there are hardly any devices left in use that use arm/v6. Try it again now. The image with the latest tag now also contains the image for the platform arm/v6, i.e. for you. In Portainer just delete container and image again and then start compose again. Many greetings
Torben · 4. December 2022 at 13:39
Hello Sascha,
wonderful, thank you for your quick help! It works
Just to understand, I only got it to run with the Docker Run script. I still could not create a stack. I get the hint about arm/v6 also with the portainer installation. I think it is because of this? I have installed an older Portainer version as a test. I still get the arm/v6 message, but at least the error message during stack deploy contains more information (problem with version "3")? What is the advantage of creating a stack? It works the same way via the run script?
Thanks for your quick help :)!
Greeting,
Torben
Sascha Brockel · 5. December 2022 at 12:11
Ah okay, then Portainer is probably no longer designed for the old architecture. But that doesn't matter either. The stack and Portainer would just be the advantage that you can manage everything directly from a user interface and don't have to log into the server and mess around with command lines. So everything fits as you made it. Many greetings
Victor · 20. December 2022 at 12:37
Hello,
Thank you for the script. It is working very nice in Synology NAS using docker. Only two questions..
1) I have detected in the logs... it creates an entry when a window open is detected and active "OpenWindow mode"... but when the window is close and the valve is again active... in the logs is not reflected in any way... this is normal? It is possible to modify it to add log entries when the valve is again active?
2) It is possible to modify the time of checks, for example to determine the amount of seconds to check if a window is open or not and the same for geofecing?
Thank you
Sascha Brockel · 22. December 2022 at 02:37
Hey there. Yes, it is true that there are no logs about it when OpenWindows Mode is disabled. The way I see it, the whole thing can't be logged that easily. You would have to tell me if after an open window is detected, "Done!" is logged directly or later when you close the window. Otherwise "Done!" would be the indicator, but I think it only says that something was done after the API call.
As for the check interval, I can help though. The interval is set to 10 seconds by default. I guess that should be enough for you. I can also make the value settable through the Docker variables, but I think a value lower than 10 seconds has no advantages.
Kry · 28. December 2022 at 14:53
Hi, is it possible to leave only the open window detection active and deactivate the geofencing?
Sascha Brockel · 28. December 2022 at 15:26
Hey, currently it is not possible. But I'm pretty sure it is possible to adjust the script with a condition to make it work.
Rene · 28. November 2023 at 10:41
Hi Sasha,
Where and how can I add the conditions to the script? I would also be interested in switching off the geofencing, because I don't want to share the heating control and therefore the geofencing with every family member (e.g. children) 🙂
Sascha Brockel · 2. December 2023 at 21:46
Hello Rene,
I will publish a new version today or tomorrow. Then just pull it. The variables will be
GEOFENCING
andOPENWINDOWDETECTION
which can be set to true or false.VG Sascha
Strahil Nikolov · 30. December 2022 at 22:06
Hey Sasha,
I recently got V3 and the docker image sounds great.
Have you tried running it in Kubernets or Openshift ?
I doubt there will be any problems, but it's worth asking.
Sascha Brockel · 30. December 2022 at 23:44
Sorry, I have never tried anything other than Docker with this image.
Strahil Nikolov · 30. December 2022 at 23:32
I tried to run the container in Openshift and it seems to be running, but it can't write to the log .
Usually all logs should go to Docker/Podman/K8S/Openshift. Maybe you should disable the log file by default ?
Also, you might consider changing the path to pwd or /var/log as it doesn't make sense to log to /l.log
Sascha Brockel · 30. December 2022 at 23:43
Hi, I never worked with OpenShift. I agree with you about the log path. I just made the script available for Docker and didn't adjust much else. That is also the reason for the path. My intention was just to get it running as an image as well and no enhancements.
Strahil Nikolov · 1. January 2023 at 01:34
Based on the current situation, I guess that the only features we miss are 'Preheat Before Arrival' and 'Energy IQ', right ?
Sascha Brockel · 1. January 2023 at 23:35
I guess you are right. You can still influence Preheat Before Arrival by changing the radius of the location-based control/geofencing of your home area.
Strahil Nikolov · 2. January 2023 at 00:43
Hi Sasha,
I have created a little repo that is suitable for S2I deployment of the script at https://github.com/hunter86bg/tado_aa
Of course, even an UBI9 pod should do the job.The benefit is that if the base builder image changes (and it eventually will be updated) - the build process can be triggered to update the pod.
In my case I'm also using a web hook to notify OKD to trigger a new build , which will automate the whole processes when a patch is created.
If I have some time, I will try to create some DockerFiles for Alpine and UBI9.
Strahil Nikolov · 16. January 2023 at 06:28
Updated the tado script a little bit more (it responds to http request for healtchecking) and I even managed to setup Google Cloud Build & Cloud Run.
Theoretically the Cloud Run free tier should be enough to host the solution without incurring charges. I will provide more details if everything goes as expected.
Tom · 21. January 2023 at 16:08
The tado script works perfect. And it is very interesting to see the further development of running the script with cloud run.
Strahil Nikolov · 13. February 2023 at 22:00
The bill (past 30 days) from Cloud Build, Cloud Run and Cloud log is $0.19 (discount of $1.27).
When I have some time, I will update the readme with detailed instructions how to setup in the GCP (or even better, share a terraform to deploy it).
Strahil Nikolov · 24. March 2023 at 07:51
I just checked my Google Run/Build/Logs bill and for 2 months the cost is $045 which is around $0.22 per month.
Strahil Nikolov · 24. March 2023 at 07:52
I've logged my notes on how to deploy in Google Cloud Run at https://github.com/hunter86bg/tado_aa/blob/master/README_GoogleCloud.md
Florian · 20. February 2023 at 16:39
Hello, thanks for all the effort that went into this.
I've been running the container for a while with no problems at all, but now I'm running into authentication issues. It looks to me like Tado has disabled the API "public-api-preview". Can you confirm this?
20-02-2023 15:35:16 # HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw&grant_type=password&password=XXXXXXXX&scope=home.user&username=XXXXXXX(Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Try again'))
Connection Error, retrying in 30.0 sec..
Direct call in the browser:
{"error":"method_not_allowed","error_description":"Request method 'GET' not supported"}
Martin · 28. February 2023 at 10:22
Hi Sasha,
What changes did you make in the Python script? I want to add an additional environment variable for GeoFencing to disable it independent of the window mode, but I don't know if you have any other changes in there via USERNAME/PW. P.S. would vlt also a good option for your container 😉
Best regards
Martin
Sascha Brockel · 28. February 2023 at 19:07
Hey Martin,
except for the environment variables, there are actually no customizations. I know it could be made more customizable, but so far no one has asked for it and I haven't needed it myself. And especially for non-technical users, the motto the less the better is simply true 🙂
Martin · 5. March 2023 at 21:11
Hi Sasha,
thank you for the work you have put in.
Unfortunately it does not work for me, I get the following error message:
05-03-2023 20:03:36 # Login error, check the username / password !
05-03-2023 20:03:37 # Login error, check the username / password !
05-03-2023 20:03:38 # Login error, check the username / password !
05-03-2023 20:03:39 # Login error, check the username / password !
05-03-2023 20:03:40 # Login error, check the username / password !
05-03-2023 20:03:43 # Login error, check the username / password !
05-03-2023 20:03:46 # Login error, check the username / password !
05-03-2023 20:03:54 # Login error, check the username / password !
05-03-2023 20:04:07 # Login error, check the username / password !
05-03-2023 20:04:33 # Login error, check the username / password !
05-03-2023 20:05:25 # Login error, check the username / password !
05-03-2023 20:06:26 # Login error, check the username / password !
Did the whole thing as described in your video via Portainer, running on AMD64 in Unraid Docker. I also tried to enter the Tado username instead of the mail address in USERNAME. Same result. I also changed my password and took out a special character - doesn't work with that either. What am I doing wrong?
Thanks a lot
Love greetings
Martin
Sascha Brockel · 5. March 2023 at 21:17
Hey Martin, that's a good idea with the special character. Had such a problem also when I had an apostrophe / quotation mark in the password. Your problem will be what I had mentioned in the video. It won't work with portainer if you do it via this environment variables function/section. Write the variables directly into the docker-compose under the category
environment:
and it will work. Feel free to give feedback. LGMartin · 8. March 2023 at 23:39
Evening Sascha,
thanks for the quick help. Have overlooked the forest for the trees, am actually not such a DAU 🙂 .
Runs now, thank you :-))
Simon · 9. March 2023 at 10:28
Hello,
I am relatively new to Python and would like to try running the window open detection script in Python using a Raspberry Pi.
The connection to Tado seems to be established by the script, I can display my rooms. Unfortunately, this error occurs afterwards:
Waiting for an open window..
Living room
Tado' object has no attribute 'getOpenWindowDetected'.
Connection Error, retrying in 30.0 sec..
I can't find the attribute "getOpenWindowDetected" in the Tado Class in the interface file either. Can someone help me with this?
Thanks and greetings
Simon
Simon · 10. March 2023 at 17:48
The error has already been found in the meantime and the script works wonderfully, thank you!
F.K. · 12. March 2023 at 07:50
Is there any way to explain this or provide apps without having to have a degree in computer science to implement it?
Sascha Brockel · 13. March 2023 at 12:23
Moin, so you don't need a degree for this in any case. You can quickly google it even without knowledge. How to install Docker, for example, is sufficiently shown on YouTube. The whole thing cannot be provided as a kind of app. The most important condition remains that the service is run on something that runs 24/7, so that the changes are noticed. And servers of any kind are best suited for this. There is an Always Free Tier server at Oracle.
Strahil NIkolov · 24. March 2023 at 07:55
If you google a little bit more, you can even deploy it to Google Cloud and the costs are quite affordable (around $0.22 per month).
Daniel · 22. March 2023 at 20:10
Hi Sascha!,
thank you a lot for your great work!.
could it be possible to generate the docker on Windows?, I run the current image but it consumes more than 2Gb of RAM and I think that if the docker is created on Windows it will be no neccesary to use the Linux Kernel emulation (WSL 2).
Thanks in advance!
Sascha Brockel · 23. March 2023 at 00:09
Hey Daniel, yes it would be possible. So far, no one has asked for it. Exactly, if the image is created directly for Windows, then you don't need WSL2. I will comment if I have set up the image for Windows as well.
Unfortunately, I don't think it's that easy, since everything is designed for Linux. For example, Python Alpine is only available for Linux. If you have a Dockerfile that makes it work with Windows, feel free to post it here. It's definitely a bit of work. Many greetings!
Maurice · 25. September 2023 at 14:07
Hi Sasha,
First of all, thank you for the comprehensive guide and writing this in the first place!
I've managed to get a docker-instance running which I can approach via Portainer.
When I start the container, I've run into the same problem as Florian (on the 23rd of February):
(Username, password and secret have been redacted, username shows a instead of the @ sign in the url)
25-09-2023 11:07:12 # HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=[SECRET]&grant_type=password&password=PASSWORD&scope=home.user&username=USERNAME
(Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Try again'))
Is this an issue on my end, or did Tado change something?
Sascha Brockel · 26. September 2023 at 01:24
Hey there. Mine is still working. I know that there were problems when I had some signs in my password like @ or " if I remember it correctly. It's worth checking it in your case.
is the normal URL encoding for
@
so don't worry.Maurice · 26. September 2023 at 16:02
Thanks for the swift reply!
I've changed my Tado password to only contain uppercase, lowercase and numbers to test, but the message doesn't change.
Furthermore, I've made sure that the password exactly matches the one for Tado, without any random tabs or spaces, but it's just the same message every 30 seconds.
After deleting the container and re-building it, the same message keeps appearing 🙁
As far as I can tell, the connection simply fails, the container isn't running in a VLAN, and the error seems to tell that the connection is refused due to too many retries. Though the first time I tried it already said that; that's why I think Tado might be up to something. I suppose it's just my set-up
Maurice · 30. October 2023 at 10:04
Okay so I've solved the error and it's working as it should!
If anyone else has this issue or error message, it means that the container can't reach the internet.
Apparently I've got a complex situation in my Docker, but what fixed it was constructing the docker compose file the same way Sascha has it, but adding the network_ mode and ports to it in this location:
restart: always
network_mode: host
ports:
- "443:443"
After that it's working and I'm very grateful for this solution!
Philipp · 10. October 2023 at 23:15
Hello Sascha,
First of all, thank you for the great write-up and compilation.
Does the code also take into account that if you are relatively close to home, the heating is only moderately throttled? Whereas the heating is also throttled more strongly at greater distances? At least, this is how the "official" Auto-Assist works.
Thanks in advance and best regards!
Sascha Brockel · 11. October 2023 at 00:29
As far as I know, when it detects that you are AWAY, it switches off completely and not depending on the location. There is also a revised version of the script, but I haven't had a chance to install it. Maybe the function is there. Once I do, I'll update the post.
Adrian · 17. December 2023 at 14:12
Hi, I'm the "creator" of the script, when you leave the "home zone" set in the app it activated the away mode, you can set in the app that in the away mode to only decrease the temperature or to increase it, you chose what is happening in the away mode, the script only turns it on or off.
The "official" one is doing the same because they are the same thing.
Good luck and I wish you all a warm winter.
Alexander · 31. October 2023 at 21:44
I recently installed PiHole and now I get the following error message. Unfortunately, the error can not be fixed even if PiHole is disabled in the portainer.
31-10-2023 20:43:45 # HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api-preview&client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw&grant_type=password&password=XXXXXX&scope=home.user&username=XXXXX (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Try again'))
Connection Error, retrying in 30.0 sec..
Drew · 2. November 2023 at 21:26
I am new to this and I am trying to get this working on a windows PC using Docker but i just can not get it to work. Is there a step by step i can follow that can get me up and running on a windows pc.
Thanks in advance.
Sascha Brockel · 4. November 2023 at 00:53
Unfortunately, there are no instructions for this. But it is basically very similar. You need a Windows PC that runs 24/7. Install Docker Desktop there and then run docker-compose.yml.
Drew · 5. November 2023 at 17:49
Hi, One thing i have noticed is that window detection doesnt appear to be working. For exampl, i have had the door open today for quite some time and it didnt trigger anything in the log. Geofencing is flawless, its just windows detection.
Drew · 2. November 2023 at 22:41
Amazing work. I got it working instantly when i used the docker compose script instead of trying to run it manually in docker. Thanks for sharing.
Stephan · 5. November 2023 at 16:14
Many thanks for your efforts! I have now installed it on the Synology NAS, just as Bejamin described. Really only a matter of minutes. Thank you very much!
Christian · 13. November 2023 at 21:41
Tried this on an old Raspberry pi 2 and it does seem to work (I.e it detects that I'm away and turns off my warm water) but does not seem to turn off the central smart thermostat. That one stays on and I get the standard phone message asking me if I want to turn down the heating. Not sure if that is also supposed to god down autmatically...
Adrian · 17. December 2023 at 14:17
The script turns on or off the away mode, you chose what it should happen in the away mode from tado app.
Adrian · 30. November 2023 at 14:25
Hello. Thanks for the docker image. It's very usefull. I would like to know how this docker image should be run in case of having multiple users.
If one or two or three of the users are at home i would like not to turn off. I would like to turn off only if all users are away. How i specify all the users?
Thanks in advance.
Sascha Brockel · 2. December 2023 at 21:48
Hey there,
the script knows if somebody is at home. It only turns on the AWAY mode if there is less than one device at home.
Adrian · 17. December 2023 at 14:21
Every home member should have the tado app installed on their phones, location on (gps) and give permission to tado app to access location, like that script knows if they are home or not.
Tristan · 1. January 2024 at 18:24
Since I am a total noob in the whole topic and I only managed to get it halfway running on my Raspberry Pi4, I now have a question:
when I enter the command docker compose -f docker-compose-tado.yml pull
I get the answer no such file or directory
In the logs of the container there is status code 200 where I don't think it works properly
I would be very grateful for your help.
And otherwise top video is only as a newcomer in the matter all very much
Justin · 9. January 2024 at 11:06
Hello, since today tado_aa no longer works for me, nothing has been changed, here is the error message: HTTPSConnectionPool(host='auth.tado.com', port=443): Max retries exceeded with url: /oauth/token?client_id=public-api- (Caused by NewConnectionError(': Failed to establish a new connection: [Errno -3] Try again'))
Connection Error, retrying in 30.0 sec..
Murat · 14. January 2024 at 20:17
Reinstall or enter these parameters in your current session:
restart: always
network_mode: host
ports:
- "443:443"
That's how it works for me.
Justin · 17. January 2024 at 18:45
Hello Murat, I have already done everything and still can't...
Sascha Brockel · 17. January 2024 at 19:59
Hello Justin. Try the new method I showed you a few days ago. Haven't gotten around to writing a blog post yet: https://www.youtube.com/watch?v=WIGPsjxkRHw
Murat · 14. January 2024 at 20:13
Hello everyone. Is there a way to use the iPad for geofencing? My son never takes his iPhone to school, but he does take his work iPad. Is there a chance that tado will react to the fact that the iPad has left the wifi? We had installed it on the iPad, but the deactivation did not work. Thank you
AelBundy · 10. March 2024 at 09:09
Hello Sascha,
Is it possible to set up your version for multiple users or do you have an alternative solution?
Would like to use it as a Docker container on a Synology NAS.
Thank you in advance and keep up the good work 🙂
Sascha Brockel · 10. March 2024 at 12:20
Hi 🙂 So either you have to use the method from the new video (https://www.youtube.com/watch?v=WIGPsjxkRHw), where you can directly integrate several accounts, or you would simply have to duplicate my container. In other words, create several containers with the same image, different names and different login data.
Many greetings
AelBundy · 10. March 2024 at 15:08
Moin,
Thank you for the quick response.
If I duplicate the container and enter a 2nd user (my wife),
Does the Away Mode also work when I am out of the house and my wife is at home?
Means that one smartphone would be away and one @ Home.
Then, of course, the Auto Away function should NOT be activated...
Adrian Slabu · 10. March 2024 at 15:41
Away mode will not trigger if your wife is at home.
AelBundy · 10. March 2024 at 15:53
Dear Adrian,
thx for quick reply.
Sascha Brockel · 10. March 2024 at 15:45
No. The most you could do is deactivate location sharing for your wife's Tado app. That would be a workaround. Simply remove the device from consideration.
NickP · 4. April 2024 at 12:40
Hi Saacha,
Thank you; I now have this running in a container on Synology.
I noticed the following and wondered if these were environment functions that could be set in the YAML file? If so, could you say how please?
minTemp = 5 # minimum allowed temperature, applicable only if enableTempLimit is "TRUE"
maxTemp = 25 # maximum allowed temperature, applicable only if enableTempLimit is "TRUE"
enableTempLimit = True # activate min and max temp limit with "True" or disable it with "False"
Thanks!
NickP
Sascha Brockel · 5. April 2024 at 04:26
Hey there. It's possible but only with the other image that I mentioned in the second video of Tado Auto Assist for free here: https://www.youtube.com/watch?v=y40D6y2RvhY
Murat · 25. April 2024 at 17:46
Hello Sascha,
For some time now, I have been informed by the tado app that I am leaving or arriving at home, but I always have to switch to the mode manually. In other words, confirm by pressing a button. The app used to switch automatically. The information also came, but switching on or off was done on my own. Have I changed something in the app (but can't find anything!) or has something changed at tado?
Thank you ... Murat
Sascha Brockel · 26. April 2024 at 01:57
The notification thing happens to me from time to time, but when I go into the app, it's already switched over. This happens when the script/container hasn't switched fast enough and the tado API has already sent the notification to your cell phone. On Android it goes away by itself, but on the iPhone the notification remains and is confusing and annoying... but you don't want to switch it off completely. But everything definitely still works.
Murat · 26. May 2024 at 21:19
Thanks for the answer Sascha. How do you do it in summer? Do you pause tado_aa in Docker or do you stop it?
Sascha Brockel · 27. May 2024 at 16:46
In fact, I just leave it running. You can of course also switch it off, but the CPU / power consumption is minimal.
Jannis · 5. October 2024 at 14:27
Thanks for this nice Docker image, integration went via Portainer.IO without any problems.
I know you haven't changed the script much. But maybe you have the ability, time and desire to do so 🙂
The following is on my wish list: "Implement MQTT to pass on various statuses to other systems, presence and absence, window open, current room temperature and current room status / valve status".
If I could then change values such as the number of degrees in the individual rooms via MQTT, it would be a dream come true.
I still have one question: "Temp Limit is OFF, min Temp(5) and max Temp(25)" how do I activate this / set the values? Are these two environment variables?
Thank you & regards
Jannis
Philipp · 9. October 2024 at 01:16
Hello Sascha,
I upgraded from the former tadoV3 to tadoX today and changed my hardware.
So far, the AA has run flawlessly via Raspberry Pi.
Now, however, the window detection no longer works. More precisely, the script no longer switches off the thermostats and the pop-up on the cell phone remains active.
Do you have any ideas? Window detection is active in the app settings for each room.
When upgrading the hardware to tadoX, the home would have to be deleted and recreated.
I cannot recognize an error in the log. And the geofencing also works as intended by the script and then switches on/off.
But not in connection with windows...
Sascha Brockel · 9. October 2024 at 20:53
Exactly the same version of the Docker image? Unfortunately, I don't have Tado X and haven't yet heard any reports from others with the same problems as you. Sounds more like the script can no longer cope with it. What do the logs from the Docker container say? Does it recognize the open window, i.e. does it react? I think in newer versions I also created a variable to activate window detection. Maybe it's related to that, but I don't think so.
Philipp · 12. October 2024 at 08:23
In fact, I ended up returning tadoX. Too many promises regarding the Matter/Thread standard were insufficiently kept.
Now I'm back on the road with the old thermostats. So: delete at home and reconfigure everything.
I left the docker image running unchanged and untouched the entire time.
Now everything works as desired with Tado V3.
So somewhere, TadoX must be using an API that has been modified - even if only slightly.
The logs were inconspicuous and signaled all the time that changes (openwindow, geofencing) were being waited for.
Pascal · 4. November 2024 at 15:14
Hi everyone, unfortunately I have this problem too. Tado X and my logs are also just waiting for a change. I have read that PyTado has released a new version with support for Tado X. Could something be put together? 😀 I would be very happy if I could finally use my Tado X with an AA
Sascha Brockel · 4. November 2024 at 16:13
I have just published an update. Please report if it works. Otherwise I'll check again. Either the day
latest
use or day11-04-2024
(sosaschabrockel/tado_aa:11-04-2024
orsaschabrockel/tado_aa:latest
)Pascal · 4. November 2024 at 16:31
Wow, many thanks for that 🙂 Unfortunately I'm getting a connection error:
04-11-2024 16:28:23 # Starting Tado Auto-Assist...
04-11-2024 16:28:23 # Geofencing is OFF and Open Window Detection is ON
04-11-2024 16:28:23 # Temp Limit is OFF, min Temp(5) and max Temp(25)
04-11-2024 16:28:24 # Waiting for an open window...
04-11-2024 16:28:25 # 'id'
Connection Error, retrying in 30.0 sec..
Now nothing happens anymore. Docker runs in Unraid and was installed in the same way as the previous version.
Sascha Brockel · 4. November 2024 at 16:53
Are you sure your credentials are correct? I just tested it myself and it works. But there were already some people here who had the connection error problem. The line # 'id' irritates me.
Pascal · 4. November 2024 at 17:00
The data is correct to 100% (special characters in the PW bad?) but I could also imagine that it does not find/recognize the zone (for whatever reason) I also had a zone problem with PyTado earlier and then had all zones displayed for information, which also worked. But unfortunately I don't know exactly what's going on 🙁 Can I test something that will help me/you?
Pascal · 4. November 2024 at 17:04
I have activated geofencing. Looks to me like it has logged in but cannot find any devices:
04-11-2024 16:51:45 # Starting Tado Auto-Assist...
04-11-2024 16:51:45 # Geofencing is ON and Open Window Detection is ON
04-11-2024 16:51:45 # Temp Limit is OFF, min Temp(5) and max Temp(25)
04-11-2024 16:51:46 # Your home is in HOME Mode but are no devices at home.
04-11-2024 16:51:46 # Activating AWAY mode.
04-11-2024 16:51:46 # Done!
04-11-2024 16:51:46 # Waiting for a change in devices location or for an open window...
04-11-2024 16:51:47 # 'id'
Connection Error, retrying in 30.0 sec..
Sascha Brockel · 4. November 2024 at 17:08
Yes, you're right. That really looks like it. In my case, it finds both an iPhone and a Samsung Android smartphone. You definitely need to have location-based control activated in the Tado app. Tado always needs access to your location, otherwise it won't work.
My configuration:
docker run
-d
--name='tado_aa'
--net='unraid'
-e TZ="Europe/Berlin"
-e 'USERNAME'='[email protected]'
-e 'PASSWORD'='XYZ'
-e 'GEOFENCING'='true'
-e 'OPENWINDOWDETECTION'='true'
Logs:
04-11-2024 17:04:14 # Starting Tado Auto-Assist...
04-11-2024 17:04:14 # Geofencing is ON and Open Window Detection is ON
04-11-2024 17:04:14 # Temp Limit is OFF, min Temp(5) and max Temp(25)
04-11-2024 17:04:14 # Your home is in HOME Mode, the devices iPhone 15, Samsung Galaxy S24+ are at home.
04-11-2024 17:04:14 # Waiting for a change in devices location or for an open window...
04-11-2024 17:04:26 # iPhone 15, Samsung Galaxy S24+ are at home, activating HOME mode.
04-11-2024 17:04:26 # Done!
Pascal · 4. November 2024 at 17:22
At least it recognizes my device now, but it still won't go any further 🙁
04-11-2024 17:21:20 # Starting Tado Auto-Assist...
04-11-2024 17:21:20 # Geofencing is ON and Open Window Detection is ON
04-11-2024 17:21:20 # Temp Limit is OFF, min Temp(5) and max Temp(25)
04-11-2024 17:21:21 # Your home is in HOME Mode, the device Nico is at home.
04-11-2024 17:21:21 # Waiting for a change in devices location or for an open window...
04-11-2024 17:21:22 # 'id'
Connection Error, retrying in 30.0 sec..
Stephan · 27. October 2024 at 01:17
Hi Sasha,
I only recently came across this page. I am currently using a Raspberry Pi 1 B+ v1.2 (ARMv6), unfortunately I get the following message when pulling your docker image:
"no matching manifest for linux/arm/v6 in the manifest list entries"
In a comment above I read that you have adapted the image for a Raspberry Pi Zero 2W (also with ARMv6), but it doesn't really want to do that for me.
Another question: ARMv7 was apparently only available for the first generation Raspberry pi 2. The models after that have ARMv8 ... is the image "upwards compatible"? I read different things on the internet. Only if I get the 4th or 5th model, will it still work with your image?
Greetings & thanks
Stephan
Sascha Brockel · 27. October 2024 at 01:37
Hi Stephan, I think I tried it for ARMv6 back then, but it was not easily backwards compatible and since hardly anyone still uses this architecture, I let it go. I don't see it in my DockerHub either. Maybe something was adjusted there too, it's been a long time.
The Raspberry Pi 3B that I had at the time also has ARMv7. I don't know about upward compatibility. So far, no one has complained or had any problems. If you get it and it really doesn't work, then I'll make sure that ARMv8 also works. That's where the upgrade makes sense.
Many greetings
Nico · 3. November 2024 at 15:15
Hi and a big thank you for your Docker. I treated myself to the Tado X at PrimeDays because I think it looks really chic. Unfortunately, I'm extremely annoyed about the AutoAssist PayWall, if I had known that beforehand I definitely wouldn't have chosen the manufacturer 🙁 Well, now I wanted to get started yesterday and build something with HomeAssistant, but I realized that Tado X isn't implemented that way yet. I then came across PyTado and thus your image. I have just loaded it under Unraid and started it. However, as I feared, probably without Tado X support 🙁 Unfortunately, the window open detection does not work here. Or maybe it's just not working for me? Is there anyone who has got it working? Best regards Nico
Sascha Brockel · 4. November 2024 at 16:13
I have just published an update. Please let me know if it works. Otherwise I'll check again. Either the day
latest
use or day11-04-2024
(sosaschabrockel/tado_aa:11-04-2024
orsaschabrockel/tado_aa:latest
)Andreas · 7. November 2024 at 17:52
Hello Sascha, I have implemented the whole thing via Portainer on my Synology NAS according to your instructions. Yesterday everything was fine, then I did the update that was offered to me in the Synology container manager. Now I can see this in the log:
07-11-2024 06:35:06 # Starting Tado Auto-Assist...
07-11-2024 06:35:06 # Geofencing is ON and Open Window Detection is ON
07-11-2024 06:35:06 # Temp Limit is OFF, min Temp(5) and max Temp(25)
07-11-2024 06:35:07 # Your home is in AWAY Mode and are no devices at home.
07-11-2024 06:35:07 # Waiting for a change in devices location or for an open window...
07-11-2024 06:35:08 # 'id'
Connection Error, retrying in 30.0 sec..
07-11-2024 12:34:38 # Starting Tado Auto-Assist...
07-11-2024 12:34:38 # Geofencing is ON and Open Window Detection is ON
07-11-2024 12:34:38 # Temp Limit is OFF, min Temp(5) and max Temp(25)
07-11-2024 12:34:38 # Your home is in AWAY Mode but the device Magictrack 5 is at home.
07-11-2024 12:34:38 # Activating HOME mode.
07-11-2024 12:34:38 # Done!
07-11-2024 12:34:38 # Waiting for a change in devices location or for an open window...
07-11-2024 12:34:40 # 'id'
Connection Error, retrying in 30.0 sec..
any idea why all of a sudden the connection error ?
I have one more question regarding Portainer. In the video you enter the variables USERNAME and PASSWORD in Portainer in Advanced Mode. I did this directly in the editor.
Does that make a difference?
Thank you very much for your project ;-))
Greetings Andreas
Sascha Brockel · 8. November 2024 at 01:44
Hello Andreas,
It's best to go back to the old image with tag 10-29-2023. It's difficult for me to say what the problem is. I have tested it myself and have not been able to reproduce the problem. But I'm also surprised that no device is found (ok, I've just seen in the following logs that it says Magictrack 5). Using the editor and directly has often caused problems for me. I cannot explain the connection error.
Alex · 8. November 2024 at 16:09
Hi everyone,
with the Latest Tag I had the same error as Andreas with the connection error.
The 10-29-2023 works with the Tado X