This Cyber Monday Tuts+ courses will be reduced to just $3 (usually $15). Don't miss out.
Successful business people know that measuring performance is the key to growth and success. If you can not measure the outcomes of your business decisions then you really don't have an adequate grasp of the direction in which your business is going.
Measuring income, turnover, expenditure, return on investment and profitability is something that every business does, but those are often information snapshots of last month, last quarter or last year. It's not real time information.
With the growth and development of the Internet, huge strides in information sharing have become possible. In real time, too!
This tutorial will show you how to set up your own inexpensive business dashboard that is capable of displaying and updating information drawn from many different sources, in real time.
This allows you to monitor the performance of whatever you choose to measure. You can then place a dedicated screen in your office to keep abreast of the stats.
For the purposes of this project, I have used:
- Raspberry Pi
- Power supply with micro-USB connection
- Raspberry Pi case
- SD card
- Widescreen monitor
- An empty Amazon box on which to stand the monitor
- Appropriate cable to connect RPi to monitor
- Cat5E Network cable
- Geckoboard account
The total cost of these components is around £125 (US$210), but you can set this up for less if you already have some spare components needing a project.
Set Up a Raspberry Pi
I have chosen to use a Raspberry Pi, for this project, for a number of reasons.
First and foremost, it's a great way to support an innovative British business by putting an inexpensive computer to a productive task. To me, this makes so much more sense than using a dedicated PC, as the PC is likely to be much more powerful than the Pi.
Of course, that also means that using a Raspberry Pi, rather than a PC, means that the project is going to be much more energy efficient given that a Pi draws so little power compared to a PC.
If I needed to convince myself further, the diminutive form factor of the Raspberry Pi means that it can be secured the the back of the monitor or secreted out of view, elsewhere, without taking up lots of space.
Format an SD card and install Raspian. You can do this easily by installing NOOBS which enables you to set up any one of a number of operating systems, including Raspian.
If you need guidance to do this, refer to the How to Install NOOBS on a Raspberry Pi With a Mac tutorial.
Once Raspian has been installed, the next step is to install Google's Chromium web browser. I have chosen this for the way that it renders we pages, the way it can be scaled and the fact that it shows little in the way of borders or scroll bars when full screen mode is enabled.
There is no need to open the graphical user interface (GUI), of your Pi, as it's the command line interface (CLI) that we require to install chromium. To install Chromium, execute the following commands in the CLI.
sudo apt-get update sudo apt-get upgrade sudo apt-get install chromium
Operating the default Raspian installation will see the video output put to sleep after short period of time. This defeats the purpose of the project as I want to be able to have the display running all the time.
Whilst it is possible to move the mouse, or press a key on the keyboard, that is awkward to have to do and it's impractical as I intend to run the Pi without a keyboard or mouse plugged in.
For this reason, I need a way to keep the video output alive. I achieve this by installing a piece of software called Xscreensaver. To do this, enter the following commands in the CLI:
sudo apt-get install xscreensaver
This installs the Xscreensaver software which is accessible through Start > Preferences > Xscreensaver within the GUI.
Set Up a Geckoboard
In order to display my business statistics I need a dashboard. There are a number of dashboard services available. For the purposes of this tutorial, I am using Geckoboard. You can get a 30-day free trial of Geckoboard, but you should determine which service fits your needs best.
For this part of the tutorial I recommend that you use your usual Mac, Linux machine or Windows PC, as trying to achieve this on the Raspberry Pi will be a time-consuming affair.
In respect of Geckoboard, you first need to connect your services. Services are things like Google Analytics, Trello, Twitter, Pingdom, Bitly and many, many more.
Fortunately, setting up a new service is as simple as selecting a widget. If the service has not already been configured, you will be given the opportunity to connect the new service.
Configuring widgets is a straightforward process that is administered through a web-browser. Remember, this will be quicker set up from your Mac rather than trying to do it on the Raspberry Pi.
- Log into your Geckoboard account and click Add Widget to show a list of the services that you can connect.
- Scroll down the list and select Google Analytics, for instance.
- Select a widget to configure. In this example I have gone for Visits.
- When you have finished entering the required criteria, click Add Widget to add it to your Geckoboard dashboard.
Note, you can reorder the widgets by dragging them around the dashboard within the browser edit view.
Raspberry Pi Custom Settings
Enable Boot to Desktop
Once the Raspberry Pi is up and running with the dashboard, there should be no need to power off either device.
If you prefer, you can have the Raspberry Pi start in the Raspian GUI, rather than the CLI. This is achieved with Enable Boot to Desktop.
To configure Enable Boot to Desktop you need to be on the command line, either through just having booted the device or through LXTerminal if you are already in the GUI.
Enter the command:
Select 3 Enable Boot to Desktop/Scratch then Desktop Log in as user 'pi' at the graphical desktop.
When done, press Tab or Right Arrow twice and select <Finish>
Enable Chromium to Autorun
In the event of a power failure, or other reason, it would be great to have the Raspberry Pi reboot straight into a full screen Chromium displaying the dashboard.
This can be done by editing a file called
.bashrc in the
- Enter the following command to open a file editor
sudo nano /home/pi/.bashrc
- Using the Down Arrow scroll down the end of the
- Enter a new line:
# Reboot into Chromium Kiosk mode
- Enter a second new line:
Start the Raspberry Pi Dashboard
The procedure to display the dashboard, now, is straightforward:
- Ensure that there is a connection to your local area network and the wider internet
- Ensure that the Raspberry Pi is connected to a keyboard and mouse (these can be removed, later)
- Ensuring that the Raspberry Pi is connected to the display, power on both devices
- If you do not have Enable Boot to Desktop configured, launch the Raspian GUI
- Once in the GUI, Launch the Chromium web browser
- Enter the public-facing URL to display the Geckoboard dashboard in the browser (Obtain this URL from the Geckoboard admin panel)
- Bookmark the URL
- When the dashboard is fully display, press F11 on the keyboard to maximise Chromium to display in the full size of the monitor
- If required, unplug the keyboard and mouse from the Raspberry Pi
In this tutorial I have shown you how to set up a dashboard of statistics running from a low-power Raspberry Pi.
Sit back and enjoy having all sorts of important data constantly displayed on a Geckoboard dashboard running from a Raspberry Pi.