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

边栏推荐
- 指纹浏览器工作原理、使用场景以及重要性简单讲解
- Le semester manquant
- CAD如何設置標注小數比特
- LeetCode 454. Add four numbers II
- C#依赖注入(直白明了)讲解 一看就会系列
- MQ-防止消息丢失及重复消费
- Computer graduation project asp Net hotel room management system VS development SQLSERVER database web structure c programming computer web page source code project
- 91.(cesium篇)cesium火箭發射模擬
- Technology sharing | MySQL: how about copying half a transaction from the database?
- ES6 promise Usage Summary
猜你喜欢

NOV Schedule for . Net to display and organize appointments and recurring events

Compile and debug net6 source code

强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐

Exposure: a white box photo post processing framework reading notes

easyexcel的使用

博途V15添加GSD文件

C summary of knowledge points 1

Neo4j Chinese developer monthly - issue 202206

The Missing Semester

GID: open vision proposes a comprehensive detection model knowledge distillation | CVPR 2021
随机推荐
Botu V15 add GSD file
图的理论基础
Value/hush in redis
How does Nike dominate the list all the year round? Here comes the answer to the latest financial report
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7
Raspberry pie 4B installation tensorflow2.0[easy to understand]
Unity xlua co process packaging
On recursion and Fibonacci sequence
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 4
The Missing Semester
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 2
耐克如何常年霸榜第一名?最新财报答案来了
Value/sortedset in redis
Use of easyexcel
C serialization simple experiment
easyexcel的使用
Is it safe for Huatai Securities to open an account online?
基于IMDB评论数据集的情感分析
消息队列之监控退款任务批处理过程
91.(cesium篇)cesium火箭发射模拟