Logic Machine Forum
How to execute json link inside spacelynk - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Gateway (https://forum.logicmachine.net/forumdisplay.php?fid=10)
+--- Thread: How to execute json link inside spacelynk (/showthread.php?tid=5456)



How to execute json link inside spacelynk - mohammadsaeed01 - 08.06.2024

Hi guys,

I have SpaceLynk and I enabled remote service in order to use json, I can execute this "(https://192.168.0.90/scada-remote?m=json&r=grp&fn=write&alias=0/0/1&value=off)" through my network.

But I want to execute this between two spacelynks gateway.

Is there any lua script can help me to achieve that?

because i want to read and write values between two spacelynk gateways in the same network.

Thanks for all

Mohammad


RE: How to execute json link inside spacelynk - admin - 10.06.2024

Why don't use use KNX/IP Routing for local data exchange? It does not require any scripts.

The correct usage via script is this. Change RemotePassword to the actual password.
Code:
http = require('socket.http')
res, err = http.request('https://remote:RemotePassword@192.168.0.90/scada-remote?m=json&r=grp&fn=write&alias=0/0/1&value=true')
log(res, err)

For 1 bit objects valid values are true/false or 1/0.