I don't know if dashboards are THE way to make a nerd's heart beat faster, but they are definitely a way to make a nerd's heart beat faster. For those who grew up with StarTrek and Co., dashboard-like overviews in the form of diagrams and graphics are the epitome of technology. You can now create this feeling yourself with NodeRed thanks to certain nodes.
Because once you have your SmartHome so far that it collects all kinds of data about your own four walls, you of course want to present it. But how? After all, you can't just stick this data in a photo album like your last vacation photos.
A simple and informative and decorative way is to present the existing data via the dashboard node for NodeRed. In addition to various display elements, this also offers the opportunity to interact with your SmartHome system. This means you can set values, flip virtual switches, trigger actions and monitor their status at the same time.
You can find an overview of the various functions of the dashboard node in the following article
Requirements
Helpful articles: So that you can install new nodes, NodeRed should of course already be installed. How to prepare a RaspberryPi and then install NodeRed on it is described in the following articles.
By installing the dashboard nodes, you will receive a whole package of additional nodes that are suitable for displaying and entering various values. These will be displayed as usual in the node palette in the left area of the configuration menu. Details about the individual nodes are listed below.
Button node and positioning of the elements in the dashboard
The first and simplest node is the “button node”. You can use this to position a button on your dashboard. This then works like a button in the real world. If it is clicked, it sends an adjustable value and an adjustable topic to the linked node.
Button nodes, for example, can be used very well to trigger actions. For example, you can turn lamps on and off.
Before you can use the button node, it must first be positioned on the layout grid of the dashboard.
In addition to the functions of the actual nodes, the positioning on the layout of the later dashboard can also be configured for each. The dashboard is a separate website that can be managed centrally via the dashboard configuration.
By installing the dashboard nodes, a new tab was added to the left configuration area. You can recognize it by the icon based on a bar chart. Click on this to open the basic configuration of the dashboard.
Here you can see the different tabs “Layout”, “Theme” and “Site” at the top. To the right of it there is an arrow pointing up-right. If you click on this you will be redirected to the dashboard website.
Alternatively, you can also select the dashboard page directly. To do this, all you have to do is append “/ui/” to the address of your NodeRed configuration page. For example, the address to your NodeRed configuration page is https:// 192.168.172.5:1880 then the address to your dashboard is https:// 192.168.172.5:1880/ui/
First of all, it's about dividing the layout. With its help you can position the respective input and output elements (dashboard nodes) almost freely on the dashboard. The dashboard offers the option of combining individual dashboard nodes into groups. The display order of these nodes can then be set on the dashboard. In addition, these grouped nodes can or must be assigned to a specific “tab”.
In addition to the “Home” tab, you can create other tabs. This is practical, for example, for virtually separating the elements in different rooms in a smart home system. This means you can combine all of the sensors and actuators in the living room in a tab called “Living Room”. This makes the overview easier and brings structure to the often rapidly increasing number of nodes.
This is also what you can see and set in the “Layout” tab of the dashboard configuration. All tabs and their associated groups will be displayed there. In the screenshot below
Another example:
The button node
The button node is one of the very simple nodes. You can use it to build virtual keys. To do this, drag the button node from the Node palette to the NodeRed configuration area. If you now double-click on the node, the following options can be configured.
Dropdown node
The dropdown node is a node with which you can create a selection list on the dashboard. For example, you can create a list of available temperatures for a radiator. But you can also define all sorts of other entries with a wide variety of names and the associated values.
To do this, drag a dropdown node from the Node palette onto the Node Red configuration interface and double-click on it.
Switch node
The switch node basically corresponds to a virtual switch. This can be used to send switching signals or to display switching states.
To do this, drag the switch node from the node palette onto the node red configuration interface and double-click on it.
Slider node
The slider node is ideal for setting numbers within a certain range. A good use case, for example, is to use it as a dimmer for a lamp.
In order to use the slider node, you first have to drag it from the node palette to the Node Red configuration interface and open its settings menu by double-clicking.
Numeric node
The Numeric Node is another way to pass numerical values to Node-Red for processing.
To configure this, drag a Numeric node from the Node palette onto the Node Red configuration interface.
Text input node
The text input node is – as the name suggests – a node to enable text input.
Date picker node
The date picker node basically does exactly what the name suggests: you can use it to select a certain date and then pass it on to NodeRed for further processing.
Color picker node
The Color Picker Node is ideal for setting the color of a connected RGB lamp. Of course, you can also use this to transfer colors to Node-Red for further processing in all other cases.
Form node
With the form node you have the opportunity to configure a typical form. This allows different input options to be combined. This is perfect, for example, for configuring a form for entering an address or something similar.
Text output node
The text output node is ideal for simply displaying text. For example, you can display measured values from sensors. The user has no option to edit the displayed text.
Gauge node
The gauge node is perfect for visualizing measured values. This means that the measured values can be classified directly visually. You can also set number intervals in which the color of the displayed scale changes. For example, you can represent high/dangerous temperatures with a red color. Temperatures in the normal range, on the other hand, are shown with a green scale. This makes it possible to get an impression at a quick glance whether the measured values displayed are OK or not. Aside from that, it just looks pretty cool (/Star Trek-like). 🙂
Chart node
The chart node is suitable for displaying value trends. This allows you, for example, to save and display the course of a temperature over a set period of time. Unfortunately, the values are currently only saved temporarily. This means that if your NodeRed server crashes or is otherwise restarted, all previously displayed values will be lost.
Audio out node
The Audio Out Node is another one of those nodes that does exactly what its name suggests. It outputs text as spoken language.
Notification node
The notification node allows you to display notifications on the open dashboard. This can be displayed as information on the edge or centered in the middle of the screen including a confirmation button.
UI control node
With the UI control node you can control the appearance and behavior of the dashboard view. This can be used, for example, to change the tab displayed and to “fold in and out” groups. You can also use this node to react to whether a user has opened or closed the dashboard.
Template node
The template node is a very versatile node. You can use it to integrate your own HTML code into the dashboard. This can then react individually to the messages received from the connected nodes and also send messages itself.
thztjz
Further examples
Below you will find a small list of the articles in which I also use the dashboard nodes. Maybe there is something for you too. 🙂
I hope everything worked as described for you. If not or you have questions or suggestions please let me know in the comments. I will then add this to the article if necessary. Ideas for new projects are always welcome. 🙂
PS Many of these projects - especially the hardware projects - cost a lot of time and money. Of course I do this because I enjoy it, but if you think it's cool that I share the information with you, I would be happy about a small donation to the coffee fund. 🙂
Hello, great article. A question: How do you manage to arrange elements next to each other within a group, such as the on and off button in your LED stripe group?
Hi Andreas,
thanks 🙂
This should actually happen automatically as soon as both elements fit next to each other in the group. To do this, you have to set the width of the elements (the buttons on the LED stripe), for example, to 3 so that they fit next to each other in the group (here “LED stripe”) with a width of 6. 🙂
Please let me know if it worked. 🙂
Best regards
Fab
great article, helped me a lot. Still have a general question about a Node-Red dashboard.
I have built one and read data from a temperature sensor via Node-Red. I connected this to the RPi. (Node-red runs on my RPi).
This dashboard is also easily accessible via the browser I use. But only if I'm in the same network as the raspberry Pi itself.
I have no access to the dashboard from my smartphone internet network.
Do you know a way how I can get access to the dashboard from the “public” network or from Internet connections other than my WiFi at home?
Hi Lennard,
Thank you. 🙂
The (only reasonably) secure option is to connect to your home network via a VPN and thus access the RaspberryPi in your network.
In the meantime, many routers (e.g. the Fritzbox) can be configured as VPN servers.
Unfortunately I don't have a tutorial ready for this, but probably. do you find anything about it? 🙂
Best regards
Fabian
Hello,
I've been working with the Node-Red on the Raspy-400 for a few days. An AD converter (ADS1115) also gives me clean results. I would like to change the font size for the dashboard nodes. Is this possible? Some codes are published on other sites, but they don't work. Do you have an example for me (e.g. for gauge) how to do that?
I would like to thank you in advance, just because of the dashboard article.
Kind regards
H.Harle
Hi Horst,
Unfortunately I don't have an example for this, but maybe. a “nudge” in the right direction. The node description for the gauge node contains the following note:
If a Class is specified, it will be added to the parent card. This way you can style the card and the elements inside it with custom CSS. The class can be set at runtime by setting a msg.className string property.
That means you should actually be able to edit the appearance of the individual components of the gauge node with CSS code.
I hope this helps you further. 🙂
Best regards
Fab
Hello, great article. A question: How do you manage to arrange elements next to each other within a group, such as the on and off button in your LED stripe group?
Best regards
Andrew
Hi Andreas,
thanks 🙂
This should actually happen automatically as soon as both elements fit next to each other in the group. To do this, you have to set the width of the elements (the buttons on the LED stripe), for example, to 3 so that they fit next to each other in the group (here “LED stripe”) with a width of 6. 🙂
Please let me know if it worked. 🙂
Best regards
Fab
Thanks 🙂
Good morning,
great article, helped me a lot. Still have a general question about a Node-Red dashboard.
I have built one and read data from a temperature sensor via Node-Red. I connected this to the RPi. (Node-red runs on my RPi).
This dashboard is also easily accessible via the browser I use. But only if I'm in the same network as the raspberry Pi itself.
I have no access to the dashboard from my smartphone internet network.
Do you know a way how I can get access to the dashboard from the “public” network or from Internet connections other than my WiFi at home?
Thank you and best regards, Lennard
Hi Lennard,
Thank you. 🙂
The (only reasonably) secure option is to connect to your home network via a VPN and thus access the RaspberryPi in your network.
In the meantime, many routers (e.g. the Fritzbox) can be configured as VPN servers.
Unfortunately I don't have a tutorial ready for this, but probably. do you find anything about it? 🙂
Best regards
Fabian
Hello,
I've been working with the Node-Red on the Raspy-400 for a few days. An AD converter (ADS1115) also gives me clean results. I would like to change the font size for the dashboard nodes. Is this possible? Some codes are published on other sites, but they don't work. Do you have an example for me (e.g. for gauge) how to do that?
I would like to thank you in advance, just because of the dashboard article.
Kind regards
H.Harle
Hi Horst,
Unfortunately I don't have an example for this, but maybe. a “nudge” in the right direction. The node description for the gauge node contains the following note:
That means you should actually be able to edit the appearance of the individual components of the gauge node with CSS code.
I hope this helps you further. 🙂
Best regards
Fab