Can anyone help me debug the Tado plugin install on openluup?
I have put the files on openluup and created the Tado device, like I’m supposed to. AltUI says the device is created successfully, but then openluup gets unresponsive.
However I see the following in my docker container log:
The first method that attempts to make a connection is this function:
function Tado_GetTempScale()
-- Function to get the Vera temperature unit used.
local curlCommand = 'curl -k -L -H "Content-Type: application/json" "http://localhost:3480/data_request?id=lu_sdata"'
local stdout = io.popen(curlCommand)
local tado_controller = stdout:read("*a")
stdout:close()
local obj, pos, err = tado_json.decode (tado_controller, 1, nil)
TADO_SCALE = obj.temperature
end
Is this curl command supported by openluup? I don’t know why the plugin wants to transfer any information
it seems to me it’s trying to get the temperature format.
AFAIK there’s no way to get it from Vera’s luup engine, but maybe @akbooer has something special for openLuup.
@RHCPNG I’ll probably change this code to read a variable anyway, since it’s not that efficient to do it. Just try to return “F” or “C” from this function and see if it’s working on openLuup for you.
This helped me a step further. But I still think there is something fishy about the curl part, because now it seems to be looping on the next curl action in the code. I need to dig in deeper however to be sure.
I now got more than 40 newly created tado devices because of a loop in the install of the plugin
I think I’m going to get me a test instance of openluup for this
I took a quick look at the code. It’s not that bad, but it needs some work. Part of the problems are in the way the child devices are created and HTTP calls are composed. I’ll add async http as one of the first thing.
I’ll start some refactoring in the next days, but I’m not sure it’ll be very quick. Please hold on and be patient
I’m slowly making some progress. I’ve already rewritten the code, but I’m now trying to make it completely async, so it’s not that easy when dealing with child devices, but I’ll eventually get there.
I’ve already removed unwanted variables, to optimize the impact on the storage.
Next step is to get rid of custom devices and try to use standard thermostats, plus add support for humidity devices. I’ve not so much spare time, but I’ll try to have something to try in the upcoming weeks. Stay tuned
Nope. Unfortunately I was very busy with other things. I have api calls in place, but this is the easiest part. I’ll probably be back at it in the next weeks.