当前位置:网站首页>ThingsBoard教程(二一):使用消息类型和数据处理节点对数据处理后保存
ThingsBoard教程(二一):使用消息类型和数据处理节点对数据处理后保存
2022-06-13 09:33:00 【拿我格子衫来】
前言
上一章节我们一起学习了如何将遥测的数据进行筛选,并保存到数据库,其中用到了script节点和save timeseries节点。本篇文章我们再来实现一个实际的业务场景。
场景是这样的,
我们的智能温度计上传的是 数据是华式温度,而我们在使用时,或者显示时需要用 摄氏度来显示。
这个时候,我们需要对上传的数据进行一次处理,将华氏温度转化为摄氏温度。并保存到数据库中
在这些条件中我们再添加一个条件,只对遥测的数据进行温度转化。
下面看一下如何实现。
消息类型节点
仔细了解问题后,我们知道需要有一个节点将遥测数据从 所有的数据中抽离出来,对其进行单独处理。
这个时候我们就需要使用到 message type switch 节点。使用该节点可以将遥测数据分离处理,走不同的流程。
看一下节点的配置。
将 message type switch 节点拖放到编辑区域,并进行配置
消息数据处理节点
由于需要进行温度转化,所有我们需要一个script, 注意这里的 script 是变换中的 script
将节点拖入编辑区域,
边栏推荐
- Figure: concept of figure
- Classes and objects -- encapsulation
- (Dijkstra + shortest circuit + by point n^2) acwing 849 Dijkstra finding the shortest path I
- Consolas-with-Yahei
- [ssl1280] full arrangement
- Musk's "meta universe" dream
- LeetCode 6097. Match after replacing characters (Dictionary)
- UNIX Environment advanced programming --8- process control ---8.5 function exit-8.6 function wait and waitpid
- C language: summary of question brushing (1)
- Trees and binary trees: Construction of binary trees
猜你喜欢

Consolas-with-Yahei

Trees and binary trees: traversal of binary trees
![[51nod p2653] interval XOR [bit operation]](/img/3a/57c1a00edd3583e2c31fc4b8d47220.jpg)
[51nod p2653] interval XOR [bit operation]

Jenkins接入Openldap用戶認證

A hot MySQL training topic, making you a master of SQL

go-zero微服务实战系列(三、API定义和表结构设计)
![[51nod P3210] binary statistics](/img/a0/3fd197107336b10ea0a996f6b6ab58.jpg)
[51nod P3210] binary statistics

(state compression dp+ binary) acwing 91 Shortest Hamilton path

(bfs+GOOD) acwing 845. Eight digit

【pytorch环境安装搭建】
随机推荐
Learning makefile with me
[51nod p3111] xiaoming'ai intercepts [Las]
Exercise 7-10 finding specified characters (15 points)
The turtle library displays the system time
递归想法和实现介绍,消除递归
[51nod p2102] or subtraction and [bit operation]
【pytorch环境安装搭建】
(bfs+GOOD) acwing 845. Eight digit
Sort() sort function
(topological sorting +bfs) acwing 848 Topological sequence of digraph
说说MySQL索引机制
It was so simple to implement system call
Biden: hope to sign the bipartisan gun safety reform bill as soon as possible
LeetCode 201. Digit range bitwise AND
【工具链系列】 Notepad++
MOOC week 8 programming exercise 1
LeetCode 72. Edit distance
拜登:希望尽快签署两党枪支安全改革法案
Jenkins integrates LDAP. The problem of login failure of Jenkins users caused by LDAP configuration error is solved
VGA common resolution and calculation method