Posts: 163
Threads: 42
Joined: Mar 2021
Reputation:
2
Hi guys,
I have a KNX weather station in Building A and I want to send that data to Building B
Is it possible two send data between two lm5 that are connected on the same network in "Zerotier"?
If yes, How could I do that?
Posts: 4659
Threads: 24
Joined: Aug 2017
Reputation:
212
First you have to enable remote services and export objects.
You can ether read value or write to other LM.
Code:
require('socket.http')
socket.http.TIMEOUT = 5
-- Read from object
local reply = socket.http.request('http://remote:remote@192.168.0.10/scada-remote?m=json&r=grp&fn=getvalue&alias=0/0/8')
grp.write('0/0/7', reply)
-- Write to object
value = grp.getvalue('0/0/7')
local reply = socket.http.request('http://remote:remote@192.168.0.10/scada-remote?m=json&r=grp&fn=write&alias=0/0/8&value=' .. value .. '')
------------------------------
Ctrl+F5
Posts: 4659
Threads: 24
Joined: Aug 2017
Reputation:
212
Use grp.checkwrite('0/0/7', reply)
------------------------------
Ctrl+F5