FORUM CTRLX AUTOMATION
ctrlX World Partner Apps for ctrlX AUTOMATION
Dear Community User! We have started the migration process.
This community is now in READ ONLY mode.
Read more: Important
information on the platform change.
08-23-2023 03:37 PM
Hello,
I am trying to connect to external broker mosquitto running local on my computer using lib-mqtt-paho libray or local javascript on WebIQ. It works fine from WebIQ Designer by Open preview level, but when I run project from Open Browser Preview or WebIQ Runtime I got error: "paho-mqtt.js:1046 WebSocket connection to 'wss://192.168.1.103:8090/' failed" and paho onFailure errorCode return 7.
mosquitto.conf
listener 8090
protocol websockets
How can I upload certificates file to paho.MQTT.Client (lib-mqtt-paho)?
How can I upload certificates to WebIQ Runtime? I have tried uploading via WebDAV, but there is no WebIQ Runtime folder. Will it be enough to configure WebIQ Runtime listen port with certificates enough to connect to broker?
Solved! Go to Solution.
08-23-2023 05:03 PM
1. When using the Paho MQTT example WebIQ is not connected to MQTT, rather only your browser is connected to MQTT. If you want to use MQTT with WebIQ, you can use the MQTT-to-OPC-UA server that you can download in the customer area for free.
2. All questions regarding Paho MQTT can be addressed at e.g. StackOverflow: https://stackoverflow.com/questions/tagged/paho as this is an open-source project.
3. You can upload TLS certificates and configure them using the Runtime Manager: http://<CORE IP>:10123, however :
4. As mentioned in 1. the certificate issue when using Paho in the browser is between your MQTT broker and your browser with WebIQ not involved. So the question would probably rather be "How can I setup TLS certificates on my MQTT broker?"