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

边栏推荐
- JS date format conversion method
- 如何看懂开发的查询语句
- CAD如何设置标注小数位
- 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
- ABBIRB120工业机器人机械零点位置
- 力扣首页简介动画
- Joint Time-Frequency and Time Domain Learning for Speech Enhancement
- 巩固-C#运算符
- 强大、好用、适合程序员/软件开发者的专业编辑器/笔记软件综合评测和全面推荐
- LeetCode 454. Add four numbers II
猜你喜欢

Technology sharing | MySQL: how about copying half a transaction from the database?

Dlhsoft Kanban, Kanban component of WPF

ACLY与代谢性疾病

Seckill system 03 - redis cache and distributed lock

C summary of knowledge points 1

Joint Time-Frequency and Time Domain Learning for Speech Enhancement

Powerful, easy-to-use, professional editor / notebook software suitable for programmers / software developers, comprehensive evaluation and comprehensive recommendation

Redis' attack tactics

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

CPU 上下文切换的机制和类型 (CPU Context Switch)
随机推荐
91. (chapitre Cesium) simulation de lancement de fusées cesium
Kernel synchronization mechanism
LeetCode力扣(剑指offer 31-35)31. 栈的压入弹出序列32I.II.III.从上到下打印二叉树33. 二叉搜索树的后序遍历序列34. 二叉树中和为某一值的路径35. 复杂链表的复制
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 7
[Yunju entrepreneurial foundation notes] Chapter 7 Entrepreneurial Resource test 8
[MCU] [nixie tube] nixie tube display
Brief explanation of the working principle, usage scenarios and importance of fingerprint browser
内核同步机制
耐克如何常年霸榜第一名?最新財報答案來了
消息队列之监控退款任务批处理过程
Powerful, easy-to-use, professional editor / notebook software suitable for programmers / software developers, comprehensive evaluation and comprehensive recommendation
Share the method of how to preview PSD format and PSD file thumbnail plug-in [easy to understand]
redis中value/set
指定的服务已标记为删除
redis中value/list
CAD如何设置标注小数位
Unity XLua 协程封装
Uniapp uses uni upgrade Center
leetcode 406. Queue Reconstruction by Height(按身高重建队列)
Joint Time-Frequency and Time Domain Learning for Speech Enhancement