How to Take Data Stored in InfluxDB Cloud 2 and Use It in a "Switch" Node within Node-Red
This video shows you how to take data that is stored in InfluxDB Cloud 2 and use it in a "Switch" node within Node-Red. In our example, we read the average house temperature and decide whether or not the heating should be switched on.
It takes you through:
- Creating an InfluxDB Cloud 2 account
- Creating a token to allow you to push data into InfluxDB
- Creating a task to automatically generate an average value from multiple devices
- Create a Read-Only token for Node-Red
- Installing the InfluxDB node in Node-Red and configuring it
- Creating a Flux query to read the data from InfluxDB
- Accessing the value from the query results
- Using the results in a Switch node to make decisions based on that data
Sign up for a free InfluxDB account here: https://cloud2.influxdata.com/signup
Download Node-Red here: https://nodered.org/
The InfluxDB Node Red Node: https://flows.nodered.org/node/node-red-contrib-influxdb
Chapters:
0:00 Intro
0:27 Create an InfluxDB Cloud 2 account
0:49 Create a bucket
1:14 Create a read/write token
2:10 Create a Flux query to calculate an average value
3:40 Save a Flux query as a Task
4:44 Create a read-only token for use in Node-Red
5:24 Configure Node-Red to access InfluxDB
6:55 Install node-red-contrib-influxdb
7:41 Configure node-red-contrib-influxdb
Music:
The Dark Glow of the Mountains by Chris Zabriskie is licensed under a Creative Commons Attribution 4.0 licence. https://creativecommons.org/licenses/by/4.0/
Source: http://chriszabriskie.com/darkglow/
Artist: http://chriszabriskie.com/