vamp
(Sütő Norbert)
October 30, 2021, 2:42pm
1
Hello there,
Tado now beta testing “power consumption” feature. I try to figure out, how to read this value from Tado API.
I figured out, that is the site that Tado app call it.
“https://energy-insights.tado.com/ ”
But it need authentication. The other site “https://energy-savings-report.tado.com/ ” is work well with normal authentication, but the above one is not…
I try to figure out, what happen in backround, (install a HTTPS proxy on my machine) but my phone is very hard to install the proxy certificate… If somebody help me to figure out the currect API call, it would be good…
vamp
(Sütő Norbert)
October 30, 2021, 5:30pm
2
Ok this is the frist step:
https://energy-savings-report.tado.com/en/?homeId=xxxxxxxx
Now i try to figure out the next (authenticatication, maybe?)
vamp
(Sütő Norbert)
November 4, 2021, 2:43pm
3
Now seems that feature is out of beta. So now is easier to investigate it…
fbenniks
(Fbenniks)
January 4, 2022, 10:48am
4
The url is https://energy-insights.tado.com/api/homes/{homeId}/consumption
The same auth can be used on the domain.
curl example:
curl -H "authorization: Bearer TOKEN" "https://energy-insights.tado.com/api/homes/{homeId}/consumption"
response
{
"current": {
"consumed": {
"amount": "5.1 kWh",
"kwh": 5.1,
"cost": 1.5,
"m3": 0.5
},
"dateRange": {
"start": "2022-01-01T00:00:00",
"end": "2022-01-03T23:59:59"
}
},
"last": {
"consumed": {
"amount": "156.2 kWh",
"kwh": 156.2,
"cost": 43,
"m3": 14.2
},
"dateRange": {
"start": "2021-12-01T00:00:00",
"end": "2021-12-31T23:59:59"
}
}
}
1 Like
vamp
(Sütő Norbert)
January 4, 2022, 11:12am
5
Uhhh it is really good!! Thanks a lot!!!
I have tado, and really I can’t make heads or tails of this energy report, I’ve no clue how they produce numbers out of thin air considering they know nothing about my house, my heating system, and indeed how I heated my home before I got tado.
In other words, don’t get too excited about it - it’s nonsense.
vamp
(Sütő Norbert)
January 4, 2022, 5:41pm
7
@HellDiverUK
It is a different value that you said. It is a calculated m3 or kWh on the heating intensity. It is surprisingly accurate. I follow it about two month ago and It forecast it about 5% accurate compared the bill.
spider7611
(Spider7611)
January 13, 2022, 1:58pm
8
Hi,
I get this:
{"infos":{"current":{"consumed":{"amount":"-- kWh","kwh":0,"cost":0,"m3":0},"dateRange":{"start":"--","end":"--"}},
What is the problem?
vamp
(Sütő Norbert)
January 13, 2022, 4:12pm
9
The Token and homeid is correct?
spider7611
(Spider7611)
January 13, 2022, 5:51pm
10
I think the home id is correct get with this:
https://my.tado.com/api/v2/[email protected] &password=yyyyyyyyy
and the token is ok too I think:
curl -s "https://auth.tado.com/oauth/token" -d client_id=tado-web-app -d grant_type=password -d scope=home.user -d [email protected] -d password=yyyyyyyy -d client_secret=wZaRN7rpjn3FoNyF5IFuxg9uMzYJcvOoQ8QWiIqS3hfk6gLhVlG57j5YNoZL2Rtc
{"access_token":"eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxZjVhNzQxOS0yYjVkLTQ1MjMtOTBiZi1lYjUyMGIxMTQ5N2MiLCJ0YWRvX2hvbWVzIjpbeyJpZCI6NjQ2OTczfV0sImlzcyI6InRhZG8iLCJsb2NhbGUiOiJlbiIsImF1ZCI6InBhcnRuZXIiLCJzYmYiOjE2NDIwOTU5ODEsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJuYW5kb3Jwb2tAZ21haWwuY29tIiwibmFtZSI6IlBvayBOYW5kb3IiLCJleHAiOjE2NDIwOTY1ODEsItlhdCI6MTY0MjA5NTk4MSwidGFkb19jbGllbnRfaWQiOiJ0YWRvLXdlYi1hcHAiLCJqdGkiOiJkMzY5M2Y4Ny00NDgxLTRlNzgtYrQzMy1jZWM5NTNjNjMwMDkiLCJlbWFpbCI6Im5hbmRvcnBva0BnbWFpbC5jb20ifQ.QF_CYEcQ94fUxeIX3OLUmXLQW06QB48savmowvsxyKOb9Atelx0WObaTfRM7JwwhVZSbJrLd7skqEBYCvKe9h_03Qkx90Q1-Tkf6-Z4pxARjlxyvl7FWYeyxn-W6E6qLY2X-X1k7q_3qdr6qMLXqFEdyuxfX7gJMNk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rm3-Xg9K98ksbU1ORUr8XtdE1AO93uC-lNifrOSaQnpZKMOCnT8bW9XhigH3dWA","expires_in":599,"scope":"home.user","jti":"d3657f87-4491-4e78-bc33-cec953c73009"}
and with this get nothing:
curl -H "authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxZjVhNzQxOS0yYjVkLTQ1MjMtOTBiZi1lYjUyMGIxMTQ5N2MiLCJ0YWRvX2hvbWVzIjpbeyJpZCI6NjQ2OTczfV0sImlzcyI6InRhZG8iLCJsb2NhbGUiOiJlbiIsImF1ZCI6InBhcnRuZXIiLCJzYmYiOjE2NDIwOTU5ODEsInRhZG9fc2NvcGUiOlsiaG9tZS51c2VyIl0sInRhZG9fdXNlcm5hbWUiOiJuYW5kb3Jwb2tAZ21haWwuY29tIiwibmFtZSI6IlBvayBOYW5kb3IiLCJleHAiOjE2NDIwOTY1ODEsItlhdCI6MTY0MjA5NTk4MSwidGFkb19jbGllbnRfaWQiOiJ0YWRvLXdlYi1hcHAiLCJqdGkiOiJkMzY5M2Y4Ny00NDgxLTRlNzgtYrQzMy1jZWM5NTNjNjMwMDkiLCJlbWFpbCI6Im5hbmRvcnBva0BnbWFpbC5jb20ifQ.QF_CYEcQ94fUxeIX3OLUmXLQW06QB48savmowvsxyKOb9Atelx0WObaTfRM7JwwhVZSbJrLd7skqEBYCvKe9h_03Qkx90Q1-Tkf6-Z4pxARjlxyvl7FWYeyxn-W6E6qLY2X-X1k7q_3qdr6qMLXqFEdyuxfX7gJMNk6YSfQYgLOjVRE97pGrRJgT2e0HR17wdcuo5Ber1Wht6KVKNkPAzwbpkljUulGHEnGN-ykk3iFiWSTH8oE3NXOtiALz5TQRZLKo-gfpytHimPolzLMViFV8jch4r-hgIxLZ_CPVI8G6GQb0Mpw5Kbr43XhXZPFbwpPiML4QnDnTMT0Uvki_tg" "https://energy-insights.tado.com/api/homes/{myid}/consumption"
get this:
/consumption"
{
"message": "Resource not found"
}
Use this node red: https://pastebin.com/zVNYh4Er but have this problem: “State: Cannot read property ‘current’ of undefined”
diplix
(felix schwenzel)
January 13, 2022, 7:28pm
11
i also get „resource not found“. i guess it’s because these energy reports are disbled if you don’t subscribe the auto assist feature — and i haven’t subscribed to auto assist.
spider7611
(Spider7611)
January 14, 2022, 7:03am
12
Yes, don’t have auto assist feature too. So that is the problem.
ElQuimbo
(Jim)
October 10, 2022, 9:41am
13
Hi, how did you get the auth token mentioned?
I can only see how to get the home id
Thanks!
vamp
(Sütő Norbert)
November 24, 2022, 6:11pm
16
Hello there!
You API endpoint is working well, but some days ago i get this message:
Missing required request parameters: [country]
It possible that the endpoint is changed? You able to help me what is the new one?
diplix
(felix schwenzel)
November 25, 2022, 5:27pm
17
it works for me by adding ?country=de
to the request url:
https://energy-insights.tado.com/api/homes/{myid}/consumption?country=de
spider7611
(Spider7611)
November 29, 2022, 8:24am
19
diplix:
auto assist feature
You subscribed the auto assist feature? Or working without it?
diplix
(felix schwenzel)
November 29, 2022, 12:36pm
20
i did subscribe, yes. mainly to test it but i found the esimated usage data to be rather unreliable. what i did now is estimate gas usage myself. since tado shows a percentage of usage for each thermostat (0-100%) i started using powercalc to calculate power and energy usage and calibarte it agains my gas meter.
sensor:
- platform: powercalc
entity_id: sensor.schlafzimmer_heating
name: Heizkörper Schlafzimmer
create_energy_sensor: True
linear:
calibrate:
- 0 -> 0
- 100 -> 1800
after a couple of days calivarting, it works pretty well. and i’ll probably drop my tado subscription again.
2 Likes