This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

Http Api command to Zennio Getface IP
#11
(18.05.2018, 10:46)admin Wrote: 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'])

it did work, i just didn`t change the port number.

it was on 1 and 2 and i didn`t change it. so when changing to 4 and 7 it worked perfectly.
the reason why it worked on 2 is becouse relay 1 is linked to ext.input 1 in the getface. 

[1] led_secured
[2] relay1
[3] output1
[4] input1
[5] ext1.relay1
[6] ext1.relay2
[7] ext1.input1
[8] ext1.input2

Thanks, for all the help! Smile

BR Even.
Reply


Messages In This Thread
RE: Http Api command to Zennio Getface IP - by Evens - 18.05.2018, 11:01

Forum Jump: