![]() |
|
transmit value via ETH - Printable Version +- LogicMachine 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: transmit value via ETH (/showthread.php?tid=6497) |
transmit value via ETH - Frank68 - 02.07.2026 Good morning, I need to transmit the value of a group address (rain security) from one logic machine to another on the same network. The group address to be transmitted on LM with IP 192.168.0.213 is 1/4/15, which I need to replicate on LM with IP 192.168.0.225 and address 16/6/27. How can I do this? Thank you very much. RE: transmit value via ETH - Daniel - 02.07.2026 Two options, one is to make an event script on one of the LMs and create one extra group on the M t match the address and write let say 16/6/27 and write value of 1/4/15 to it. Another alternative(I would use) is to use MQTT cient app. You can then map both groups to same topic and then they will exchange the data. You will need a local broker on one of the LMs. RE: transmit value via ETH - admin - 02.07.2026 You can also use Remote services if you need to transfer only one or several values: https://kb.logicmachine.net/misc/remote/ RE: transmit value via ETH - Frank68 - 02.07.2026 (Today, 07:05)Daniel Wrote: Two options, one is to make an event script on one of the LMs and create one extra group on the M t match the address and write let say 16/6/27 and write value of 1/4/15 to it. How do I install the MQTT broker on the LM? Where can I find a configuration example? Thanks RE: transmit value via ETH - admin - 02.07.2026 Here's a complete example for Remote services. 1. Enable Remote services on 192.168.0.225 - Go to System config > Services > Remote services. - Create a password, but make sure that it doesn't have @ symbol or the script will fail - For extra security enable "Allow only exported objects" option 2. Enable Export property for 16/6/27 on 192.168.0.225 3. Create an event script on 192.168.0.213 that is mapped to 1/4/15. Put the correct password into the password variable value. 4. Test the script. If the value does not update on 192.168.0.225 then check the Logs tab on 192.168.0.213. An error message will be provided there. Code: password = 'put_password_here'
ip = '192.168.0.225'
addr = '16/6/27'
http = require('socket.http')
value = event.getvalue()
qs = 'm=json&r=grp&fn=write&alias=' .. addr .. '&value=' .. tostring(value)
url = 'https://remote:' .. password .. '@' .. ip .. '/scada-remote?' ..qs
res, err = http.request(url)
if not res then
log('request failed', err)
end |