Hi, is there a sample for download available for the mqtt client? I can’t send or receive any data to the broker. And I also want to know if the connection is up and running or if it is disconnected. Can I see in the log files if the mqtt client is connected?
Hello, The instructions in the Store should be enough to get up and running - it includes a basic configuration file and an explanation of all the configuration settings. The only other step is to create IN and OUT port variables to receive and send the MQTT message data, and this can be done using PLCnext Engineer - let us know if you need help with this step. You can see if the connection was successful from messages in the file /opt/plcnext/logs/Output.log. (Search this file for “Mqtt”). If you would like to send a copy of that file, I can help investigate this problem. Martin.
Hi Martin, This is the source code and the json file. It seems that it cannot make any connection to mqtt and in the log files I can’t find anything about mqtt also. How can I upload the files? It only supports gif,jpg,png,jpeg,pdf. David
Hi Martin, i placed it on wetransfer: https://wetransfer.com/downloads/1db0f809b41cf1616a785fa34c2a65b620191018071639/39348e8c7c176b9593b0f5d9d3fba57720191018071639/c446e7 Kind regards, David de Roo
Hi David, That’s strange, it looks like the PLCnext runtime is not even attempting to start the MQTT Client … Can you please check that the following file is present on the PLC: /opt/plcnext/projects/Default/60002172000048.acf.config (this should have been installed automatically when you installed the app from the Store, and it instructs the PLCnext runtime to start the MQTT client). … and if it is, can you please try restarting the PLC and checking the Output.log file again? re. attachments - yeah, that’s a limitation on this forum. You can either PDF the Output.log file, or send me files directly by email - mboers at phoenixcontact dot com. Martin.
Hi Martin, the file is not there. What should we do? Uninstall and then reinstall the component again? Or can you send me the file? David de Roo
Hi David … just to go back a few steps … you are talking about the MQTT Client app from the PLCnext Store …right? If so -
* Can you confirm that the PLCnext Store is showing that the app has been installed successfully to the PLC? * And if you have more than one PLC ... are you sure that it has been installed to the PLC you think? (I have to ask!)If this all looks OK, then yes - please try uninstalling and re-installing the app from the PLCnext Store. If this is not the app you are talking about … please let me know and I will start again.
Martin.
Hi Martin, I can not uninstall the application. I’ve attached the screenshot with it. Do you have any idea what we can do next? David de Roo
Hi David, This looks like the problem - the app wasn’t installed properly from the Store. I will check with our PLCnext Store expert on Monday for the best course of action. (I also deleted the screen shot attached to the previous post, because it shows the UUID of your PLC). Martin.
Hi David, It seems that there is some sort of deadlock between the store and the PLC. Please do a type 1 reset on the PLC, and then reset the regtoken for the PLC, then install the app again. Martin.
Hi Martin, the reset type 1 and reset regtoken didn’t resolve anything. There is still no uninstall available and remove device is greyed out. Now is the device offline while the plc is registred and online. Kind regards, David de Roo
Hi David, I assume that:
* The Web-Based Management page (WBM) is showing the PLC online and connected to Proficloud? * When you are logged in to the Store, in your Profile view, on the "My Licenses & Devices" tab, the PLC is shown "offline" (red), even after the "Refresh Status" button has been pressed?Is that correct? If so … that would be very unusual, and we will need to investigate further. Martin.
Hi Martin, That’s correct. I can choose now remove device (that was not possible before), but after readding it stills says the device is offline David de Roo
Hi David, Can you please work through this FAQ and let us know the result: https://www.plcnext-community.net/index.php?option=com_fss&view;=faq&tmpl;=component&window;=1&faqid;=110&Itemid;=433⟨=en Martin.
Has there been an update to being able to get the MQTT broker installed from the store? I have tried a few times (Install and then uninstall from the store). The store seems to get stuck with uninstalled 100% for the status. I checked the PLC through the WBM And there is no licenses installed. Also looking at the PLC using a SSH session there are not files in the apps director. The mosquito commands are not recognized. I believe it is never installed from the store. Any suggestions?
Hello, I will ask our store specialist to contact you to assist. Just for clarity, David was having problems installing the MQTT Client app, not the Mosquitto Broker - which I also installed yesterday on my PLC without any problems. In these cases it is not the app that is the problem, it is something between the Store and the PLC. Martin.
Hello stubbs, the Mosquitto app was installed and then uninstalled again, right ? >> Also looking at the PLC using a SSH session there are not files in the apps director. If you uninstalled the app, it seems to be correct behavior. We know that sometimes there are synchronization difficulties between the store and the device. Does it help to update the BrowserTab ? >I checked the PLC through the WBM And there is no licenses installed. The Mosquitto app is offered free of charge, therefore the app does not contain a license.
Daniel, Thanks for the reply. To clarify what I have done here is a list of steps made trying to install the app.
1. Connected the PLCnext to my account and verified it was active in the WBM page of the PLC next and on my account page. 2. Selected install from the MQTT mosquito app from the store. 3. The status under my devices said installing 10%. I then clicked refresh status after a minute or two and the status changed to uninstalled 100%. 4. I checked the PLC memory using an ssh session and looked in the apps directory and the installedapps directory and nothing appeared to be installed. 5. After several minutes I checked the status under my devices and there was no change. 6. I clicked cancel install. 7. Repeated steps 2 to 4.Based on your reply it is a problem with the connection with the store and the PLCnext. I will try another path to the internet and see it that corrects the problem. In the mean time is there a tutorial or read me on installing the app container? The note says you can use the WBM for install in a future firmware release (2020) but besides using an apt-get method and working out any issues is there a way to do an offline install using firmware 2019.3? Also if there is a better thread to post this please move it or direct me there. Thanks again for your help.
Hello Stubbs, thanks for your detailed description. From point 3 and 4 I can see, that the store is installing the app. But the device resists it. The reason can be found in /opt/plcnext/logs/Output.log I’ve just tried it out. the installation works for me. >>is there a way to do an offline install using firmware 2019.3? Unfortunately there is no convenient way to install a PLCnext app offline at 2019.3 yet.

