当前位置:网站首页>07. Tencent cloud IOT device side learning - Data Template
07. Tencent cloud IOT device side learning - Data Template
2022-06-24 15:19: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 .
Introduction to data template
The data template protocol is IoT Explorer Current major agreements , It is also the main protocol used in most projects , The agreement consists of three parts :
- attribute (property): Equipment report 、 Cloud distribution control
- event (event): Equipment report , Cloud reply
- Behavior (action): Cloud distribution control , Device reply
Data template use
Use according to the actual project , There are several common ways to use the project :
- Equipment collection information reporting , Including temperature and humidity 、 light 、 Equipment status, etc . here , Generally, the reported information is abstracted into Read-only property Report .
- The equipment reports a one-time event , Different from collecting information ( Temperature and humidity , A long-term state ), Events are usually one-off , It means that the event happened at that time ( Such as alarm , Instantaneous change of state ). here , Will use event To report .
- Equipment control , Like a switch 、 Air conditioning temperature setting, etc . here , Generally, the distribution control is abstracted into Read write properties perhaps Behavior . Among them, the behavior must reply (5s Inside , cloud API Limit ), If the control duration is 5S Inside , Those who are sensitive to the results can adopt behavior ; The rest can be used Read write properties + Readable properties / event The form of cooperation .
- Device offline synchronization , When the device is offline , If a command is issued , Expect to respond immediately after the launch , You need to use it get_status Method to get the offline distribution control news .
Take the common smart lamp as an example : Smart lights can contain the following elements : brightness 、 switch 、 Color 、 fault 、 Electric quantity .
The following can provide a feasible design :
- brightness 、 Color 、 The switches are in a long-term state , Can be designed as attribute .
- Faults and low battery are events triggered at a certain time , Can be designed as event .
- Realize the combination change of color and brightness of intelligent lamp , Can be designed as Behavior .
Data template is IoT Explorer Most basic functions , It is also the content that Tencent cloud IOT device development must understand .
边栏推荐
- Esp32 series -- comparison of esp32 series
- How to modify the login user name of easynvr video monitoring system?
- update+catroot+c000021a+critical service failed+drivers+intelide+viaide+000000f
- Successfully solved: selenium common. exceptions. SessionNotCreatedException: Message: session not created: This versi
- Data sharing between laravel lower views
- Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control
- 作为一名开发者,对你影响最深的书籍是哪一本?
- CVPR2022 | 可精簡域適應
- Since the household appliance industry has entered the era of stock competition, why does Suning win the first channel for consecutive times?
- 时间同步业务的闭环管理——时间监测
猜你喜欢

Bert whitening vector dimension reduction and its application

postgresql之词法分析简介

A common defect management tool - Zen, which teaches you from installation to using the handle

He is also a junior test engineer. Why is his salary high? The interview must be brilliant at these points

Go language concurrency model mpg model

Successfully solved: selenium common. exceptions. SessionNotCreatedException: Message: session not created: This versi

postgresql之List
Oracle RAC configuration multipathing

Multimeter resistance measurement diagram and precautions

Data sharing between laravel lower views
随机推荐
STM32F1与STM32CubeIDE编程实例-WS2812B全彩LED驱动(基于SPI+DMA)
How to evaluate domestic reporting tools and Bi software
How to achieve long-term development of voice social source code?
Redis consistency hash and hash slot
Data stack technology sharing: how to use data stack for data collection?
兴业证券靠谱吗?开证券账户安全吗?
Istio Troubleshooting: using istio to reserve ports causes pod startup failure
一个简单而功能强大的开发者工具箱Box3.cc
Golang实现Biginteger大数计算
openinstall携手书链:助力渠道数据分析,共创书联网时代
Keyword of ES mapping; Term query add keyword query; Change mapping keyword type
laravel8使用faker调用工厂填充数据
入行 4 年,跳槽 2 次,我摸透了软件测试这一行
A series of problems caused by IPVS connection reuse in kubernetes
Step by step introduction to sqlsugar based development framework (9) -- Realizing field permission control with WinForm control
Chapter 8 operation bit and bit string (4)
股票开户要找谁?在线开户安全么?
证券账户理财安全吗??
A brief introduction to the lexical analysis of PostgreSQL
Design of vga/lcd display controller system based on FPGA (Part 2)