MQTT Broker Project with 2024 FW Problem - 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: MQTT Broker Project with 2024 FW Problem (/showthread.php?tid=5626) |
MQTT Broker Project with 2024 FW Problem - savaskorkmaz - 19.09.2024 Hi, I attached an old LM project backup which was working as MQTT Broker. I can reach and control the topics via MQTT Explorer. After I upgraded to 2024 fw, i can't see the topics via MQTT Explorer. I simply created a username and password in the MQTT Broker app. I created a resident script shown below with name MQTT Broker with zero time and i used same username and password in the script which is created in Broker app. It was working but it's not working with 2024 FW as i said before. I can't see the topics via MQTT explorer now. Can you check script or attached project and tell why it's not working with 2024 FW. Thx Code: if not broker then RE: MQTT Broker Project with 2024 FW Problem - Daniel - 19.09.2024 Why don't you use MQTT Client app, it is fully working and your setup will be finished in seconds. https://forum.logicmachine.net/showthread.php?tid=5609 RE: MQTT Broker Project with 2024 FW Problem - savaskorkmaz - 20.09.2024 Hi Daniel, We have both MQTT Client and MQTT Broker LM's in this project. LM which is used to MQTT Client has less point and we can use it MQTT client app. But in MQTT Broker LM, we have lots of points. To use copy paste function is from excel file much more easy. Therefore we need use resident script in MQTT Broker LM. Can you check the related script or backup with 2024 fw please which is shared in first post. Thx RE: MQTT Broker Project with 2024 FW Problem - Daniel - 20.09.2024 MQTT Broker has no points it is just a messenger between clients. The script you are sharing is MQTT client. RE: MQTT Broker Project with 2024 FW Problem - admin - 20.09.2024 Post a screenshot of your broken configuration. In MQTT Explorer you need to use the same authentication data as in the script. Topics won't be created until the mapped object is changed. RE: MQTT Broker Project with 2024 FW Problem - savaskorkmaz - 20.09.2024 H, I am sharing 3 screenshots. Initial screen of MQTT Explorer, connected screen of MQTT Exporer, MQTT Broker app screenshot. RE: MQTT Broker Project with 2024 FW Problem - admin - 20.09.2024 Try changing object value and the topic will appear in MQTT Explorer. If you want to keep last topic values for other clients then you need to enable retain flag for messages. To do this replace last line in publishvalue: Code: mclient:publish(topic, tostring(value)) With this: Code: mclient:publish(topic, tostring(value), 0, true) Note that LM MQTT broker does not have any persistence. If the broker is restarted then retained topics are lost until new value is published. Additionally you can modify the script to publish all mapped values after a connection to broker is established. Replace mclient.ON_CONNECT with this: Code: mclient.ON_CONNECT = function(res, ...) RE: MQTT Broker Project with 2024 FW Problem - savaskorkmaz - 20.09.2024 Hi, Thx for your support. It's working wery well now. Regards |