HowTo: Node Red – Display server uptime in the dashboard

Neben den Daten Eures SmartHome könnt Ihr Euch auch Daten zu dem Server auf dem NodeRed läuft anzeigen lassen.

Wie Ihr euch die Uptime(also die Laufzeit) eures RaspberryPi’s im Dashboard anzeigen lassen könnt ist im folgenden Artikel beschrieben.

Safety instructions

I know the following notes are always kind of annoying and seem unnecessary. Unfortunately, many people who knew "better" have lost eyes, fingers or other things due to carelessness or injured themselves. Data loss is almost negligible in comparison, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Because even the coolest project is not worth injury or other trouble.

Affiliate links/advertising links

The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and make a purchase via this link, will receive a commission from the relevant online shop or provider. The price does not change for you. If you make your purchases via these links, you support in being able to offer other useful projects in the future. 🙂 


Helpful articles:
Before you start with the article you should have prepared the RaspberryPi so that it is accessible via the network and controllable via SSH. Furthermore NodeRed and the Dashboard-Node should be installed.

The following three articles describe what needs to be done to prepare the RaspberryPi:
RaspberryPi – setup for nerdiys!
RaspberryPi – The first configuration!
RaspberryPi – Control the RaspberryPi via SSH

NodeRed - Create a user interface with dashboard nodes
NodeRed - import and export node code

Required tool:

Required material:

In the following list you will find all the parts you need to implement this article.

Log into the NodeRed configuration interface

Before you can edit your NodeRed configuration, you must - if activated - first log into the NodeRed configuration interface.

View of the login dialog. Here you have to enter the login data that you specified during the configuration of the login. You can find information about this in the article NodeRed - set up user login.

Node code

Fügt folgenden Node-Code in euren Flow ein um die Laufzeit eures RaspberryPi’s im Dashboard anzuzeigen.
Vergesst nach dem Einfügen nicht das Ausgabe-Textfeld auf eurem Dashboard korrekt zu positionieren.
Informationen dazu findet Ihr auch in dem Artikel NodeRed - Create a user interface with dashboard nodes.

Ansicht im NodeRed-Editor
[{"id":"5d7f95c0.a4beac","type":"inject","z":"977ed91b.3c1268","name":"","topic":"","payload":"","payloadType":"date","repeat":"60","crontab":"","once":true,"onceDelay":0.1,"x":350,"y":2400,"wires":[["bc9f9009.9737c"]]},{"id":"bc9f9009.9737c","type":"exec","z":"977ed91b.3c1268","command":"uptime -p","addpay":false,"append":"","useSpawn":"","timer":"","oldrc":false,"name":"Laufzeit","x":520,"y":2400,"wires":[["97a66498.6af468"],[],[]]},{"id":"97a66498.6af468","type":"ui_text_input","z":"977ed91b.3c1268","name":"","label":"Uptime","group":"56d04a8f.ecd7a4","order":0,"width":0,"height":0,"passthru":true,"mode":"text","delay":300,"topic":"","x":760,"y":2400,"wires":[[]]},{"id":"56d04a8f.ecd7a4","type":"ui_group","z":"","name":"System","tab":"77aad24e.6a657c","disp":true,"width":"6","collapse":false},{"id":"77aad24e.6a657c","type":"ui_tab","z":"","name":"Einstellungen","icon":"dashboard"}]

Have fun with the project

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. 🙂

Buy Me a Coffee at       

Kommentar hinterlassen

Your email address will not be published. Erforderliche Felder sind mit * markiert

The reCAPTCHA verification period has expired. Please reload the page.