CO2 Temperature Humidity Sensor Node-RED Dashboard

Introduction

In this article, we provide a step-by-step guide on how to integrate the NCD Dashboard into your current Node-RED project, configure it, and install the necessary tools. This dashboard was developed to allow you to monitor the variables from NCD sensors in real-time, manage NCD devices, and store the value of each field variable locally.

Industrial IoT Wireless CO2 Temperature Humidity Sensor

NCD CO2 Temperature Humidity Sensor

The NCD Long Range Industrial IoT Wireless CO2 Temperature Humidity Sensor is a versatile air quality monitoring device that integrates highly accurate CO2, temperature, and humidity sensors. It offers automatic drift compensation, operates in a wide range of environmental conditions (-25°C to 85°C and 0-90% RH). With a 2-mile range via wireless mesh networking, open communication protocols, and compatibility with platforms like Microsoft Azure®, Amazon AWS, and MQTT, it is compact, affordable, and ideal for industrial and consumer applications.

Overview

The next image is a visual representation of NCD Dashboard with The Industrial IoT Wireless CO2 Temperature Humidity Sensor. The sensor(s) collect the data of interest from the field elements, and then send the signal via Digi-Mesh to the Enterprise IIoT Gateway or Industrial IoT Wireless Modem, where it is processed by Node-RED and then sent to the NCD-Dashboard for storage and intuitive Real-Time visualization.

NCD CO2 Temperature Humidity Overview

Highlights

Real-Time Data

Real-time display of the variables emitted by the sensor.

  • CO2
  • Temperature
  • Humidity
  • Battery Level

Historical Data

Historical data visualization of the values of the variables emitted by the sensor.

Detection by Type

  • Industrial IoT Wireless CO2 Temperature Humidity Sensor

Local Datalogger

Generation and storage in local (or user-defined) path of CSV file with data from the sensor(s).

Data Inspection

Function to inspect from the dashboard the object data coming from the sensor(s).

Dynamic Sensor Selection via MAC Address

  • Dynamic Data Loading: This feature allows your NCD Dashboard to automatically update the displayed information based on user selection.
  • Sensor Selection via MAC Address: Users can choose the sensor they want to see data from using a dropdown menu that lists sensors by their unique MAC address.
  • Automatic Data Update: Once a sensor is selected, the NCD Dashboard automatically retrieves and displays the relevant data for that specific sensor.

On-Demand Download

  • Convenient Data Export: Download sensor data as CSV files directly from your web browser.
  • Local File Access Not Required: Download the CSV file to any device within your local network, regardless of where the dashboard is hosted. 
NCD CO2 Temperature Humidity Dashboard
Click to expand

Requirements

In order to follow along with this guide you will need these components:

  1. An Industrial IoT Wireless CO2 Temperature Humidity Sensor
  2. An Enterprise Gateway or an Enterprise Gateway Lite
  3. A computer with WiFi/Ethernet to connect to the Enterprise IIoT Gateway and access to Node-RED.

Before you begin using the NCD-Dashboard, you’ll need to have the following software installed:

  • Node-RED (Already installed on Enterprise IIoT Gateway)
  • NCD Library (Already installed on Enterprise IIoT Gateway)
  • FlowFuse Dashboard 2

NCD Enterprise IIoT Gateway

The Enterprise IIoT Gateway is designed to simplify, streamline, and customize your NCD IIoT installation. It features built-in Node-RED capabilities for no-code integration into new or existing cloud/SCADA systems, web-based security and access management, SSH access to the Debian OS for full customization, as well as VPN and remote management options. This edge computer ensures a seamless deployment experience.

We offer two versions of the Enterprise IIoT Gateway: a standard version with all features, including integrated Wi-Fi, Ethernet, and cellular connectivity, and a Lite version with reduced CPU and RAM capabilities, and no cellular connectivity.

Node-RED

Nodered Logo

Node-RED is a visual programming tool that provides a browser-based editor for creating applications by connecting predefined functions (nodes). Despite its technical nature, Node-RED offers a user-friendly interface. As an open-source project under the OpenJS Foundation, it is free to use with no subscription fees. You can install and run Node-RED locally on your PC, or, in the case of our Enterprise IIoT Gateway, it comes pre-installed and operates as a service. Node-RED, in conjunction with our Enterprise NCD library, forms a powerful tool for acquiring, managing, configuring, and uploading firmware through an intuitive interface. This combination offers a streamlined approach to optimizing the setup, configuration, and management of NCD sensor data.

Resources

Here you can find a complete getting started guide for accessing Node-RED from the Enterprise IIoT Gateway:

NCD Enterprise Library

NCD Library

This library facilitates communication with and configuration of the NCD Wireless Sensor Line. It can be employed in conjunction with Node-RED to communicate and manage a Wireless Sensor Network using the Node-RED flow-based development tool on any platform. Additionally, as demonstrated, the library acts as an interface for uploading Firmware Updates to NCD Sensors. As mentioned earlier, this library is pre-installed on the Enterprise IIoT Gateway and is ready for immediate deployment.

Installing NCD Library from Node-RED Interface

Step 1.- Access to Node-RED interface, then, inside the Node-RED flow editor you must go to the main menu (top right) and select the “Manage Palette” Option

Step 2.- The “User Settings” window will be displayed, inside “Palette” you must select click on the “Install” tab.

Step 3.- In Search Field enter “@ncd-io/node-red-enterprise-sensors”.

Step 4.- Click the “Install” button to start the installation process, a window will appear at the top of the screen, asking you to confirm the installation.

See the following GIF for a visual demonstration of the installation process:

NodeRED Installing NCD Library
Click to expand

FlowFuse Dashboard 2

FlowFuse Dashboard 2 Logo

FlowFuse Dashboard 2.0 is an easy to use collection of nodes for Node-RED that allows you to create data-driven Dashboards & data visualizations. Installation procedure is similar to the previous one, FlowFuse’s Node-RED Dashboard 2.0 is also available in the Node-RED Palette Manager.

 

Step 1.- Open the menu in the top-right of Node-RED, then Click “Manage Palette”:

Node Red Manage Palette

Step 2.- Switch to the “Install” tab, Search “@flowfuse/node-red-dashboard”, Install the  package:

FlowFuse Dashboard 2 Library Installing

Step 3.- You must confirm the installation by clicking on the Install button in the pop-up window.

FlowFuse Dashboard 2 Installing Library

Step 4.- You will see a list of the dashboard 2 nodes that have been installed.

FlowFuse Dashboard 2 installation completed

Step 5.- In workspace you can see the available nodes in the nodes palette, as shown in the following image:

FlowFuse Dashboard 2 Nodes

See the following GIF for a visual demonstration of the installation process:

nodered install flowfuse dashboard 2 library demo
Click to expand

Importing

Here you’re ready to import the NCD Dashboard, which is specifically designed and optimized for NCD sensors. The process is straightforward, but be sure to follow these steps carefully:

  1. Copy the JSON: Locate the NCD Dashboard JSON file.
  2. Import the JSON: Within Node-RED, use the import function to bring in the copied JSON file.


This will import the NCD Dashboard elements into your Node-RED workspace, allowing you to visualize and interact with your NCD sensor data.

1. Click on the following link to access the NCD Dashboard source code:

2. Once the repository is open, locate the button that allows you to copy the raw code of the NCD Dashboard. Refer to the following image for a visual reference:

NCD Dashboard Copy RAW from GitHub
Click to expand

3. Head back to the Node-RED editor and go to the Main Menu (icon in the upper right corner) then click on “Import” option, as shown in picture:

Node-RED Import menu
Click to expand

4. A text-box will be opened. Right click and paste the code you just copied from GitHub, as shown in picture:

Node RED pasting json code
Click to expand

5. You should see the JSON code in text-box, now you can press the red “Import” button at the bottom right (by default the “current flow” option is selected):

Import nodes in current workspace Node-RED
Click to expand

6. In the top of the Node-RED editor, you will see information of the NCD-Dashboard you just imported, and automatically you will have the node available inside the node editor, now you can position it inside the editor or workspace by left clicking:

NCD CO2 Temperature Humidity Dashboard Imported
Click to expand

7. You may also notice that the NCD-Dashboard node has been added to the NCD node group in nodes palette.

NCD CO2 Temperature Humidity Dashboard Nodes Palette
Click to expand

Configuring

This section delves into configuring and connecting nodes within the Node-RED editor. Here, we’ll explore:

  1. NCD Basic Flow: how to set up NCD Nodes to get data from sensors.
  2. Node Connections: Learn how to establish connections between your nodes to create the desired data flow.
  3. Properties and Data Storage Configuration: Discover the property that allows you to define the path where sensor data will be stored within the NCD-Dashboard node.
  4. NCD Dashboard Node Status: Understand how to utilize the visual node status feature to monitor the operational state of each node.

NCD Basic Flow

When you first access the Node-RED interface from the Enterprise IIoT Gateway, you will see the flow on the right side. This flow consists of two nodes: the Wireless Gateway node and the Debug node.

  • Wireless Gateway Node: This node is primarily used for debugging and configuring sensors. It is equipped with a button on the flow that switches the modem between configuration and listening modes. Whenever sensor data is received from any sensor on the network, this node will output a message containing all relevant information, as shown in the example below.
    Debug Node: The Debug node will receive messages from the Wireless Gateway node and display them in the Debug tab.

 

Enterprise IIoT Gateway Basic Flow
Click to expand

Node connections

The NCD Dashboard node is designed to work with the output messages from the Wireless Gateway node. Therefore, when importing the NCD Dashboard into your current project, you will need to connect the output of the Wireless Gateway node to the input of the NCD Dashboard node by adding a new connection, as shown in the image on the right

NCD Dashboard Wireless Gateway connection
Click to expand
Connecting Multiple Sensors

Each time an NCD sensor sends data to the Wireless Gateway node, and it is connected to an NCD Dashboard node, the Dashboard node stores the sensor’s MAC address. This allows you to have multiple sensors connected to the network and access their data within the dashboard using their MAC address.

When a new sensor sends data, you will automatically see a message indicating that data has been received from a new sensor. The message will display the device’s MAC address, and the sensor will be automatically added to the list of available devices in the Address Dropdown (if it corresponds to a sensor type supported by the current dashboard).

Properties and Data Storage Configuration

If you double left click on the NCD Dashboard node you can open the Properties.

Name: You can assign an identifier to the NCD-Dashboard node. This name only helps distinguish your specific node within the node editor (from other nodes).

Custom Path: By default, this property is set to a fixed location. The NCD-Dashboard retrieves data from your sensor and stores it locally within Node-RED.

Data Storage: The NCD-Dashboard automatically saves the generated CSV files from the sensor(s) within the Node-RED folder.

  • Linux (Enterprise IIoT Gateway): $HOME/.node-red/log
  • Windows: $HOMEPATH/.node-red/log
NCD Dashboard properties
Click to expand

Path Example for Windows PC

Nodered dashboard node path property
Click to expand

Path Example for Linux/Enteprise Gateway

Nodered dashboard node path property
Click to expand

Node Status

The NCD Dashboard nodes are designed to provide visual feedback on their operational state. This status can vary depending on the node’s input data or configuration. Here are some common scenarios you might encounter:

1. If the path you enter is correct, or if you leave the property field blank (using the default path), you should see a “Saving data” status when new sensor data arrives at the node input, indicating successful storage.

NCD Dashboard Saving Status

2. It’s important to assign a valid path. If the NCD-Dashboard detects an invalid route, it will display a “Path error” message.

NCD Dashboard Path Error Status

3. If you connect a different type of NCD sensor, you will see the “Type error message”.

NCD Dashboard Type Error Status

Accessing NCD Dashboard

After successfully configuring and connecting your nodes, the next step is to access the user interface. This is where the NCD Dashboard elements, such as gauges, charts, and buttons, are displayed.

Step 1. Clic on the “Dashboard 2.0” option in the sidebar:

Node RED Dashboard 2.0
Click to expand

Step 2. Then click on the “Open Dashboard” option:

Open button nodered Dashboard 2
Click to expand
NCD nodered dashboard 2 empty
Click to expand

Step 3. Your NCD Dashboard will automatically open in a new window, displaying the following elements:

NCD CO2 Temperature Humidity Dashboard
Click to expand

Features

In the next section, we’ll delve into the NCD Dashboard elements and their characteristics.

Main Gauges

The main gauges display the real-time values of each field variable being sent by the sensor. Each variable is identified within the Dashboard.

NCD CO2 Temperature Humidity Dashboard Main Gauges
Click to expand

Main Charts

In the main chart, you can view the historical values of each variable emitted by the sensor. This chart records or locally loads the last 20 values received from the sensor. It is possible to enable or disable each variable individually by clicking on the variable identifier located at the top of the chart.

NCD CO2 Temperature Humidity Dashboard Main Chart
Click to expand
NCD CO2 Temperature Humidity Dashboard Main Chart
Click to expand

Battery Status

The NCD Dashboard provides a dedicated gauge and chart to visualize both real-time and historical sensor battery levels. This allows you to proactively predict battery replacements, ensuring uninterrupted sensor operation.

NCD CO2 Temperature Humidity Dashboard Battery Chart
Click to expand

Main Menu

This menu facilitates switching between different NCD-Dashboards within the user interface (UI). This functionality is particularly useful if you have configured multiple NCD Dashboards to monitor various types of sensors or processes.

NCD CO2 Temperature Humidity Dashboard Main Menu
Click to expand
NCD CO2 Temperature Humidity Dashboard Main menu
Click to expand

DatePicker & Datalogger

The NCD Dashboard allows you to directly download locally stored CSV files containing historical data from your NCD Sensors through your web browser.

Step 1.- To display the date picker you must click on the icon on the right side of the “Date:” box.

Step 2.- Then select the date of interest:

Locate the download section in the bottom left corner. It features two fields:

  • Date: Enter the desired date (format: mm/dd/yyyy) to download the corresponding CSV file containing historical sensor data for that specific day.
  • Download CSV Button: Click this button to initiate the download of the CSV file directly to your web browser.

Date Format:

  • mm: Represents the month (e.g., 01 for January, 12 for December).
  • dd: Represents the day of the month (e.g., 01 for the first, 31 for the last day of the month).
  • yyyy: Represents the four-digit year.

 

NCD CO2 Temperature Humidity Dashboard Datepicker
Click to expand

Step 3.- Then click on the “Download CSV” button. If the NCD-Dashboard finds the file for that date, you should be able to see the download begin (indicated by your web browser’s download icon) as shown in image.

NCD CO2 Temperature Humidity Dashboard CSV Download
Click to expand

Step 4.- You can open the downloaded CSV file. The content will be similar to the following:

NCD CO2 Temperature Humidity Dashboard CSV Open
NCD CO2 Temperature Humidity Dashboard CSV Error
Click to expand

Address Dropdown

The NCD-Dashboard provides a dropdown menu that allows you to select the ncd sensor of interest for loading, displaying, and storing its variables based on its MAC address.

NCD CO2 Temperature Humidity Dashboard MAC
Click to expand
NCD CO2 Temperature Humidity Dashboard Mac Dropdown
Click to expand

When you connect a new NCD sensor to the NCD-Dashboard node, a pop-up window appears indicating a new device connection. This sensor will automatically be available for selection in the MAC Address dropdown.

NCD CO2 Temperature Humidity Dashboard MAC new device
Click to expand

Inspect

You can access the object data of each sensor using the “Inspect” button on the NCD-Dashboard. Click the button once to view the selected sensor’s inspection window, and click it again to return to the data view.

NCD CO2 Temperature Humidity Dashboard Inspect
Click to expand
NCD CO2 Temperature Humidity Dashboard Inspect
Click to expand

Product Info

The “Product Info” button directs you to information about the corresponding sensor on our website.

NCD CO2 Temperature Humidity Dashboard Product Info button
Click to expand

Summary

In conclusion, this guide has walked you through the process of importing an NCD Dashboard specifically for the Industrial IoT Wireless CO2 Temperature Humidity Sensor. We’ve explored the key features of the dashboard, its user-friendly interface, and how it simplifies monitoring environmental data transmitted by the sensor. Additionally, we highlighted its ability to generate CSV logs for convenient data tracking and analysis. With this dashboard, integrating NCD sensors into your workflow becomes seamless and efficient.

Thank you,
NCD Team

Share this on

You Might Also Like