Logic Machine Forum
KNX / TP error. - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Hardware (https://forum.logicmachine.net/forumdisplay.php?fid=12)
+--- Thread: KNX / TP error. (/showthread.php?tid=3950)

Pages: 1 2


RE: KNX / TP error. - alexandrub - 22.07.2024

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.


RE: KNX / TP error. - admin - 22.07.2024

You need to decode the reply using JSON:
Code:
reply1 = require('json').decode(reply1)
grp.write('5/0/0', reply1)



RE: KNX / TP error. - alexandrub - 22.07.2024

(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.