libtado icon indicating copy to clipboard operation
libtado copied to clipboard

Please add support for Smart AC devices (WR01, WR02)

Open juntta opened this issue 1 year ago • 8 comments

Thanks for great library, unfortunately ran into issues with my Tado setup with 3 Smart AC devices (2 WR01's and 1 WR02).

With command python -m libtado devices, i get this message:

`Device type WR01 not supported. Please report a bug with the following output.
{'deviceType': 'WR01', 'serialNo': 'XXX', 'shortSerialNo': 'XXX', 'currentFwVersion': '60.2', 'connectionState': {'value': True, 'timestamp': '2024-01-13T18:02:41.340Z'}, 'characteristics': {'capabilities': ['INSIDE_TEMPERATURE_MEASUREMENT', 'IDENTIFY']}, 'accessPointWiFi': {'ssid': 'tadoXXXX'}, 'commandTableUploadState': 'FINISHED'}

Device type WR02 not supported. Please report a bug with the following output.
{'deviceType': 'WR02', 'serialNo': 'XXX', 'shortSerialNo': 'XXX', 'currentFwVersion': '59.6', 'connectionState': {'value': True, 'timestamp': '2024-01-13T17:56:29.653Z'}, 'characteristics': {'capabilities': ['INSIDE_TEMPERATURE_MEASUREMENT', 'IDENTIFY']}, 'accessPointWiFi': {'ssid': 'tadoXXXX'}, 'commandTableUploadState': 'FINISHED'}`

And when tried to: t.set_temperature(6, 23, "MANUAL") I Got: 422 Client Error for url https://my.tado.com/api/v2/homes/XXX/zones/6/overlay

juntta avatar Jan 13 '24 18:01 juntta

Thank you for submitting this issue. I appreciate helping us to make this library "great again!".

I will take a look in the next days.

germainlefebvre4 avatar Jan 13 '24 22:01 germainlefebvre4

Appreciate it, thanks! Let me know if I can help with anything (data, testing).

juntta avatar Jan 14 '24 06:01 juntta

Any progress with this? Could I help you with anything?

juntta avatar Feb 03 '24 10:02 juntta

I am resolving the device list issue : #253

germainlefebvre4 avatar Feb 07 '24 14:02 germainlefebvre4

For the 422 status code, it works properly on my side:

tado.set_temperature(1, 19, "MANUAL")
{'type': 'MANUAL', 'setting': {'type': 'HEATING', 'power': 'ON', 'temperature': {'celsius': 19.0, 'fahrenheit': 66.2}}, 'termination': {'type': 'MANUAL', 'typeSkillBasedApp': 'MANUAL', 'projectedExpiry': None}}

May you tell me more about your 422 issue?

germainlefebvre4 avatar Feb 07 '24 15:02 germainlefebvre4

Hmm, thats pretty much it at the moment I guess.

With different Tado models (Smart Thermostat) lib works from Python script just fine but with AC models got that 422 error when setting the temperature.

Ideas how to debug?

juntta avatar Feb 07 '24 19:02 juntta

tried to run set temperature from cli and got some more detailed error:

Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main return _run_code(code, main_globals, None, File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code exec(code, run_globals) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libtado/__main__.py", line 500, in <module> main() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1157, in __call__ return self.main(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/click/decorators.py", line 45, in new_func return f(get_current_context().obj, *args, **kwargs) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libtado/__main__.py", line 322, in set_temperature tado.set_temperature(zone, temperature, termination=termination) File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libtado/api.py", line 1044, in set_temperature return self._api_call('homes/%i/zones/%i/overlay' % (self.id, zone), data=payload, method='PUT') File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libtado/api.py", line 92, in _api_call return call_put(url, data).json() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/libtado/api.py", line 80, in call_put r.raise_for_status() File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/requests/models.py", line 1021, in raise_for_status raise HTTPError(http_error_msg, response=self) requests.exceptions.HTTPError: 422 Client Error: for url: https://my.tado.com/api/v2/homes/XXX/zones/XXX/overlay

juntta avatar Feb 09 '24 16:02 juntta

Any progress with this?

Did those errors I sent give any clue?

juntta avatar Feb 18 '24 18:02 juntta