当前位置:网站首页>Onenet Internet of things platform - mqtt product equipment upload data points
Onenet Internet of things platform - mqtt product equipment upload data points
2022-07-01 12:05:00 【Rain cloud 21】
| System topic | purpose |
|---|---|
$sys/{pid}/{device-name}/dp/post/json | The device uploads data points |
$sys/{pid}/{device-name}/dp/post/json/accepted | System notification " The device uploads data points successfully " |
$sys/{pid}/{device-name}/dp/post/json/rejected | System notification " The device failed to upload data points " |
Subscribe to upload result notification
Devices can subscribe to the system topic Get upload data point result message
open MQTT.fx, Connecting device , choice Subscribe term , Enter subscription topic name
topic The naming rules are as follows (
+The wildcard ):$sys/{ pid}/{ device-name}/dp/post/json/+
For example, mine is $sys/480701/yuyun-test/dp/post/json/+, You can receive the notification sent back by the platform
The two commands in the figure below can obtain the commands sent by the platform to the device :

Device data point upload
choice Publish term , Enter publish topic , The naming rules are as follows :
$sys/{
pid}/{
device-name}/dp/post/json
The data content is as follows :
{
"id": 123,
"dp": {
"temperatrue": [{
"v": 30,
"t": 1552289676
}],
"power": [{
"v": 4.5,
"t": 1552289676
}],
"status": [{
"v": {
"color": "blue"
},
"t": 1552289677
},
{
"v": {
"color": "red"
},
"t": 1552289678
}
]
}
}
Parameter description :
| Parameters | type | If required | explain |
|---|---|---|---|
| id | int | yes | news ID, Greater than 0 The integer of , The range of values is ,4 The value range of signed number of bytes |
| dp | object | yes | Data point content ,key-value Format ,key Is the name of the data stream ,value by list One or more data point values in the format In the above example, I want to temperatrue、power、status Upload time stamped data in three data streams |
| v | - | yes | Data point value , It can be for int/float/string/object Multiple formats |
| t | init | no | Data point timestamp ,unix Time , The unit is in seconds , If you don't carry , Then the system will take the data arrival time as its data time |

Click on Publish Then upload data points to the platform , stay Subscribe You can see the information returned by the platform

The console looks at the data
Get into onenet View device data flow on the console , Here's the picture : Just use MQTT.fx Data uploaded by simulated devices

Upload more data , Then click on the data flow of the console , You can see the historical data of the data stream

It can also be refreshed in real time ( If the device has been uploading data , Then the data can be displayed in real time )
边栏推荐
- How to understand the developed query statements
- 构建外部模块(Building External Modules)
- 陈珙:微服务,它还那么纯粹吗?
- JS date format conversion method
- Is it safe for Huatai Securities to open an account online?
- The Missing Semester
- Comment Nike a - t - il dominé la première place toute l'année? Voici les derniers résultats financiers.
- [Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 5
- Machine learning - Data Science Library Day 3 - Notes
- 我在中山,到哪里开户比较好?实际上网上开户安全么?
猜你喜欢
![[MCU] [nixie tube] nixie tube display](/img/5e/9e14302b4e4f5e03601392ac90479d.png)
[MCU] [nixie tube] nixie tube display

Redis的攻击手法

Summary of JFrame knowledge points 1

Mechanism and type of CPU context switch

ACLY与代谢性疾病

消息队列之监控退款任务批处理过程

Computer graduation project asp Net hotel room management system VS development SQLSERVER database web structure c programming computer web page source code project

Joint Time-Frequency and Time Domain Learning for Speech Enhancement

LeetCode力扣(剑指offer 31-35)31. 栈的压入弹出序列32I.II.III.从上到下打印二叉树33. 二叉搜索树的后序遍历序列34. 二叉树中和为某一值的路径35. 复杂链表的复制

Prepare for the Blue Bridge Cup Day10__ PWM control light brightness
随机推荐
redis中value/hush
241. Design priority for operational expressions: DFS application questions
Joint Time-Frequency and Time Domain Learning for Speech Enhancement
Redis common sense
Golang introduces the implementation method of the corresponding configuration file according to the parameters
Epoll introduction
Machine learning - Data Science Library Day 3 - Notes
GID: open vision proposes a comprehensive detection model knowledge distillation | CVPR 2021
Neo4j Chinese developer monthly - issue 202206
The Missing Semester
Unity xlua co process packaging
Understanding of MVVM and MVC
用于分类任务的数据集划分脚本
Value/sortedset in redis
基于IMDB评论数据集的情感分析
邻接矩阵无向图(一) - 基本概念与C语言
【单片机】【数码管】数码管显示
Le semester manquant
华为HMS Core携手超图为三维GIS注入新动能
谈思生物直播—GENOVIS张洪妍抗体特异性酶切技术助力抗体药物结构表征