Open chrominanzky opened 1 month ago
Hi, I had a look at the code you linked. I can add something similar to the underlying library in this project then maybe add that as a separate node in Nodered. My main issue is that I don't own a Tado X device so can't test anything. Would you be able to test? The library is written in Javascript and can be run using node.js
Oh yes I have some Tado X devices and can try to test it
My Tado X devices will arrive tomorrow, I can test too
I installed my first Tado X devices today, so drop a note, if some testing is required.
Preliminary support is now on a branch in my Tado library. If anyone has experience with JavaScript/TypeScript then I'd appreciate testing. It should have parity with the Python library linked. It doesn't attempt to guard against using older v2 APIs - I'm not sure whether they'll respond. Also, the typing could be totally wrong on the responses, I've assumed that they're the same as the v2 responses.
I tested a few API calls against my home today:
Working fine:
Failed:
Error: { code: 'notFound', title: 'zone (5) of home xxx not found' }
I can reference the same zone in getZoneState() though and get a valid result.
Time for bed now, I'll see if I can do some more testing tomorrow.
Pulled again today, and switched my test code to the TadoX class.
I was able to successfully call these methods:
Methods which failed:
Calls to these methods return an empty array:
I haven't tested any methods requiring:
If I find time, I'll test the EnergyIQ() methods tomorrow.
Thanks for checking - I'll have a look around to see what's going wrong with the manualControl
endpoint - I didn't change the underlying code from v2 so I'm not surprised it doesn't work. I'm honestly not sure what will and won't work so trying a roomId
as a zoneId
could work but I'm still on v2 so none of the endpoints work for me.
Would you be able to share some of the responses? Then I can begin adding types to the library. Thanks
Of course, here's a zip file with the JSON dumps of the responses I gathered so far. Only two calls do not return JSON:
any progress and any way we can help test? I'm keen to get this to work with my X Radiator Vales + Thermostats :)
From the testing done so far, we're pretty certain the current API calls just work with TadoX. There's no sign of the X API in the mobile app.
If you're keen to help test though the code is all committed on a pull request for testing but unmerged while we work out the best way to integrate it, and confirm it actually works.
The code is all on the underlying node library here https://github.com/mattdavis90/node-tado-client/pull/90
OK, this is the first time that I'm trying to pull a PR directly into NR, so will play with it
That is implemented in the attached PR - apologies I thought the above testing had showed most of the v2 API to still work.
This won't work in NodeRed - you need to run the Node.js directly. Because we haven't fully decided on the direction of the underlying Node module (though we're close I think) I haven't written the NodeRed integration layer
Right, thanks, will test later today!
@jm-duke or @jelmerkk Is there any chance you can test out the getZoneCapabilities
call with TadoX? This should be possible through the current NodeRed package. I'm still working out how to split down functionality and that call is in my "probably doesn't work" list but it would be good to know for sure. Thanks
Given that TadoX uses rooms instead of zones, I cannot determine zones. getAllZones returns an empty array, and if I use a roomID to call getZoneCapabilities I get an error for an unknown zone...
That makes sense and agrees with my guess. I think I'm close to having everything separated out and ready to create a Node Red branch.
There may be a lot of functionality lost in the initial release. I'll make a note of every call that will be marked as not working on TadoX.
If still needed I can test from that NR branch to replicate all the calls I see in the Tado WebUI. Can't get the NodeJS code to properly connect so I'm not a big help there...
That would be great. I'll post a comment when ready
Below is a list of all the API calls I'm planning to make Tado-only. Some are replaced by TadoX specific calls but most aren't. If you'd like to double check that the ones marked for removal don't work, that would be amazing. I'm just prepping the NodeRed branch now
Confirmed, they don't work because they rely on zones as well.
Great - thanks! I left the following ones in because they talk about devices. Not sure if they're Tado v2 specific though
see PR #70
Oh boy, a lot has happened here in the past few days :grin:
I tested these API calls:
* getDevices * getDeviceTemperatureOffset * setDeviceTemperatureOffset * identifyDevice * setChildlock
getDevices() returns an empty array.
The other calls fail with:
{ code: 'notFound', title: 'device VAxxxx not found' }
Grrr, Tado, you already have a devices API!
I'll remove those as well. I'm worried that we're not leaving TadoX folk with much in the way of control but hopefully new endpoints come to light soon.
I've updated both PRs to reflect your findings
Here's some more endpoints & responses, let me know what else you miss.
Features:
https://hops.tado.com/homes/HOMEID/features
{"availableFeatures":["careAndProtect","geofencing","openWindowDetection"]}
Rooms: https://hops.tado.com/homes/HOMEID/rooms
[{"id":1,"name":"Woonkamer","sensorDataPoints":{"insideTemperature":{"value":19.74},"humidity":{"percentage":54}},"setting":{"power":"ON","temperature":{"value":20.0}},"manualControlTermination":null,"boostMode":null,"heatingPower":{"percentage":30},"connection":{"state":"CONNECTED"},"openWindow":null,"nextScheduleChange":{"start":"2024-11-24T21:00:00Z","setting":{"power":"ON","temperature":{"value":19.0}}},"nextTimeBlock":{"start":"2024-11-24T21:00:00Z"},"balanceControl":null}
Rooms/1: https://hops.tado.com/homes/HOMEID/rooms/1
{"id":1,"name":"Woonkamer","sensorDataPoints":{"insideTemperature":{"value":19.76},"humidity":{"percentage":54}},"setting":{"power":"ON","temperature":{"value":20.0}},"manualControlTermination":null,"boostMode":null,"heatingPower":{"percentage":33},"connection":{"state":"CONNECTED"},"openWindow":null,"nextScheduleChange":{"start":"2024-11-24T21:00:00Z","setting":{"power":"ON","temperature":{"value":19.0}}},"nextTimeBlock":{"start":"2024-11-24T21:00:00Z"},"balanceControl":null}
https://hops.tado.com/homes/HOMEID/quickActions/allOff
https://hops.tado.com/homes/HOMEID/quickActions/resumeSchedule?ngsw-bypass=true
I've update both PRs to add those API calls
A lot of API Calls with the V2 API don’t work with Tado X anymore. Aweddell already made some progress here. Maybe it’s possible to also add Tado X support to this project.
https://github.com/aweddell/PyTadoX/tree/TadoX-Support