Building an Information Radiator with a Raspberry Pi and a Touch Screen

29.3.2018

Marko Wallin

Marko Wallin

Marko works as a full stack software engineer and creates better world through digitalization. He writes technology and software development related blog and developes open source applications e.g. for mobile phones. He also likes mountain biking.

Information is a great tool in software development and it’s useful to have easy access to it. The more obvious you make your problems, the harder you make them to ignore. The more attention they get, the quicker they get solved. One thing developers like to monitor in software development is the continuous integration status and metrics from running services. And what better way to achieve visibility and visualize those metrics than building an information radiator.

I didn’t want to reinvent the wheel so I got a Raspberry Pi 3 Model B with accessories and a 7″ touchscreen to base my project. Using a Raspberry Pi as an information radiator isn’t a new idea and the Internet is full of examples of different adaptations with screens, lights, bells and whistles. For the start, we just visualized our Jenkins builds and Grafana dashboard but later on we will probably do a custom dashboard.

Raspberry Pi and accessories

Setting up the base

The information radiator is easy to get running as you only need a computer which preferably runs Linux. You can use an old laptop and attach it to an external screen, or if you’re like me and want to tinker, you can get e.g. Raspberry Pi 3 Model B and couple it with a small external screen for portability. A nice and low-cost solution which gets you some hacker value. I got the Rpi Model B from our local hardware store but unfortunately, I missed out on the Model B+ which was released on the same day. The extra 15% power, 5 GHz Wifi and less heat and throttling would’ve been nice.

I got the Raspberry Pi starting package with the official case, power supply, HDMI cable and a MicroSD card with preloaded NOOBS. So I just needed to connect the cables, put SD Card in and click to install Raspbian. Other interesting operating systems would have been Fedberry which is Fedora ‘Minimal, XFCE and LXQt’ Remixes.

For the screen, I used a 7″ IPS 5 point touch screen for Raspberry Pi with 1024×600 resolution and HDMI from joy-it codename RB-LCD-7-2. Initially, I thought I could install the whole system with this display but as it turned out Rpi doesn’t understand it out of the box. It just showed some white noise and interference. Luckily someone had already solved this and I got the right config after I had installed Raspbian with a real monitor.

Accessing Raspberry Pi remotely

The information radiator is usually connected to a TV with no keyboard or mouse attached so accessing it remotely is useful. You can use x11vnc which allows you to VNC into a headless Pi with a VNC client like Apple Remote Desktop, RealVNC’s vncviewer or homebrew’s tiger-vnc.

Getting interesting things on the screen

To test our setup and quickly show some data I just added a Build Monitor view in Jenkins and another view with Dashboard view. I also configured the Rpi to automatically start the Chromium browser in kiosk mode after reboots and directed it to the Jenkins website so there would be no need for interactions to get things on the screen. To show several sources of data and get things running quickly without customized information radiator we used Revolver – Tabs Chromium extension to rotate between multiple browser tabs: one showed Jenkins Build Monitor other Grafana Dashboard and third Twitter feed.

Raspberry Pi and Jenkins Build Monitor

To automatically start the chromium-browser after Raspbian desktop starts, edit the following lxsession file:

Chromium has a feature to show “Restore pages” nagging popup when not gracefully shutdown and you can try the following Stack Overflow suggestion. What was also suggested was doing “chmod 001 ~/.config/chromium/Default/Preferences” but it resulted in another nagging window.

You could use “–restore-last-session” or “–incognito” parameter which also works but it has several disadvantages, such as disabling the cache and login information. Or maybe I should just use Firefox.

Turning the monitor on and off automatically

When running Rpi as a wall monitor it’s useful to save energy and extend the life of your monitor by turning the monitor on/off on a daily schedule. You can do this by running a cron script. Get this script and put it in “/home/pi/rpi-hdmi.sh” and make it executable: chmod +x /home/pi/rpi-hdmi.sh. Call the script at the desired time with the cron entry:

If you have problems with the above script try this one which is the original, but change “curr_vt=`fgconsole`” to be “curr_vt=`sudo fgconsole`” as fgconsole needs sudo privileges otherwise you get an error “Couldn’t get a file descriptor referring to the console”.

Information Radiator in use

From simple dashboard to real information Radiator

Showing just the Jenkins Build Monitor or Grafana dashboards is simple but to get more information you could show things like the success rate of the builds, build health, latest open pull request and project Twitter Messages. One nice example of an information radiator is Panic’s Status board.

There are different ways to create a customizable dashboard and one way is to use Dashing which is a dashboard framework. To get a headstart you can see Project Dashboard which shows “build health” for the latest build, the latest open pull request in Github, the success rate of your builds, some free-form text and your project’s or company’s logo. It uses the Jenkins API to get the ratio of successful / non-successful builds as well as the latest build state. It also calls the Github API to get the latest pull request to display the name and picture of the author and the title of the pull request on the dashboard.