Connecting the sensors data to a database using Node-RED
In Chapter 7, we briefly delved into Node-RED, where we created an automation flow. This flow involved capturing motion from the double measurement sensor introduced in Chapter 3 and combining it with the sunset condition. As a result, an action was triggered to turn on the lights in my garage. In this section, we will use Node-RED to grab the temperature data from the double measurement sensor and the Bluetooth Mi temperature sensors via the temperature hub, format this data, and store it in the InfluxDB database.
The details about how to create the flow to manage the temperature data capture will be split into three parts:
- Double measurement sensor data capturing and formatting
- Temperature hub data capturing and formatting
- Configuring the data to be stored in the InfluxDB database
I will detail each one of these steps in the following three subsections.