[DEPRECATED] Tado Heating User Presence Device Type

Please see the Tado (Connect) SmartApp for using your Tado Presence Users with Smartthings, the old API was deprecated by Tado, the new solution is incorporated with the Tado (Connect) application.

@Fuzzyligic this isn’t refreshing presence for me. It’s logging in OK, but not updating. Any ideas?

yes sorry tado changed their API to V2 this no longer works now. I will take a look at this again at some point soon

Ah I see. Yes please, that’d be awesome. Tried to work it out myself but stabbing blindly to be honest!

this should now work with the latest code

1 Like

Awesome, I’ll give it a whirl! Many thanks

@Fuzzyligic Uh oh… get this when updating the code!

org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object ‘presence’ with class ‘java.lang.String’ to class ‘int’ @ line 56

@aubers strange I copied the handler from my IDE window to update GitHub, just checked the GitHub version and it differs from my version in the IDE, to fix just change line 56 from

details [“presence”,“refresh”]


details ([“presence”,“refresh”])

I’m not sure how the brackets got removed, anyway I will update GitHub myself tomorrow as I’ve shut down for the night

ok the new version has been uploaded

right i found another issue where tado would stop allowing updates after a while. i have now uploaded v1.3 which should get around this. i have been testing with some of my users and all seems to now be fine


have done latest update and it thinks I’m at home when i’m not.

It only takes the status from Tado. Has the Tado app updated that you are away? I find it incredibly unreliable as a lot of times it only updates your location when you load the Tado app

yep, tado is showing as away from home. and closed smartthings and gone back in but still showing as “PRESENT”

Ok please post your logs after hitting the refresh button. I’ve tested, it does work fine for me. Remember to comment out your username and pass from the log

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug ___exception: java.lang.NullPointerException: Cannot invoke method capitalize() on null object

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Executing parseResponse.successTrue

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Output status: 200

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Executing parseResponse: [appUsers:[[username:14136_jillsiphone6s, relativePosition:0, privacyEnabled:false, nickname:Jill’s iphone 6s, geoTrackingEnabled:true, geolocationIsStale:false]], success:true, geoMapScale:[0:18, 100:13]]

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Executing ‘sendCommand’

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Http Params ([uri:https://my.tado.com, path:/mobile/1.6/getAppUsersRelativePositions, requestContentType:application/json, query:[username:XXXXXX, password:XXXXXX, noCache:22028, webapp:1]])

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Executing ‘sendCommand.statusCommand’

dffa3a42-db87-438f-b46b-463857a0f5c9 16:56:36: debug Executing ‘refresh’


I have been playing around with your return against my code, so i created the following groovy script to test

import groovy.json.JsonOutput
import groovy.json.JsonSlurper

def evtJson = new groovy.json.JsonOutput().toJson([appUsers:[[username:"14136_jillsiphone6s", relativePosition:"0", privacyEnabled:"false", nickname:"Jill's iphone 6s", geoTrackingEnabled:"true", geolocationIsStale:"false"]], success:"true", geoMapScale:[0:"18", 100:"13"]])

def json = new JsonSlurper().parseText(evtJson)

def appuserarray = new groovy.json.JsonOutput().toJson(json.appUsers)

def list = new JsonSlurper().parseText(appuserarray)

list.each { 

    if ((it.nickname).capitalize() == ("Jill's iphone 6s").capitalize()) {
        println "Found Jill"
        return it
        println "Not Found Jill"

but this works fine, now specifically the portion that is failing in the script is one of the capitilize functions which is trying to perform and action on a null value.

now the first value which is being capitalized is the it.nickname value, and from the log i can see that that it is returning “Jill’s iphone 6s” and in my testing this works fine also. however the second capitalize is being performed against settings.tadouser which i can only assume is the Null Value.

if ((it.nickname).capitalize() == (settings.tadouser).capitalize())

can you confirm that in the Tado User Device preferences you have input Jill’s iphone 6s as the Tado User Value? if you log into the IDE and select My Devices then select your device does the tadouser have a value?

if so i wonder if you could change the nickname of the device to something like just Jill. it shouldn’t cause an issue with the nickname as per your return according to my testing, however it would be good to rule it out.

I have three users here all working correctly without that error but i am able to emulate the error if the tado user value is null. but with that value actually being populated with the correct value this works fine

Hi, this is working now if I press the refresh button , but doesn’t refresh automatically on arrival back into my home. Does yours refresh automatically?

It does work for me. The device handler uses polling so should refresh every 10 mins but with the number of other issues I am having with ST I have pretty much abandoned doing anything else with this platform. Try using the pollster app as an alternative

I haven’t had a chance to load and test this but I have a quick question.
Mine and my wife’s phone are connected to Tado to use the presence facility so that the heating turns off when we are away.
Does this app change the Tado presence in the app to away when both phones are away or does it just work for the account owner? (In your app)
I.e. We both need to be away for the presence to change to away. (Again, in your app)
Probably a stupid question but would just like some clarification.

ok this purely takes the position of your user from the Tado app and represents that as a presence sensor in ST. this app itself does not set home or away in ST or Tado. it just allows you to represent the individual Tado user Presence in ST and use that in your own logic to set away/home modes however you want with the likes of CoRE