httpResponses no work
Posted: Thursday 31 October 2019 14:26
Hello, I'm looking for some help I've tried several ways but I can not get the principle working and simple I open the url if the answer and False then I do an action if the answer and different from False I did another action thanking you in advance for the help
Code: Select all
return {
on = {
timer = {
'at 14:17' -- pour programmer la récurrence de la requête dans le temps
},
httpResponses = {
'False' -- doit correspondre au callback donné dans openURL command
}
},
execute = function(dz, item)
if (item.isTimer) then
dz.openURL({
url = 'http://domogeek.entropialux.com/schoolholiday/B/now',
method = 'GET',
callback = 'False',
})
end
if (item.isHTTPResponse == 'False') then
dz.devices("vacances scolaires").switchOff()
elseif (item.isHTTPResponse ~= 'False') then
dz.devices("vacances scolaires").switchOn()
end
end
}