21.03.2018, 18:21
(This post was last modified: 21.03.2018, 18:22 by Erwin van der Zwart.)
Hi,
Try something like this:
BR,
Erwin
Try something like this:
Code:
require('socket.http')
require('json')
socket.http.TIMEOUT = 15
data, code = socket.http.request('http://10.0.0.xxx/output.json')
if data then
data = json.pdecode(data)
end
if data then
CurrentSummationDelivered = data['0015BC001B024257'].CurrentSummationDelivered
InstantaneousDemand = data['0015BC001B024257'].InstantaneousDemand
grp.update('1/1/1', tonumber(CurrentSummationDelivered))
grp.update('1/1/2', tonumber(InstantaneousDemand))
end
Erwin