Caution! Article for developers

Information on this page is intended particularly for users with advanced technical knowledge.

How to set up the MQTT connection

Apr 8, 2022 · 1 minutes to read

MQTT is a network protocol that transports messages inbetween devices.

  1. Connect to the Treon Gateway by using SSH.

  2. Add a configuration file (ending in .conf) to /opt/iotgw/conf.d

[CloudAdapter]
CloudType: azure_paho
CloudBackend: mqtt
MqttBaseUrl: <your MQTT broker url or ip address>
MqttPort: <mqtt port>
MqttUserName: <mqtt username>
MqttPassWord: <mqtt password>
  1. Restart the iotgw application
systemctl restart iotgw

 

Notes on the configuration:

  • The username and password fields are necessary only if they are required by the MQTT broker.
  • The MQTT port default values are 8883 (secure) and 1883 (insecure).
  • If the MQTT broker is not using TLS, an additional parameter is needed to allow insecure connection.
MqttAllowInsecure:yes

Was this article helpful? Let us know.