当前位置:网站首页>Onenet Internet of things platform - the console sends commands to mqtt product devices
Onenet Internet of things platform - the console sends commands to mqtt product devices
2022-07-01 12:05:00 【Rain cloud 21】
Subscribe to system commands topic
$sys/{
pid}/{
device-name}/cmd/request/{
cmdid}
topic in {cmdid} As a variable , Unique for each command id, You can subscribe through wildcards , such as :
$sys/{pid}/{device-name}/cmd/request/+, perhaps$sys/{pid}/{device-name}/cmd/#
open MQTT.fx, Connecting device , choice Subscribe term , Enter subscription topic name . My is $sys/480701/yuyun-test/cmd/# Pictured :

The console issues a command
open onenet Platform MQTT Internet of things Suite , As shown in the figure below Where to find Issue order

Enter the command content and timeout , Click on send out

MQTT The simulation tool will receive a topic news , As shown in the figure below

The figure shows the device receiving the command topic by :
$sys/480701/yuyun-test/cmd/request/7e0bf5f6-e80d-419b-a3e8-01b704f06e3d
Analog device response
The answer is topic The order is :
$sys/{
pid}/{
device-name}/cmd/response/{
cmdid}
Use MQTT.fx Post a message to the corresponding topic, Analog device response
The answer is topic The one who received the order in the above figure , Will be one of the request Change it to response, And then in Publish Add the content that needs to be answered . As shown in the figure below :

And then back to Subscribe Check the received messages : Use MQTT.fx After the analog device answers , From the system topic Receiving a message indicates , The device responded successfully . As shown in the figure below :

At the same time, the command tool on the platform page will display the response result of the command , As shown in the figure below :

among cmd_resp": “ytW1vaOh” Answer the message for the device “ received !” Of base64 Coding form , Use base64 Decrypted as GB2312 You can see the encoding format :

边栏推荐
- Brief explanation of the working principle, usage scenarios and importance of fingerprint browser
- 用实际例子详细探究OpenCV的轮廓检测函数findContours(),彻底搞清每个参数、每种模式的真正作用与含义
- Redis configuration environment variables
- Huawei HMS core joins hands with hypergraph to inject new momentum into 3D GIS
- Rural guys earn from more than 2000 a month to hundreds of thousands a year. Most brick movers can walk my way ǃ
- Computer graduation project asp Net attendance management system vs developing SQLSERVER database web structure c programming computer web page source code project
- About keil compiler, "file has been changed outside the editor, reload?" Solutions for
- MQ prevent message loss and repeated consumption
- 自定義 grpc 插件
- Learning summary on June 29, 2022
猜你喜欢

On recursion and Fibonacci sequence

Prepare for the Blue Bridge Cup Day10__ PWM control light brightness
![[Yunju entrepreneurial foundation notes] Chapter VII Entrepreneurial Resource test 1](/img/be/1194125442aaa2d7cc20b6a4a6762a.jpg)
[Yunju entrepreneurial foundation notes] Chapter VII Entrepreneurial Resource test 1

91.(cesium篇)cesium火箭發射模擬

Summary of JFrame knowledge points 1

MQ-防止消息丢失及重复消费

Exposure: a white box photo post processing framework reading notes

Use of easyexcel

Binary stack (I) - principle and C implementation

Joint Time-Frequency and Time Domain Learning for Speech Enhancement
随机推荐
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 8
CPU 上下文切换的机制和类型 (CPU Context Switch)
Want to ask, is there a discount for opening a securities account? Is it safe to open a mobile account?
耐克如何常年霸榜第一名?最新財報答案來了
USB peripheral driver - cable connect/disconnect
GID: open vision proposes a comprehensive detection model knowledge distillation | CVPR 2021
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 5
区间乘积的因子数之和——前缀和思想+定一移二
LeetCode 454. 四数相加 II
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7
构建外部模块(Building External Modules)
用于分类任务的数据集划分脚本
leetcode 406. Queue Reconstruction by Height(按身高重建队列)
[Yunju entrepreneurial foundation notes] Chapter VII Entrepreneurial Resource test 1
Kernel synchronization mechanism
Talk about biological live broadcast - genovis Zhang Hongyan antibody specific enzyme digestion technology helps to characterize the structure of antibody drugs
Huawei HMS core joins hands with hypergraph to inject new momentum into 3D GIS
redis配置环境变量
Unity xlua co process packaging
Dlhsoft Kanban, Kanban component of WPF