Access Instance - Upload Data Points

This article gives examples to introduce how to upload device data points via MQTT.fx.

MQTT Client 1.7.1 download

Prerequisites

Before uploading data points, complete the creation of products and devices, and perform device connection. Please refer to the Device Connection Instance for steps.

Upload Data Points

Subscribe to upload result notification

In order to ensure that the message uploaded by a device is accepted by the platform, the device can subscribe to a system topic to get the result message from uploading data points.

Select Subscribe and enter the subscribed topic name.

Topic naming rules are as follows:
$sys/{pid}/{device-name}/dp/post/json/+
In this example, the subscribed topic is: $sys/238322/mqtts-test-device/dp/post/json/+

Click Subscribe to complete the topic subscription.

Device Data Point Upload

Select Publish and enter the published topic.

Topic naming rules are as follows:
$sys/{pid}/{device-name}/dp/post/json
In this example, the published topic name is: $sys/238322/mqtts-test-device/dp/post/json

Below is an example of the payload:

{
    "id": 123,        
    "dp": {             
        "temperatrue": [{     
            "v": 30,
        }],
        "power": [{     
            "v": 4.5,        
        }]
    }
}

Click Publish to upload data points to the platform.

After completion, you can receive an upload result notification from the platform via Subscribe. If the message is received by .../AcceptedTopic, it means that the message has been successfully processed by the platform.

View Data in Console

After data are successfully uploaded, you can view the data points uploaded by your device through console’s Device List -> Data Stream.

个搜索结果,搜索内容 “

    0 个搜索结果,搜索内容 “