mattdavis90 / node-red-contrib-tado-client

Tado web API client node for Node Red
MIT License
20 stars 16 forks source link

Set home to state "auto" after set presence to "home" #32

Closed mjeschar closed 3 years ago

mjeschar commented 3 years ago

A great project, I love it! But I have a small issue: When I set the Presence status to Away and then back to Home via API, I am not able to set the whole household to automatic. I still have to do this via the button in the GUI. Can you still implement this as an API call? TADO AUTO

mattdavis90 commented 3 years ago

Hi @mjeschar, I'm glad you like the project. I've tried a couple times to replicate this issue but I can't get that button to appear for me at all. If possible are you able to log into the webapp at https://my.tado.com/webapp and see if the button appears here. If it does then it would be great if you could make a note of the API call that the button makes using click. The simplest way I've found is to open the inspect panel in Chrome (F12), go to the network tab, then when you click the button there should be a series of calls made to the API, hopefully one of those is related to your click. If you can document what the URL is, the HTTP method, and the body (removing anything that looks sensitive) then I can implement the call. I'm sorry that I can't replicate the button, I'll keep trying, otherwise this is the same process I would take myself. Thanks

mattdavis90 commented 3 years ago

Apologies. I just tried again, and I have the button appearing for me as well now (I guess they've been doing a rolling update or something and this just wasn't there last time I checked).

It looks as though there is a new endpoint called presenceLock. I'll have a poke around and see what I can find out about it. I'll need to implement it in the underlying library then pull through to here. I'll keep you posted on updates :)

mattdavis90 commented 3 years ago

Apparently I totally forgot that this has been implemented in the underlying library for quite some time but never presented to the user in nodered - apologies. I've got this working added now and if you update to v0.9.4 then you will have a new "Auto" option in the "Set Presence" call, this will clear the presenceLock and set you back to automatic.

mjeschar commented 3 years ago

Such a great support! Thank you very, very much!!! I tried it and it works like charme! So happy!!