This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

How to use MQTT Broker app
#1
Hello,

where can I find info about using of MQTT Broker app?
Done is better than perfect
Reply
#2
This app configures the built-in MQTT server/broker. Most options are self explanatory. Do you have a question about a specific option?
Reply
#3
I don't know MQTT, but I am searching for reliable solution like Websocket or something similar for connecting to LM from other LAN device to have realtime communication from bus.

As I see I can subscribe to some topics. What topics are available?

Perfectly would be localbus but I cannot connect to LM websocket also from LAN because of problem with https certificate. http also not working.
Done is better than perfect
Reply
#4
You need to create a script with MQTT Client, there are several examples on the forum. Here is LM to LM
https://forum.logicmachine.net/showthrea...9#pid16879
------------------------------
Ctrl+F5
Reply
#5
So broker can connect subscriber and provider but initially there is no provider and subscriber, so I must prepare some server script on LM. Am I right?
Done is better than perfect
Reply
#6
MQTT is client to broker communication. If you want to connect two devices both must subscribe to same topic on the broker. Here we adding ability to run broker on LM but you need client on both devices. One client will publish the topic and second client will subscribe to it.
------------------------------
Ctrl+F5
Reply
#7
Thanks Daniel for response

Concept of mqtt I understand but when I try use it on lm it not works (I don't know what I am doing wrong). I've tried this also on demo LM with script from this post:
https://forum.logicmachine.net/showthrea...9#pid16879

I've created client script which connects to broker, but before login there is a problem with simple connection with broker:
http://4n.lv:7999/scada-main/main/editor?id=13

'mqtt connect failed Connection refused'

I don't know what is the current state of broker, app is theoretically installed.

So this is why I've asked about simple publisher-subscriber-broker example which I can copy paste and it should work. Now I don't know why this is not working. This is on the same device.

Probably there is a problem with MQTT Broker app. I've added user but after refresh it is not visible in list and no error. Same with setting 'Enable MQTT broker without encryption' and '...with encryption'
Done is better than perfect
Reply
#8
Which firmware are you using?
Reply
#9
Still 20200720
Done is better than perfect
Reply
#10
This will not work on the demo LM. Do you have any other local LM?
------------------------------
Ctrl+F5
Reply
#11
(28.06.2021, 08:39)Daniel. Wrote: This will not work on the demo LM. Do you have any other local LM?

Yes I have with this firmware and I had similar result. Before login there is the same error.

I've checked not this problem with saving config and on my local LM it works. I will check now logging.
Done is better than perfect
Reply
#12
Did you press the Save Changes button in the broker app? I missed it few times.
If you use it on same device use IP 127.0.0.1
------------------------------
Ctrl+F5
Reply


Forum Jump: