30.11.2020, 20:59
(This post was last modified: 30.11.2020, 21:01 by Erwin van der Zwart.)
I think you use an older version of the user.hue
Can you check if your function getHueLights() matches the one below? Especially for return table.concat(response)
Can you check if your function getHueLights() matches the one below? Especially for return table.concat(response)
Code:
function getHueLights()
local response = {}
body_searchHueLights= ''
socket.http.request({
url = "http://"..ip_add.."/api/"..user.."/lights",
method = 'GET',
sink = ltn12.sink.table(response),
headers = {
['content-length'] = #body_searchHueLights,
['content-type'] = 'application/json',
},
source = ltn12.source.string(body_searchHueLights),
})
return table.concat(response)
end