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

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/article/how-to-show-dht11-data-on-qiot-dashboard

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

Open IoT Applications to get HTTPS settings



  • Open your IoT Applications and go to your Things.

  • Click the "Connect a Device" button.

  • Choose "HTTPS" and click "Next".

  • Click "Download JSON file". The name of the file will be "resourceinfo.json".


* More information about "resourceinfo.json"
The following is example code from resourceinfo.json:
{
"accesstoken": "r:e91d53d57729b9d0b59772f9f2a130dc",
"myqnapcloudHost": "Not Available",
"clientId": "rpi2_1508982362",
"host": [
"172.17.28.73"
],
"requesterid": "c08b5979-1f8f-42da-9085-d761707be65c",
"port": 23443,
"resources": [
{
"description": "",
"datatype": "Float",
"resourceid": "temp",
"topic": "qiot/things/admin/rpi2/temp",
"resourcename": "temp",
"resourcetypename": "Temperature",
"unit": "°C"
}
]
}


  • Explanation:

    1. "accesstoken" : This value must be included for use in the HTTP header

    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. "clientId": Devices identifiers.

    4. "host": The NAS IP

    5. "requesterid" : This value must be included for use in the HTTP header

    6. "port": The HTTPS port.

    7. "resources": Information of resource, including the following:

      • description: QIoT resource description

      • datatype: QIoT resource data types

      • resourceid: QIoT resource identifiers

      • topic: The route for HTTP to send and receive.

      • resourcename: QIoT resource names.

      • resourcetypename: QIoT resource type names.

      • unit: QIoT resource units.





  • Type of Connection:
    "Publish":


    • method: PUT

    • path: /resources/<topic>

    • Header:

      • Access-Token: <accesstoken>

      • RequesterId: <requesterid>

      • Content-Type: application/json



    • body:

      • {"value" : <data>}




    "Receive":

    • method: GET

    • path: /resources/<topic>

    • header :

      • Access-Token : <accesstoken>

      • RequesterId : <requesterid>

      • Content-Type : application/json






Using the above example, you would get the following "URL" link:
"https://172.17.28.73:23000/resources/qiot/things/admin/rpi2/temp"

Get SSH certification



  1. Go to "ControlPanel" > "Securilty" > "Certificate & Private Key".

  2. Click "Download certificate".

  3. Select "Certificate" and click "OK"

arrow
arrow
    全站熱搜

    tttt 發表在 痞客邦 留言(1) 人氣()