[Important Security Notice] Fake Qfinder Pro Websites Detected. Learn more >

How to connect to QIoT Suite Lite using MQTT?


Last modified date: 2019-07-03

In this tutorial, you will learn how to connect to QIoT Suite Lite using MQTT.

Refer to the following tutorial to learn how to connect different development boards to QioT Suite Lite: https://www.qnap.com/go/how-to/tutorial/qiot-suite-lite

Refer to the following link to learn how to establish IoT Application and Things: https://www.qnap.com/go/how-to/tutorial/con_show.php?cid=289

You can also consult the QNAP GitHub at https://github.com/qnap-dev/qnap-qiot-sdks

Open IoT Applications to get MQTT settings

  • Open your IoT Applications and go to your Things.
  • Click the "Connect a Device" button.
  • Choose "MQTT" and click "Next".
  • Click "Download JSON file". The name of file will be "resourceinfo.json".

* More information about "resourceinfo.json"
The following is example code from resourceinfo.json:

	{

      "username": "c08b5979-1f8f-42da-9085-d761707be65c",

      "myqnapcloudHost": "Not  Available",

      "clientId":  "rpi2_1509005726",

      "host": [

      "172.17.28.73"

      ],

      "password":  "r:e91d53d57729b9d0b59772f9f2a130dc",

      "port": 21883,

      "resources": [

      {

       "description":  "",

       "datatype":  "Float",

       "resourceid":  "temp",

       "topic":  "qiot/things/admin/rpi2/temp",

       "resourcename":  "temp",

       "resourcetypename":  "Temperature",

       "unit": "°C"
       }

      ]
  }
  • Reference:
    1. "host" : The NAS IP
    2. "myqnapcloudHost": If you connect the myqnapcloud DDNS services on your NAS and it will provide a Internet hostname that can connect to QIoT Suite Lite. If your encounter issues with ports, then refer the following article: https://qiot.qnap.com/blog/en/2017/09/21/solve-problem-using-different-port-qiot-suite-lite-v1-0-41/
    3. "port": The MQTT port.
    4. "clientId": Devices identifiers.
    5. "username": The MQTT username.
    6. "password" : The MQTT password.
    7. "resources": Information of resources, including the following:
      • description: QIoT resource description.
      • datatype: QIoT resource data types.
      • resourceid: QIoT resource identifiers.
      • topic: The MQTT topic to publish and subscribe.
      • resourcename: QIoT resource names
      • resourcetypename: QIoT resource type names.
      • unit : QIoT resource units.
  • Type of Connection:
    "Connection":
    • Username : <username>
    • Password : <password>
    • Client ID : <clientId>
    "Publish":
    • Topic : <topic>
    • Payload:
      • {"value" : <data>}
    "Subscribe":
    • Topic : <topic>

Was this article helpful?

25% of people think it helps.
Thank you for your feedback.

For further assistance, ask other users and QNAP experts in the community. Go to QNAP Community

Please tell us how this article can be improved:

If you want to provide additional feedback, please include it below.

Choose specification

      Show more Less
      Choose Your Country or Region
      open menu
      back to top