当前位置:网站首页>08. Tencent cloud IOT device side learning - device shadow and attributes
08. Tencent cloud IOT device side learning - device shadow and attributes
2022-06-24 11:02:00 【fancyxu】
The main purpose of this series is to record the learning notes of Tencent cloud Internet of things device , And on the device side SDK Make a supplementary explanation .
brief introduction
Device shadow and attributes are used for server and device communication , It mainly realizes the reliable transmission of the application layer ( Can be based on QoS0)、 Solve the problem of message storage and distribution when messages are offline .
The difference in QoS1 Full message store for , The device shadow is through get Method , Property is through get status To get the difference between states , This reduces message delivery and device status updates .
IoT Explorer The internal test phase attribute is also implemented through the device shadow message , Subsequently, it is abstracted into the attributes of the data template , Make it easier to understand .
Development considerations
Device shadow and attributes are the basic functions of Tencent cloud IOT platform , In the actual development process, we generally need to pay attention to the following points :
1. Offline message acquisition : Offline messages for many devices do not always take effect , For example, real-time control messages ( Such as shutdown command ), If the device fails to reply , adopt get status You can still get , If the response , It may cause equipment failure ( Such as shutdown , It may cause the power on receiver to shut down immediately , To form a dead cycle ), At this point, you need to make filtering options in the received message . Development process , The subscription receiving method is often taken over , The subsequent iterations will enter sdk.
2. Message level setting : Due to the existence of the application layer confirmation mechanism , Therefore, the general uplink message adopts QoS0 To reduce the number of servers PUBACK reply ; But when subscribing , Should use QoS1 To ensure that the server supports sending messages QoS1 The retransmission mechanism , At the same time open packet id The filter , To achieve a better success rate of message distribution .
3. Message type settings : There is the concept of read-only attribute in the attribute ( This means that the value only depends on the equipment report ), Setting to read-only can avoid invalid property modification , This leads to the avoidance of readable properties in control messages , A device side parsing exception is thrown .
边栏推荐
- Cool interactive animation JS special effects implemented by p5.js
- Which is a good CAD drawing software? How to select good software
- PPT绘图相关,快捷键,美观度
- Reliable remote code execution (1)
- Dedecms template file explanation and homepage label replacement
- Act as you like
- Jetpack Compose 教程之 从一开始就投资于良好的导航框架将帮助您在之后节省大量的迁移工作
- Why use a firewall? What is the function of firewall?
- Process and multithreading
- [activities this Saturday] NET Day in China
猜你喜欢

Fais ce que tu veux.

Any and typevar make the automatic completion of IDE better

Fashionable pop-up mode login registration window

24. image mosaic operation

齐次坐标的理解

Canvas falling ball gravity JS special effect animation

Quick completion guide for mechanical arm (II): application of mechanical arm

Stack Title: exclusive time of function

Programmers spend most of their time not writing code, but...

程序员大部分时间不是写代码,而是。。。
随机推荐
Window function row in SQL Server_ number()rank()dense_ rank()
Cookie 、Session、localstorage、Sessionstorage的区别
Learn how to use PHP to filter special symbols in strings
程序员大部分时间不是写代码,而是。。。
Use the process monitor tool to monitor process operations on registries and files
Multithreaded applications - improve efficiency
How to convert an array to an object, and how to convert an object to an array
Base64 decoding method three ways for non professionals
Svg+js drag slider round progress bar
Install wpr Exe command
Besides technology, programmers also need to master a skill - self marketing ability
【IEEE出版】2022年自然语言处理与信息检索国际会议(ECNLPIR 2022)
"Adobe international certification" Adobe Photoshop adjusts cropping, rotation and canvas size
Visual presentation of pictures effectively enhances the attraction of large screen
数组怎么转对象,对象怎么转数组
Self service troubleshooting guide for redis connection login problems
Quick completion guide for manipulator (III): mechanical structure of manipulator
Niuke-top101-bm28
System design: key features of distributed systems
Extremenet: target detection through poles, more detailed target area | CVPR 2019