10.05.2021, 12:49
(10.05.2021, 12:30)admin Wrote:Code:if res then
res = require('json').pdecode(res)
if type(res) == 'table' and res.volume then
grp.checkupdate('1/2/3', res.volume)
end
end
Thanks a lot. The code below works perfectly.
Code:
res, code = require('socket.http').request('http://192.168.1.91:81/api/volume')
--log(res, code)
if res then
res = require('json').pdecode(res)
if type(res) == 'table' and res.percent then
grp.checkupdate('25/2/12', res.percent)
end
end
BR
Kai-Roger
Kai-Roger