This article gives examples to introduce how to connect to devices via MQTT.fx.
According to the information about Create Product and Create Device in Quick Start, create MQTTS products and devices. In this example, several parameters related to device access are as follows:
Product ID | Device Name | Device key |
---|---|---|
238322 | mqtts-test-device | EnW4T71eIE55xOIQMN6pFMKuqel5T5HTzsGJRPiDh |
Open MQTT.fx client and go to the configuration page.
Set Profile Name, which is MQTTS Device Access in this example.
Set access address & port and username & password, in which the parameters are set as follows:
Client ID | User Name | Password |
---|---|---|
Device name: mqtts-test-device | Product ID: 238322 | See Token Algorithm |
In this example, Password is shown as follows:
version=2018-10-31&res=products%2F238322%2Fdevices%2Fmqtts-test- device&et=7557387130&method=sha1&sign=Rs0u%2FKnyoK5%2FMuKo 5xKa0tW%2BWqY%3D
As shown below:
Click SSL/TLS to proceed to the encryption settings.
Select CA certificate file to import a certificate.
Click OK to finish the configuration.
Click the arrow down icon to select profile “MQTTS Device Access”
Click Connect to connect to the device. At this time, the console device is "online".