Nocive MQTT Question - Printable Version +- Logic Machine Forum (https://forum.logicmachine.net) +-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1) +--- Forum: Scripting (https://forum.logicmachine.net/forumdisplay.php?fid=8) +--- Thread: Nocive MQTT Question (/showthread.php?tid=4121) |
Nocive MQTT Question - gtsamis - 29.06.2022 Hello, I have several Teltonika TRB141 installed on remote sites that monitors a water tank. Until now i use a central LM to get sensors values via POST/GET. I have never worked before with MQTT and knowing that Teltonika & LM both support it i was wondering if there are any major advantages using it for my case. If so are there any guides on how to implement it? In the link below is a very basic MQTT guide for Teltonika https://wiki.teltonika-networks.com/view/Monitoring_via_MQTT Thank you in advance George RE: Nocive MQTT Question - admin - 29.06.2022 The major advantage is that MQTT is event-based so you will get data more or less instantly. For sensor data this might not be needed though. First you need to install MQTT broker app on LM and enable the broker. Then you need a client script which will subscribe to sensor data topics and will send values to mapped group addresses. Client example: https://forum.logicmachine.net/showthread.php?tid=1759&pid=10926#pid10926 Change broker IP to 127.0.0.1 to use internal MQTT broker. RE: Nocive MQTT Question - tomnord - 16.11.2022 (29.06.2022, 12:47)admin Wrote: The major advantage is that MQTT is event-based so you will get data more or less instantly. For sensor data this might not be needed though. Will the LM Broker work via LM cloud? or do you need to make a port forward on the MQTTports in firewall? RE: Nocive MQTT Question - Daniel - 16.11.2022 LM cloud has MQTT broker as Mosaic and everything else is using MQTT but why do you ask? RE: Nocive MQTT Question - tomnord - 16.11.2022 Could be that I do not understand the broker function, but if I want a remote system to recieve data from LM via MQTT, does not the broker need to be accessable from outside? RE: Nocive MQTT Question - Daniel - 16.11.2022 MQTT is a clinet to broker communication and the client is to establish the connection to broker. If another client is somewhere in the 'internet' then the broker also should be on some server. Explain exactly what you trying to connect to LM. Theoretically if you use broker on LM and open ports to broker it should work but this is not correct approach(from security point of view). RE: Nocive MQTT Question - tomnord - 16.11.2022 I just wanted a easy way to send data to my remote SCADA without the use of VPN and such. If I understand you right, I should subscribe to a cloud based broker? RE: Nocive MQTT Question - Daniel - 16.11.2022 Yes RE: Nocive MQTT Question - admin - 16.11.2022 Or you can use ZeroTier. RE: Nocive MQTT Question - tomnord - 16.11.2022 (16.11.2022, 13:17)admin Wrote: Or you can use ZeroTier. Sure, but I was abit interrested in learning MQTT as well RE: Nocive MQTT Question - admin - 16.11.2022 I was referring to using MQTT over ZeroTier. RE: Nocive MQTT Question - tomnord - 16.11.2022 oh, thats also a thing. Thanks. Will look in to that also |