For one of our smart home tests, we used Node-Red. It is available by default in the Raspberry PI operating system Raspbian. To access Node-Red the Raspberry PI and a smart device must be connected to the same network.
Node-Red is a visual development tool to wire together different types of Internet of Things devices, including Raspberry PI and its sensors.
To clarify, the tool allowed us to build flows using different nodes. Example from the prototype in Figure 11 for a single flow that triggers ‘ON & OFF’ function to turn LED on and off in the bathroom.
Figure 11: Node-Red Single Flow
A node such as ‘BATHROOM’ which is responsible for a button as seen in Figure 12 and ‘PIN’ is the GPIO (General Purpose Input Output) on Raspberry PI that is responsible to turn led on or off.
Figure 12: User Interface Dashboard
Figure 13: Node-Red Temperature & Humidity Flow
To illustrate node ‘timestamp’ it has a task to send trigger every 30 sec to the sensor asking for the measurements. Below is an example of a ‘timestamp’ configuration panel.
Figure 14: Timestamp configuration panel
‘Temp’ node is responsible to receive a message from GPIO on a Raspberry Pi. The specific pin number 40 (GPIO21) on PI3 was chosen for the DHT11 sensor.
Figure 15: Temp configuration panel
Figure 16: TEMPERATURE function node
Once the DHT11 receives the necessary input function it can further deliver data and show on the gauge node. In gauge node properties ‘Value format’, ‘Units’, ‘Range’, and other options can be chosen to visually display the data on the application as seen in Appendix A.
Figure 23: Gauge node properties
Appendix A: Second-floor Temperature and Humidity measurements displayed on the gauge.
Similar options apply to the chart node properties, where the specific type of the chart and display options for the X-axis and Y-axis can be chosen with additional colors and time settings. The visual appearance on the chart can be seen in Appendix B.
Figure 17: Chart node properties
Appendix B: Chart of visual demonstration
The purpose of this function would be in case the electric power is lost, thus all data would be saved and within the next start, the data from the past would appear in a chart and gauge.
Nevertheless, of the above-mentioned benefits, the Node-Red also offers a powerful user interface interactive dashboard. The data or functions can be displayed on any device that has network access, including a personal computer, smartphones, and tablets.
To simply access the dashboard, the user types the address on the browser that usually ends with the port: 1880/ui, and to make access easier for mobile device users the website can be added to the home screen, which functions as an app seen in Figure 19 and Figure 20.
Figure 19: Application icon
Depending on the user needs the necessary function or process can be developed by programming languages and devices. Node-Red allows connecting any device (e.g. Apple, Android), as long as the device is connected to the wireless network.
Starlink Development offers a variety of examples that can be achieved within the IoT. Different options such as adding the smart voice assistants up to making different triggers such as when the outside temperature is below 20% the average, the heating indoors will increase to 22C.