Like many selfhosters, having a dashboard to quickly access all of your selfhosted applications is one of the most fun things to set up in your homelab. There are lots of different dashboards to choose from: Heimdall, Organizr, DashMachine, just to name a few.
After playing around with each of them, my dashboard of choice is is Homer. I’ve been running it for last 6 months or so, and I still love it every time I open it.
A few weeks ago, I came across a post where someone had integrated a “Jokes API” into the Message field of Homer. I couldn’t find any helpful guides on how to set this up, so I set it up myself and documented everything along the way.
Here’s what that looks like:
In this guide, I will show you how to install Node-Red, import the Homer Node-Red flow, and then display the Jokes API in your Homer Dashboard.
How It Works
For purposes of this demo, I’m setting up Node-Red in a Docker container.
I will note that I have never used Node-Red before, so if you haven’t used it before either, don’t worry. I will walk you though step-by-step how to set this up.
Prerequisites
This guide assumes you already Homer setup and have Docker installed. If you don’t have those setup yet, here are some helpful guides I’ve already created:
Let’s get started!
Step 1: Create Node-Red Docker Container
SSH into your Docker host and create a new container. I keep all my containers in their own separate folder at /srv/config
, so here’s what mine command looks like. Change the red text to your own path.
sudo docker run -it -p 1880:1880 -v /srv/config/nodered:/data --name mynodered nodered/node-red
If you receive an error in the console, you probably need to take ownership of the directory first.
sudo chmod -R 777 /srv/config/nodered
Then, create a new container. Change ‘mynodered’ to a new name such as ‘nodered’ since mynodered was already used. You can delete mynodered later.
sudo docker run -it -p 1880:1880 -v /srv/config/nodered:/data --name nodered nodered/node-red
Step 2: Open the WebUI
To verify the container has started, you should see text that confirms it has started.
To test, log into the container via the Docker host IP address and port 1880 (i.e. – 192.168.68.141:1880) in a web browser.
If it doesn’t load, you may need to start your container. Use sudo docker container start nodered
If all goes well, you should now be able to open Node-Red successfully:
Step 3: Import Homer Node-Red Flow
Download the flow from here: https://gist.github.com/JamiePhonic/4b6406c9a684c26ace0430dd1826e95d
Scroll down until you see the flow.json. Click RAW.
Highlight everything and then copy to clipboard with CTRL+C.
Navigate back to Node-Red. In the top right corner, click the 3 lines > Import.
CTRL+V to paste in the copied text. Then click Import.
You should now see a flow imported that looks like this. Leave everything as is and click Deploy.
Step 4: Edit Homer config.yaml file
Next, edit your Homer config file and add this block under the links: section. Change the IP address to your own, of course.
Then Save.
message:
url: "http://192.168.68.141:1880/dashboard-endpoint"
style: "is-danger"
title: "Node Red"
content: "Couldn't get dynamic data from Node Red!"
Step 5: Test it out!
If everything works correctly, the next time you open your Homer dashboard you should see a random news item! It takes a second to load initially, but every time you refresh after that, it’s instant. If it doesn’t show up right away, try opening the dashboard in an incognito browser.
Step 6: Change the RSS Feed
Chances are you don’t really care for news from Scotland, right? Let’s change the RSS feed to something else.
Open Node-Red again and double-click the Get News RSS Feed node:
The default URL is: http://feeds.bbci.co.uk/news/scotland/rss.xml
Go ahead and change it out with any public RSS feed that you want! Below is a short list of RSS feeds I’ve personally tested. Just paste one of these URL’s in and then click the red Deploy button in the top right corner. Then, refresh your Homer dashboard.
Honestly, this part is just a lot of trial and error. A lot of feeds don’t get formatted correctly, but the easiest way to test out alternative RSS feeds is to just google “news RSS feed”, “Joke RSS feed” or something similar and test URL’s until something works correctly.
FunnyShortJokes.com RSS Feed (this one sometimes has formatting problems): http://www.funnyshortjokes.com/feed
The Capital RSS Feed: https://thecapital.io/assets/feed/news.xml
FMLife RSS Feed: https://www.fmylife.com/rss?x=1
Adam The Automator: https://adamtheautomator.com/feed/
Security Now: https://www.darkreading.com/rss_simple.asp
Wrapping Up
Hopefully this guide helps you add your own RSS Feed to your Homer dashboard! Let me know in the comments below if you were able to get this setup following my guide.
My Homelab Equipment
Here is some of the gear I use in my Homelab. I highly recommend each of them.
- Server 2019 w/ Hyper-V
- Case: Fractal Design Node 804
- Graphics Card: NVIDEA Quadro K600
- CPU: AMD Ryzen 7 2700
The full list of server components I use can be found on my Equipment List page.