Tado Thermostat plugin

For heating/cooling related questions in Domoticz

Moderator: leecollings

User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tado Thermostat plugin

Post by waltervl »

jannl wrote: Friday 04 April 2025 8:11 knip

Edit: obviously I asked the wrong question. I had to re-enable Tado through the URL, when is this needed? Every restart?
Probably when you restart Domoticz after more than 30 days as the token is valid for 30 days.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
jannl
Posts: 823
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.5.x
Location: Geleen
Contact:

Re: Tado Thermostat plugin

Post by jannl »

hm, but no. First token was at 31 march, so that is not it.

Wonder if it is possible to automate that......
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tado Thermostat plugin

Post by waltervl »

... When Domoticz is started another time, it will use the Refresh Token to get a new Access Token
The Refresh Token is valid for 30 days, so you need to start Domoticz within 30 days

In case there is a problem with the refresh token (30 days, or revoked), the Login message is presented again to the end user and you need to go to this URL again
It should work when token is from 31 March
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
gizmocuz
Posts: 2707
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Tado Thermostat plugin

Post by gizmocuz »

You should not need to refresh the token yourself if you keep Domoticz running.
If you stop Domoticz, wait 31 days, and start Domoticz again, then you need to do the URL thing again.
(Domoticz will tell you this every minute in the Log)
Quality outlives Quantity!
reinestein
Posts: 17
Joined: Friday 01 April 2022 8:52
Target OS: NAS (Synology & others)
Domoticz version: 2023.1
Contact:

Re: Tado Thermostat plugin

Post by reinestein »

I get this error:
Tado: Failed to retrieve API environment from https://app.tado.com/env.js

Running domoticz 2025.1 build 16672 on docker/unraid. I run the stable version not the latest, because of my Tuya plugin not working.

Any thoughts?
ViperAppie
Posts: 1
Joined: Thursday 22 May 2025 8:46
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Tado Thermostat plugin

Post by ViperAppie »

Got the same error since yesterday.

ado: Failed to retrieve API environment from https://app.tado.com/env.js

Following the post....
Last edited by ViperAppie on Thursday 22 May 2025 8:48, edited 1 time in total.
User avatar
gizmocuz
Posts: 2707
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Tado Thermostat plugin

Post by gizmocuz »

Seems TADO removed an environment API call.

I removed this call, and hard coded the endpoint in beta 16703 (others seem to do this as well)
All seems to be working again now
Quality outlives Quantity!
sloeber70
Posts: 45
Joined: Wednesday 08 July 2020 10:59
Target OS: Linux
Domoticz version: latest
Location: Bruges
Contact:

Re: Tado Thermostat plugin

Post by sloeber70 »

Hi..

after updating to latest beta:
Version: 2025.1 (build 16703)
Build Hash: adbdd30c1
Compile Date: 2025-05-22 09:41:41
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Apr 28 2025, 14:11:48) [GCC 12.2.0]

works again. thx guys !!!
Kind regards,
Sloeber70

Linux Debian 13 standard edition
Domoticz latest beta on ProxmoxVE Virtual Machine
Donski
Posts: 5
Joined: Wednesday 21 February 2024 20:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.4
Location: Netherlands
Contact:

Re: Tado Thermostat plugin

Post by Donski »

gizmocuz wrote: Thursday 22 May 2025 9:48 Seems TADO removed an environment API call.

I removed this call, and hard coded the endpoint in beta 16703 (others seem to do this as well)
All seems to be working again now
I had also had the API environment errors:

Code: Select all

 Error: Tado thermostaat: Failed to retrieve API environment from https://app.tado.com/env.js
And I was running:

Version: 2025.1
Build Hash: 89d5c900d
Compile Date: 2025-05-05 09:02:49
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]

Installed the beta as suggested and everything seems to work again.

Now I’m running:

Version: 2025.1 (build 16712)
Build Hash: e3d5ebea0
Compile Date: 2025-05-27 08:21:42
dzVents Version: 3.1.8
Python Version: 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0]

But since 2 days encounter some issues with the tado API again. I use the geofencing away status of tado to control a couple of lights in my home and I noticed they were acting strange, randomly switching off and within a minute or so switching back on. I checked the tado app and here I was marked as home only the status in domoticz was away, after checking the error log I saw the following error:

Code: Select all

Error: Tado thermostaat: Failed to perform GET request to Tado Api: ; Response headers: HTTP/1.1 28 Timeout was reached
I tried rebooting my Pi but the problem persists. Does anybody now what’s causing this issue and how to fix it?
jannl
Posts: 823
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.5.x
Location: Geleen
Contact:

Re: Tado Thermostat plugin

Post by jannl »

I just got an email from Tado regarding the limitatuons of the api. Without auto assist subscription 200 requests per day, with a subscribtion 20000 requests a day.
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: Tado Thermostat plugin

Post by waltervl »

jannl wrote: Monday 08 September 2025 11:43 I just got an email from Tado regarding the limitatuons of the api. Without auto assist subscription 200 requests per day, with a subscribtion 20000 requests a day.
It currently polls every 30 seconds....
https://github.com/domoticz/domoticz/bl ... do.cpp#L41
#define TADO_POLL_INTERVAL 30 // The plugin should collect information from the API every n seconds.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
User avatar
gizmocuz
Posts: 2707
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Tado Thermostat plugin

Post by gizmocuz »

I think it is even more...

Every 30 seconds a timed event is started to poll the status for each home and each zone

I suspect most users have 1 home, but could have multiple zones, meaning

homes * zones poll actions each 30 seconds

subscription seems 30 euro a year... that's one way to earn money from your customers

More reading here

https://www.reddit.com/r/tado/comments/ ... pi_limits/

Recently we had to migrate the login procedure/api calls, and now this...

Seems it is also possible to do it locally
Quality outlives Quantity!
lost
Posts: 699
Joined: Thursday 10 November 2016 9:30
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Tado Thermostat plugin

Post by lost »

gizmocuz wrote: Monday 08 September 2025 16:55 Seems it is also possible to do it locally
Reading the issue opened on HA github & heavy users complaints, looks local APIs are not on par with remote ones!
Only way to avoid this is, again, simply not buying such cloud-only-driven stuff: Not a semester without a manufacturer changing his business model, going bankrupt... That's useless to complain when you purchased your own traps.
harrykausl
Posts: 202
Joined: Sunday 13 November 2016 10:43
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: Germany
Contact:

Re: Tado Thermostat plugin

Post by harrykausl »

I use tado X with matter. Only for this case I installed Home Assistant on a second machine and interface domoticz with HA vice versa. If Domotitcz would also be able to integate matter, this would be much easier to handle.
User avatar
gizmocuz
Posts: 2707
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Tado Thermostat plugin

Post by gizmocuz »

I'm waiting (hoping) for a Matter2MQTT project
Quality outlives Quantity!
sloeber70
Posts: 45
Joined: Wednesday 08 July 2020 10:59
Target OS: Linux
Domoticz version: latest
Location: Bruges
Contact:

Re: Tado Thermostat plugin

Post by sloeber70 »

hmmm.. getting blocked already... I have a subscription.. so i guess that there is not only the per day limit, but also a limit per week? Is that correct?

I have 8 devices - 7 radiator controls and 1 room thermostat.

The polling in dz is heavy.. I get almost 30 lines per poll every 30 seconds. If all those lines count for one query each.... pfff.. then i have 60 queries per minute multiplied by 1440 ...... indeed.....

log:
2025-09-21 15:15:18.193 Error: TADO: Failed to perform GET request to Tado Api: ; Response headers: HTTP/2 429 date: Sun, 21 Sep 2025 13:15:18 GMTcontent-length: 0vary: Originvary: Access-Control-Request-Methodvary: Access-Control-Request-Headersstrict-transport-security: max-age=31536000x-content-type-options: nosniffcontent-security-policy: frame-ancestors 'none'x-frame-options: DENYratelimit-policy: "perday";q=20000;w=86400ratelimit: "perday";r=0;t=13037

Restarted the auth.... no solution...

2025-09-21 15:39:35.279 Status: TADO: Worker started. Will poll every 30 seconds.
2025-09-21 15:39:38.279 Status: TADO: We need to authenticate ourselfs
2025-09-21 15:39:39.463 Status: TADO: Copy and paste the below URL in your browser and follow the steps in your browser.
2025-09-21 15:39:39.463 Status: TADO: Domoticz will poll every 10 seconds to see if you have complete all the steps and continue.
2025-09-21 15:39:39.463 Status: TADO: ------------------------------
2025-09-21 15:39:39.463 Status: TADO: https://login.tado.com/oauth2/device?user_code=******
2025-09-21 15:39:39.463 Status: TADO: ------------------------------
2025-09-21 15:39:59.123 Error: TADO: Failed to perform GET request to Tado Api: ; Response headers: HTTP/2 429 date: Sun, 21 Sep 2025 13:39:59 GMTcontent-length: 0vary: Originvary: Access-Control-Request-Methodvary: Access-Control-Request-Headersstrict-transport-security: max-age=31536000x-content-type-options: nosniffcontent-security-policy: frame-ancestors 'none'x-frame-options: DENYratelimit-policy: "perday";q=20000;w=86400ratelimit: "perday";r=0;t=11556
Kind regards,
Sloeber70

Linux Debian 13 standard edition
Domoticz latest beta on ProxmoxVE Virtual Machine
sloeber70
Posts: 45
Joined: Wednesday 08 July 2020 10:59
Target OS: Linux
Domoticz version: latest
Location: Bruges
Contact:

Re: Tado Thermostat plugin

Post by sloeber70 »

Seems that the latest dz update solved the issue.
Poll interval set on 45 secs.
To be sure that this keeps working, and if it stops, I get a push message.
Altered a script that I found in the forum.

***script start ***

myHttpResponse = "getDomoticzErrorLog"

return {
on = { httpResponses = { myHttpResponse },
timer = { "every 1 minutes"},
-- devices = { "getErrorTrigger"} -- Only used for development and testing
},

logging = { level = domoticz.LOG_INFO,
marker = "status TADO plugin" },

data = { lastlogtime = { initial = 0 }},

execute = function(dz, trigger)

local violationMessage = " TADO: Copy and paste the below URL in your browser and follow the steps in your browser." -- Change to reflect the messages you want to catch

local function askDomoticzForLogLines()
local lastLogTime = dz.data.lastlogtime -- get time last logrequest
local logLevel = 268435455 -- loglevel (1=normal,2=Status,4=error,268435455=all
local jsonString = "/json.htm?type=command" ..
"&param=getlog" ..
"&lastlogtime=" .. tostring(lastLogTime) ..
"&loglevel=" .. tostring(logLevel)

local logURL = "http://X.X.X.X:8080" .. jsonString

dz.openURL ({ url = logURL,
method = "GET",
callback = myHttpResponse
})

dz.data.lastlogtime = os.time(os.date('*t')) -- store current Time as seconds from epoch
dz.log(logURL,dz.LOG_DEBUG)
end

local function findViolation()
local violation = ""
if trigger.json.result ~= nil then -- Only when there are errormessages in the log
local resultTable = trigger.json.result
for i = #resultTable,1,-1 do -- traverse backwards to get latest violation first
if string.find(resultTable.message,violationMessage) and
not(string.find(resultTable.message,"dzVents")) then -- We don't want debug messages to interfere
violation = violation .. "\n".. resultTable.message
end
end
end
return violation
end

if trigger.isDevice or trigger.isTimer then
askDomoticzForLogLines() -- get the relevant loglines
elseif trigger.ok then
local violation = findViolation()
if violation == "" then
dz.log("No (new) violations found",dz.LOG_DEBUG)
else
dz.log("violation(s) found: " .. violation,dz.LOG_INFO)
dz.notify("TADO niet ingelogd of ander probleem!!",violation, dz.PRIORITY_EMERGENCY,nil,nil,dz.NSS_PUSHOVER)
end
else
dz.log("Access problem to log",dz.LOG_ERROR)
end
end
}
***script end ***
Kind regards,
Sloeber70

Linux Debian 13 standard edition
Domoticz latest beta on ProxmoxVE Virtual Machine
jannl
Posts: 823
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.5.x
Location: Geleen
Contact:

Re: Tado Thermostat plugin

Post by jannl »

Just a question. I am allowed to do 20000 requests a day. It seems that around 9 o'clock they are gone. I set the time to 30 seconds which is obviously to low so I will adjust the to 45 seconds.

How can I limit the amount of requests? Anyone knows how the requests are computed?
User avatar
gizmocuz
Posts: 2707
Joined: Thursday 11 July 2013 18:59
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Top of the world
Contact:

Re: Tado Thermostat plugin

Post by gizmocuz »

You should be able to specify the interval in the latest beta
Quality outlives Quantity!
jannl
Posts: 823
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.5.x
Location: Geleen
Contact:

Re: Tado Thermostat plugin

Post by jannl »

Yeas, I know/noticed. But 30 secs does not seem to be sufficient for a day.

Hence my question if I can limit the calls in another way. For instance bij removing devices I do not care for.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest