Node Red

On the full, desktop version of Raspian available for the Raspberry Pi, there is a link for a pre-installed version of Node Red. Node Red was created by IBM to more easily facilitate IOT, "The Internet of Things". I decided to incorporate Node Red into my environment to help tie together my sensors and provide some nice gauges and graphs to see trends and results. Node Red provides a graphical way to link logical blocks together in a "flow". I now have Node Red running on two Raspberry Pi machines. One Pi will be connected to two BME280 temperature, pressure and humidity sensors. One sensor will live outside and the other will gather information inside my crawl space. Through research I learned that one way to control humidity in a crawl space is to monitor temperature and humidity inside and outside the crawl space. These readings are used to calculate dew point. When the dew point is higher inside the crawl space than outside, you can bring in air from the outside to displace the higher humidity inside when conditions are right.

Each block in the image below is a "node". Nodes are available from the "palette" on the left side of the screen. Most of the various node types are installed by default and others, like the BME280 node, have to be installed. Each node receives and/or sends messages in various formats. If you need a function not provided by a standard node, you can use a "function" node and write some Java Script to do what you need. For example, the "Dew Point" nodes use temperature and humidity readings to calculate dew point.

Here is a screen capture of my first flow that gathers sensor information every 5 seconds, calculates dew points, sets a Raspberry Pi GPIO pin to control a ventilation fan, and stuff all the information into an on-board MQTT broker. The MQTT data is "bridged" (think mirrored) to a second Raspberry Pi that gathers this info and populates a MySQL database and generates web pages for graphical display of all the information.

This is the flow on the crawl space ventilation control Pi:

The green nodes are used for troubleshooting the flow and don't affect the flow in any way.

More to come.