Logic Machine Forum
How to use MQTT Broker app - Printable Version

+- Logic Machine Forum (https://forum.logicmachine.net)
+-- Forum: LogicMachine eco-system (https://forum.logicmachine.net/forumdisplay.php?fid=1)
+--- Forum: Application Store (https://forum.logicmachine.net/forumdisplay.php?fid=11)
+--- Thread: How to use MQTT Broker app (/showthread.php?tid=3432)



How to use MQTT Broker app - buuuudzik - 22.06.2021

Hello,

where can I find info about using of MQTT Broker app?


RE: How to use MQTT Broker app - admin - 23.06.2021

This app configures the built-in MQTT server/broker. Most options are self explanatory. Do you have a question about a specific option?


RE: How to use MQTT Broker app - buuuudzik - 23.06.2021

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.


RE: How to use MQTT Broker app - Daniel - 23.06.2021

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/showthread.php?tid=2628&pid=16879#pid16879


RE: How to use MQTT Broker app - buuuudzik - 23.06.2021

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?


RE: How to use MQTT Broker app - Daniel - 23.06.2021

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.


RE: How to use MQTT Broker app - buuuudzik - 27.06.2021

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/showthread.php?tid=2628&pid=16879#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'


RE: How to use MQTT Broker app - admin - 28.06.2021

Which firmware are you using?


RE: How to use MQTT Broker app - buuuudzik - 28.06.2021

Still 20200720


RE: How to use MQTT Broker app - Daniel - 28.06.2021

This will not work on the demo LM. Do you have any other local LM?


RE: How to use MQTT Broker app - buuuudzik - 28.06.2021

(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.


RE: How to use MQTT Broker app - Daniel - 28.06.2021

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


RE: How to use MQTT Broker app - Domizy - 13.06.2024

Hello, i'm new

How can I download the MQTT Broker package for Spacelynk?

Thanks


RE: How to use MQTT Broker app - Daniel - 14.06.2024

Use search on the forum.


RE: How to use MQTT Broker app - Domizy - 14.06.2024

(14.06.2024, 08:53)Daniel Wrote: Use search on the forum.

I did it. I found a package mqtt-broker-20200320 but it doesn't work...


RE: How to use MQTT Broker app - Daniel - 14.06.2024

This app is not officially supported by SE so if it doesn't work then it doesn't. On LM it works.