LogicMachine Forum
Exchange data between two LM5 - 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: Exchange data between two LM5 (/showthread.php?tid=4176)



Exchange data between two LM5 - Fahd - 05.08.2022

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?


RE: Exchange data between two LM5 - admin - 05.08.2022

If you only need to send data one way then you can connect both LMs to the same ZeroTier network and use remote services (HTTP requests) to send data periodically. Use IP addresses assigned by ZeroTier for communication not LM internal IP. Remote services docs: https://openrb.com/docs/remote-new.htm


RE: Exchange data between two LM5 - Fahd - 05.08.2022

(05.08.2022, 09:43)admin Wrote: If you only need to send data one way then you can connect both LMs to the same ZeroTier network and use remote services (HTTP requests) to send data periodically. Use IP addresses assigned by ZeroTier for communication not LM internal IP. Remote services docs: https://openrb.com/docs/remote-new.htm

Hi again, 
yes it's just one way, in fact, I will have to send 20 objects from one LM to the other 

Could you please give me one example?

lm1 IP address is 192.168.191.79
lm2 IP address is 192.168.191.181
I want to send the object 10/0/2 2byte float from LM1 to LM2, Should I create an object in lm2 and write a script in that object  to read that value from lm1?


RE: Exchange data between two LM5 - Daniel - 05.08.2022

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 .. '')



RE: Exchange data between two LM5 - Fahd - 05.08.2022

(05.08.2022, 11:10)Daniel Wrote: 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 .. '')
Thanks a LOT, guys. it worked via resident a script in the second lm,
Is it possible to write the value only when it changes not via resident every 60s?


RE: Exchange data between two LM5 - Daniel - 05.08.2022

Use grp.checkwrite('0/0/7', reply)


RE: Exchange data between two LM5 - toujour - 03.12.2024

When I use the URL for getvalue I receive the login request from the HL, what is the problem ?

http://remote:mypassword4remote@192.168.0.10/scada-remote?m=json&r=grp&fn=getvalue&alias=35/0/18


RE: Exchange data between two LM5 - admin - 04.12.2024

Browser won't send the login/password unless requested explicitly. For testing you can use curl which sends the login/password as needed: https://curl.se/windows/


RE: Exchange data between two LM5 - manos@dynamitec - 18.12.2024

Hello Admin,

We have 4 different locations where we read energy values via modbus tcp from multiple energy meters on each site and would like to create one whole visualization for the end user on one of the locations. What is the best practice to exchange data between the 4 LMs? This may expand in the future with more locations.

Currently the LMs share the same ZeroTier network. Is there an easy or direct way to allow the LMs to communicate with each other over the KNX multicast protocol (IP routing) using ZeroTier?

Thank you in advnace.


RE: Exchange data between two LM5 - Daniel - 18.12.2024

The easiest way is to use our cloud.
Option 1: Use Mosaic and in cloud settings Enable Mosaic for multipe networks. Once enabled you will have Mosaic admin icon where you can build project from multiple LMs added to this account.
Option2. Add all LMs to the same network in our cloud. Then tag all objects which you want to exchange data between LMs with tag 'lmcloud' Sync LM cloud app and data will go across all LMs using MQTT via broker on our cloud. You would need to have same objects on all LMs with the tag for it to work. When adding more then one LM to the same network(use same string) you will have to manually give it permissions in the cloud settings.


RE: Exchange data between two LM5 - manos@dynamitec - 18.12.2024

(18.12.2024, 13:09)manos@dynamitec Wrote: Hello Admin,

We have 4 different locations where we read energy values via modbus tcp from multiple energy meters on each site and would like to create one whole visualization for the end user on one of the locations. What is the best practice to exchange data between the 4 LMs? This may expand in the future with more locations.

Currently the LMs share the same ZeroTier network. Is there an easy or direct way to allow the LMs to communicate with each other over the KNX multicast protocol (IP routing) using ZeroTier?

Thank you in advnace.

Hello Admin,

Don't bother I found the answer here https://forum.logicmachine.net/showthread.php?tid=5625

Though I hope to to get the KNX multicast over ZT feature soon and make it selectable somewhere in the options so that current ZT networks won't allow multicast traffic by default when the LM firmware is upgraded.


RE: Exchange data between two LM5 - Simuzer - 17.12.2025

Hello everyone...

i use that

Code:
http://remote:Remote123@192.168.0.10/scada-remote?m=json&r=grp&fn=getvalue&alias=63/1/23


BNut the login page appears on the screen.

The login page appears on the screen.

Information appears when you log in. But I want this to be automatic. I'm not always at the PC. Whenever the object value changes in LM5 (A), the information in LM5 (B) should also change.

Quote:from value 
LM5 (A) (192.168.2.154)
63/1/23

to 
LM5 (B) (192.168.0.10)
63/1/23

In other words, I want the information in B to change immediately when the information in A changes.


RE: Exchange data between two LM5 - admin - 17.12.2025

Enable "Send Basic auth header" in System config > Services > Remote services. Make sure you have the latest firmware (2025).


RE: Exchange data between two LM5 - Daniel - 17.12.2025

https://kb.logicmachine.net/integration/mqtt-cloud/
This is much better solution, you can use local broker if they have access already.


RE: Exchange data between two LM5 - Simuzer - 17.12.2025

(17.12.2025, 09:50)Daniel Wrote: https://kb.logicmachine.net/integration/mqtt-cloud/
This is much better solution, you can use local broker if they have access already.

Thanks but there is no internet.


RE: Exchange data between two LM5 - Daniel - 17.12.2025

There is no need for internet if you use local broker. It is just app on one of the LMs


RE: Exchange data between two LM5 - Simuzer - 17.12.2025

(17.12.2025, 14:04)Daniel Wrote: There is no need for internet if you use local broker. It is just app on one of the LMs

There is no MQTT server, client ets.. Because, need internet Sad

(17.12.2025, 09:38)admin Wrote: Enable "Send Basic auth header" in System config > Services > Remote services. Make sure you have the latest firmware (2025).


The last stable version : 2024.04
https://www.logicmachine.net/downloads

I'm continuing to work on my project based on this version. Will I encounter any problems with my project when I upgrade to the 2025.12 RC3 version? And can I revert back to 2024.04 if necessary?


RE: Exchange data between two LM5 - Daniel - 17.12.2025

Apps can be installed via file upload, option from the menu in the app store.
https://www.transfernow.net/dl/20251217Hmwio2I1
It is Release candidate, it is very stable and I'm quite confident it will become stable version very soon but you never know Smile
Reverting to older firmware can be done by flashing SD card.


RE: Exchange data between two LM5 - Simuzer - 17.12.2025

(17.12.2025, 14:45)Daniel Wrote: Apps can be installed via file upload, option from the menu in the app store.
https://www.transfernow.net/dl/20251217Hmwio2I1
It is Release candidate, it is very stable and I'm quite confident it will become stable version very soon but you never know Smile
Reverting to older firmware can be done by flashing SD card.

thank you.  Heart

Could you also send the mqtt_client application?


RE: Exchange data between two LM5 - Daniel - 18.12.2025

https://www.transfernow.net/dl/20251218R5Ah2k5p