It is known that almost all Linux commands can be executed with the help of NodeRed. What makes the whole thing particularly practical, however, is that you can then also process the returned data with the help of NodeRed.
In the following article I use this to read the last Linux logins on my RaspberryPi and to display them in a table. In this way, the last logins can be clearly displayed and who logged in from where and when on the Linux computer in question. 🙂
I know the following hints are always a bit annoying and seem unnecessary. But unfortunately, many people who knew it "better" from carelessness lost their eyes, fingers or other things or hurt themselves. In comparison, a loss of data is almost not worth mentioning, but even these can be really annoying. Therefore, please take five minutes to read the safety instructions. Even the coolest project is worth no injury or other annoyance. https://www.nerdiy.de/en/sicherheitshinweise/
The links to online shops listed here are so-called affiliate links. If you click on such an affiliate link and shop via this link, Nerdiy.de receives a commission from the online shop or provider concerned. The price doesn't change for you. If you do your purchases via these links, you will support Nerdiy.de in being able to offer further useful projects in the future. 🙂
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.
The following three articles describe what to do to prepare the RaspberryPi:
RaspberryPi – Setting up for Nerdiys!
RaspberryPi – The first configuration
RaspberryPi – Controlling the RaspberryPi via SSH
NodeRed – Installing NodeRed on the RaspberryPi
In the following list you will find all the parts you need to implement this article.
Log in to the NodeRed configuration interface
Before you can edit your NodeRed configuration you must - if activated - first log in to the NodeRed configuration interface.
Install required nodes
In order to be able to use the NodeCode below, in addition to the dashboard node (NodeRed – create a user interface with dashboard nodes), you must also install the node
How you can do this is described in the article NodeRed – Install new nodes.
Import node code
To test this code, you can simply import the code below into your NodeRed installation. You can find tips on this in the article NodeRed – Importing and exporting node code.
Unfortunately, I could not insert the NodeCode directly here because the HTML code contained in it somewhat “confuses” the look of the website.
You can find the NodeCode here in the Nerdiy-Git:
View in the dashboard
I hope everything worked as described. If not or you have any other questions or suggestions, please let me know in the comments. Also, ideas for new projects are always welcome. 🙂
P.S. 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 appreciate it that I share these information with you, I would be happy about a small donation to the coffee box. 🙂