Tado° Binding

I’ve create a binding for tado° devices that is now available at the Eclipse Marketplace.

Main features:

  • Support for all zone types: Heating, AC, Hot Water
  • Item for mobile device HOME/AWAY status
  • Auto-discovery of zones and mobile devices after initial configuration of credentials
  • Changes via items are collected for a few seconds before they are sent to tado°. This allows you to do combined changes from the UI, for example change temperature and mode in one call.
  • Fills missing overlay parameters from current zone state, trying to keep them unchanged, if compatible with requested change
  • Uses termination condition preset as defined in the tado° app as fallback

The README provides more details. I hope you like it.

6 Likes

Hi,

I’ve just tested it on the heating and it’s working, but I get the below:


2017-12-05 22:48:27.198 [WARN ] [okhttp3.OkHttpClient                ] - A connection to https://my.tado.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);. 

Thanks a lot for this work - I was waiting for a long time to see tado finally being integrated with a binding into openhab!

Kurt

Thanks for reporting the issue. I’ll have a look asap.

Hi Dennis

I get the same warning (build #1115)

2017-12-08 11:38:06.597 [WARN ] [okhttp3.OkHttpClient                ] - A connection to https://my.tado.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

I come from the Tado solution Benjamin had created to this, so far looking good. I did have to make some trial and error testing in order to understand how to setup multiple heating zones, but got it. I ended with this
Things

Bridge tado:home:boni [ username="xxx@gmail.com", password="xxx" ]  {
    zone DRHeating [id=1]
    zone LRHeating [id=2]
    zone BRHeating [id=3]
    Etc
    mobiledevice phone1 [id=123456]
}

Item

Number   DRTadoTemp         "Tado dining temperature [%.1f °C]"     <temperature>	            (gDR)   { channel="tado:zone:boni:DRHeating:currentTemperature" }
Number   LRTadoTemp         "Tado living temperature [%.1f °C]"     <temperature>	            (gLR)   { channel="tado:zone:boni:LRHeating:currentTemperature" }
Etc.

Thanks
Anders

Hello @dfrommi,

are you planning to submit the binding to the main binding collection over in openhab2-addons?

hello i am using Tado binding since 4 days now. The only problem is that i am maintaining my server a lot recently and had to restart openhab service many times. It happened twice that the binding was no more installed at the next reboot

Thanks all for the feedback and for trying the binding.

@KurtS @AndersBN So far I couldn’t find a way to reliably reproduce the leak problem. I just see it from time to time in the logs. So if you know how to force it, please let me know.

@ThomDietrich At least at the moment, I’m not planning to submit it to openhab2-addons. The code should first prove to be stable and well tested by the community. Then I might consider it.

@Melkor I guess that comes from the Eclipse marketplace integration in OpenHAB. The documentation says:
“Attention: Please note that after a system upgrade the installed add-ons are lost and you will need to re-install them. This behavior will be changed in future.”

I have the same Warning like @KurtS and @AndersBN :

[WARN ] [okhttp3.OkHttpClient                 ] - A connection to https://my.tado.com/ was leaked. Did you forget to close a response body? To see where this was allocated, set the OkHttpClient logger level to FINE: Logger.getLogger(OkHttpClient.class.getName()).setLevel(Level.FINE);

I have it nearly every 10 minutes. The binding works fine but the warnings are still there.

I found some links concerning this issue but I have no clue if it can help you @dfrommi




@PeterP Thank you so much for your help and the list of issues. Very interesting. However, I’m not directly using the OkHttp client, but instead a generated retrofit2 client that is internally using OkHttp.

But I’ve created a release now that is manually closing the connection after API calls and also in all error cases. I hope that is solving the issue.

@KurtS @AndersBN @PeterP Would you please be so kind and try release 0.9.1 and check if the leak-messages are gone? I’m still not able to reproduce it.
Thanks you very much.

Bad news.
Warning is still coming each approx. 10 minutes but this time with the new binding 3 times in a row during one second. :frowning:

@PeterP That is very unfortunate.

My best guess is that there’s some path in the generated API client that doesn’t close the connection.

I’ve updated the 0.9.1 JAR to use another library in the generated code. Can you please try the updated file?
Thanks a lot!

2017-12-13 23:28:03.228 [WARN ] [com.squareup.okhttp.OkHttpClient    ] - A connection to https://my.tado.com/ was leaked. Did you forget to close a response body?

still doing the issue

Oh nej :weary:

I have one last idea where it could come from. The OAuth interceptor, that is taking care of access token and token refresh might be the culprit. Would be quite surprising, because it’s 100% swagger generated and I’m for sure not the first one using it, but worth a try.

Ok, one more time…
I could identify a potential leak in the OAuth interceptor. So guys, could you please one more time try the updated 0.9.1 release. I’m cautiously optimistic that it will solve the leak.

And thanks again very very much for your support and your patience.

Hi Dennis,
seems like your update fixed the issue, I didn’t see any errors in the logs for the last 24h.

thanks again for your effort! Great work!

Kurt

Thank you very much for the confirmation. I’ve updated the version in the Eclipse Marketplace.

how can I find out the mobile ID?
I registered my phone in my TADO app and it is also shown online, so home/away mode works.
but now I do not know which ID i have to take for my binding.
Your description / readme only writes: " It is again easiest to refer to discovery in order to find the id"
But where to get this id?

thx for reply