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

边栏推荐
- 技术分享 | MySQL:从库复制半个事务会怎么样?
- Joint Time-Frequency and Time Domain Learning for Speech Enhancement
- 指纹浏览器工作原理、使用场景以及重要性简单讲解
- Self organization is the two-way rush of managers and members
- leetcode 406. Queue reconstruction by height
- 消息队列之监控退款任务批处理过程
- Comment Cao définit la décimale de dimension
- Value/sortedset in redis
- 博途V15添加GSD文件
- Dlhsoft Kanban, Kanban component of WPF
猜你喜欢

Redis的攻击手法

Acly and metabolic diseases

CAD如何设置标注小数位

用实际例子详细探究OpenCV的轮廓检测函数findContours(),彻底搞清每个参数、每种模式的真正作用与含义

Learning summary on June 29, 2022
![[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 3](/img/ea/c5e8d12007873385fa0d197fa62fd2.jpg)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 3
![[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7](/img/41/e3ecbd49e4bfeab6c6e7d8733fe33a.jpg)
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7

Abbirb120 industrial robot mechanical zero position

Chen Gong: Micro service, is it still so pure?

Interpretation of R & D effectiveness measurement framework
随机推荐
想问问,证券开户有优惠吗手机开户是安全么?
Rural guys earn from more than 2000 a month to hundreds of thousands a year. Most brick movers can walk my way ǃ
Explore the contour detection function findcontours() of OpenCV in detail with practical examples, and thoroughly understand the real role and meaning of each parameter and mode
Redis启动与库进入
邻接矩阵无向图(一) - 基本概念与C语言
C knowledge point form summary 2
消息队列之监控退款任务批处理过程
Message queue monitoring refund task batch process
Understanding of MVVM and MVC
如何看懂开发的查询语句
Interpretation of R & D effectiveness measurement framework
构建外部模块(Building External Modules)
比特熊直播间一周年,英雄集结令!邀你来合影!
leetcode 406. Queue reconstruction by height
Neo4j 中文开发者月刊 - 202206期
Comment Nike a - t - il dominé la première place toute l'année? Voici les derniers résultats financiers.
Computer graduation project asp Net hotel room management system VS development SQLSERVER database web structure c programming computer web page source code project
LeetCode 454. Add four numbers II
Value/set in redis
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 6