Page 6 of 8

Re: Tado Thermostat plugin

Posted: Friday 04 April 2025 13:20
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.

Re: Tado Thermostat plugin

Posted: Friday 04 April 2025 13:33
by jannl
hm, but no. First token was at 31 march, so that is not it.

Wonder if it is possible to automate that......

Re: Tado Thermostat plugin

Posted: Friday 04 April 2025 13:39
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

Re: Tado Thermostat plugin

Posted: Saturday 05 April 2025 7:40
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)

Re: Tado Thermostat plugin

Posted: Thursday 22 May 2025 8:19
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?

Re: Tado Thermostat plugin

Posted: Thursday 22 May 2025 8:47
by ViperAppie
Got the same error since yesterday.

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

Following the post....

Re: Tado Thermostat plugin

Posted: Thursday 22 May 2025 9:48
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

Re: Tado Thermostat plugin

Posted: Thursday 22 May 2025 21:14
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 !!!

Re: Tado Thermostat plugin

Posted: Friday 13 June 2025 0:32
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?

Re: Tado Thermostat plugin

Posted: Monday 08 September 2025 11:43
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.

Re: Tado Thermostat plugin

Posted: Monday 08 September 2025 11:51
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.

Re: Tado Thermostat plugin

Posted: Monday 08 September 2025 16:55
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

Re: Tado Thermostat plugin

Posted: Tuesday 09 September 2025 14:03
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.

Re: Tado Thermostat plugin

Posted: Wednesday 10 September 2025 18:04
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.

Re: Tado Thermostat plugin

Posted: Friday 12 September 2025 8:01
by gizmocuz
I'm waiting (hoping) for a Matter2MQTT project

Re: Tado Thermostat plugin

Posted: Sunday 21 September 2025 15:39
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

Re: Tado Thermostat plugin

Posted: Tuesday 23 September 2025 9:39
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 ***

Re: Tado Thermostat plugin

Posted: Friday 26 September 2025 12:56
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?

Re: Tado Thermostat plugin

Posted: Friday 26 September 2025 13:15
by gizmocuz
You should be able to specify the interval in the latest beta

Re: Tado Thermostat plugin

Posted: Friday 26 September 2025 13:32
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.