Build a Geckoboard TV Dashboard with a Raspberry Pi

Part of the work I do on Postmark is helping make sure we know what’s going on inside the system at any given time. We built a real-time(ish) monitoring system using Geckoboard and a variety of Windows Performance Counters, API endpoints, and database calls. I’ll save those details for another post.

Geckoboard provides an easy-to-use suite of widgets that speak JSON and XML so if you shoot your data at it on an interval (or provide it an API to poll), it’ll display the data through charts and graphs in ways that are useful to an audience. We use it extensively at Wildbit to keep an eye on all the various Postmark systems.

Having this information on display at our office for everyone to see is important so we arranged to show our Geckobard dashboards on 40 inch televisions, 2 for Beanstalk and 1 for Postmark. We bought 3 Rikomagic MK802 Android devices which are convenient since they come equipped with HDMI out and can be powered by the USB ports on the TVs.

The original MK802 device.
The original MK802 device.

For the most part this worked well but there were some drawbacks to using the Android devices. The biggest problem was that we couldn’t seem to get a browser to run in full-screen or kiosk mode. A lot of screen real estate was taken up by the browser chrome and menus which meant less room was available for Geckoboard graphs. Last week the Android device powering the Postmark Geckoboard suffered some kind of disk encryption failure and stopped working. After a few failed attempts at restoring the MK802, I opted to try out my new Raspberry Pi to display the dashboard.

The way I saw it, there were no downsides to using the Pi instead of another MK802:

  • Cost is about the same.
  • Also comes with HDMI output and can be powered by the USB port on the TV.
  • Runs a full fledged Linux distro (Raspbian, among others) so it would be a familiar configuration setup.
  • Possible to run X11 and Chrome in kiosk mode for a more professional looking setup.
Raspberry Pi Model B
Raspberry Pi Model B

Following are the steps I took to create a fully automatic Raspberry Pi Geckoboard TV dashboard:

Hardware:
Software Setup:
  1. First you’ll need to install an operating system on your Pi. I’m using Raspbian ‘Wheezy’ which is a Debian derivative and one of the recommended choices. I won’t go into the installation details here. For that, I’ll direct you to their setup guide (PDF). You can go ahead and get through that first. It’s cool. I’ll wait. Make sure to get your wireless (or wired) networking going before trying to continue.
  2. Set your Pi to boot to ‘desktop mode’ by default. This will go straight into the X desktop and window manager when you turn your Pi on. To do that, you’ll need to go into your raspi-config tool by typing:
    sudo raspi-config
    

    Setting up to boot direction to desktop mode.
    Setting up to boot direction to desktop mode.

     

  3. Once that’s done, we’ll need to install a few things:
    sudo apt-get update && apt-get upgrade -y
    sudo apt-get install chromium x11-xserver-utils unclutter

    Now that we’ve got a few utilities installed and, more importantly, the Chromium browser, let’s make some configuration tweaks: (source)

  4. Edit the /etc/xdg/lxsession/LXDE/autostart file
    sudo nano /etc/xdg/lxsession/LXDE/autostart

    Comment out the @screensaver line with a “#”
    Add the following lines:

    @xset s off
    @xset -dpms
    @xset s noblank
    @chromium --kiosk --incognito http://link.to.dashboard/9894389439
    

    That last line contains the link to which you want Chromium to be directed on bootup so put in the public link to your Geckoboard (or other dashboard).

  5. Finally, you may need to force your Pi to use HDMI out if you are getting power from the TV. The Pi doesn’t detect the HDMI signal from the TV fast enough when you turn it on and disables the port on some TVs (this happened to me).
    sudo nano /boot/config.txt

    Remove the comment from the line:

    hdmi_force_hotplug=1

    That should keep your Pi outputting video to your HDMI output regardless if it detected the TV at first or not.

Final Product:

Our command center consists of 3 TVs, the middle is for Postmark. I still need to mount our Raspberry Pi properly since this was just a prototype setup. So far so good, however. I think we’ll replace the last two MK802s with Pis soon since it offers a superior dashboard experience.

Beanstalk and Postmark
Beanstalk and Postmark
Current setup. A little temporary.
Current setup. A little temporary.

About JP Toto

JP is a devops developer in Philadelphia, PA. He works at eMoney Advisor by day and attempts to cook by night.

6 Comments

  1. That’s such a professional setup! Looks great.

    1. Thanks, Chris!

  2. Cool dashboards 🙂

  3. Sweet job JP!

    we do basically the same, but using Dashing: http://shopify.github.io/dashing/, which gives us the ability to Chef-ify the raspberry pis and manage them with capistrano.

    my big seller for the rpi vs anything is is that I can drop a bigger antenna on it if it happens to be on a tv that hash shittier reception. or even a old fashioned ethernet cable if it’s truly disconnected (our office is in an old building and some walls are really thick brick)

    1. Thanks! Dashing looks cool! I’ll have to check that out. Chefing Pis is an awesome idea. For the cost, the flexibility of the RPi is unbeatable.

  4. This looks amazing, JP! The team at Geckoboard says thanks for sharing! 🙂

Comments are closed.