The script basically calls on the Tado API to get temperature from my heating control.
On the old LUA script it calls curl to do this, like this:
Code: Select all
os.execute('curl -s "https://auth.tado.com/oauth/token" -d client_id=public-api-preview -d client_secret=4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw -d grant_type=password -d password=' .. tado_pwd .. ' -d scope=home.user -d username=' .. tado_user)
Code: Select all
domoticz.openURL({
url = 'https://auth.tado.com/oauth/token',
method = 'POST',
callback = 'tadoauthcallback',
postData = {
client_id = "public-api-preview",
client_secret = "4HJGRffVR8xb3XdEUQpjgZ1VplJi6Xgw",
grant_type = "password",
password = tado_pwd,
scope = "home.user",
username = tado_user
}
})Any ideas why? They look equivalent to me.
Thanks