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.

KNX / TP error.
#21
Hello,

require('socket.http')
socket.http.TIMEOUT = 5



-- Read from object
local reply1 = socket.http.request('http://user:password@XX.XX.XX.XXX/scada-remote?m=json&r=grp&fn=getvalue&alias=0/1/3')
grp.write('5/0/0', reply1)


I tried to read one temperature with a logic machine from other logic machine. It works.
When i tried to read boolean or switch type values, it doen't work.
So i tried to send TRUE on 0/1/3 and on 5/0/0 i read TRUE
when i tried to send FALSE on 0/1/3 and on 5/0/0 i read TRUE

Can you help me please?

Best regards,
Alexandru.
Reply
#22
You need to decode the reply using JSON:
Code:
reply1 = require('json').decode(reply1)
grp.write('5/0/0', reply1)
Reply
#23
(22.07.2024, 08:09)admin Wrote: You need to decode the reply using JSON:
Code:
reply1 = require('json').decode(reply1)
grp.write('5/0/0', reply1)

Thank you. It works.
Reply


Forum Jump: