当前位置:网站首页>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 :

边栏推荐
猜你喜欢

Redis' attack tactics

Istio, ebpf and rsocket Broker: in depth study of service grid

CPI tutorial - asynchronous interface creation and use

The Missing Semester

Le semester manquant

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

Summary of JFrame knowledge points 1
![[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 8](/img/16/e1a0a52964c8a55eb729469114fc60.jpg)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 8

Message queue monitoring refund task batch process

Powerful, easy-to-use, professional editor / notebook software suitable for programmers / software developers, comprehensive evaluation and comprehensive recommendation
随机推荐
About keil compiler, "file has been changed outside the editor, reload?" Solutions for
Force button homepage introduction animation
耐克如何常年霸榜第一名?最新財報答案來了
Share the method of how to preview PSD format and PSD file thumbnail plug-in [easy to understand]
Prepare for the Blue Bridge Cup Day10__ PWM control light brightness
Kernel synchronization mechanism
Message queue monitoring refund task batch process
CPU 上下文切换的机制和类型 (CPU Context Switch)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7
How to set decimal places in CAD
Leetcode force buckle (Sword finger offer 31-35) 31 Stack push pop-up sequence 32i II. 3. Print binary tree from top to bottom 33 Post order traversal sequence 34 of binary search tree The path with a
Redis启动与库进入
Raspberry pie 4B installation tensorflow2.0[easy to understand]
redis常识
ABBIRB120工业机器人机械零点位置
Redis的攻击手法
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 6
91.(cesium篇)cesium火箭发射模拟
自定義 grpc 插件
比特熊直播间一周年,英雄集结令!邀你来合影!