18.05.2018, 10:46
It might be that array input order is not defined. Try this instead:
Code:
ports = {}
for _, p in ipairs(data.result.ports) do
ports[ p.port ] = p.state
end
grp.checkwrite('1/1/1', ports['ext1.input1'])
grp.checkwrite('1/1/2', ports['ext1.input2'])