Using the Raspberry Pi to control digital information screens

Concerto

Concerto [3] consists of a server and one or more clients – either Rasp Pis or normal PCs  – that control the screens. The computers get the contents from the Concerto server and administers them via a web interface. A client, therefore, is more or less made up of a web browser that calls up a web page from a server and then displays it in full-screen mode. If you would like to check out Concerto in advance, a demo page [4] on the web shows the screens and offers a test run with the admin interface.

A Concerto client is very easy to install on the Rasp Pi. You will first need a browser. Aside from Midori, this could be Chromium in kiosk mode (@chromium --kiosk).

Additionally, you can install the unclutter package if you need to, which will prevent the mouse cursor from appearing. Then, you should make sure the browser starts in full-screen mode and contacts the Concerto server. To do this, simply add the line from Listing 4 to the ~/.config/lxsession/LXDE/autostart file.

Listing 4

Contacting the Concerto Server

@midori -e Fullscreen -a http://<Concerto-Server>/screen/?mac=<MAC-Address>

You should use the address of the corresponding computer for the <Concerto-Server>. Here, <MAC-Address> should be replaced with the MAC address of the Raspberry Pi. Finally, you will need to make sure that the screen does not turn itself off when the information is supposed to be displayed. Go to the /etc/lightdm/lightdm.conf file in the [SeatDefaults] area and modify the start command as follows:

xserver-command=X -s 0 dpms

As already indicated, Concerto offers an option for controlling several screens. The server runs as a PHP application that uses a MySQL server as a database. The database server software need not run on the same computer as Concerto.

To install the server, download the server software from the homepage [5], unpack it, and copy the information onto the web server. Concerto comes in two variations. One version has a special authentication system, CAS, from Yale University, and the other does not. Usually the second version concerto-1.9.3-NoCAS suffices. You can adjust the access rights by entering the following commands on the web server:

$ cd <concerto-directory>
$ sudo chown -R www-data .

To continue, copy the configuration file config.inc.php.sample to the config.inc.php directory and adjust, at minimum, the variables from Listing 5 according to your situation.

Listing 5

Configuring Concerto

$db_host = 'localhost';     // database server
$db_login = 'user';         // database user
$db_password = 'password';  // database password
$db_database = 'concerto';  // database name
// Important paths
define('ROOT_DIR', '/var/www/');  // path for the Concerto installation
define('ROOT_URL', '/');          // URL for the Concerto installation

Afterward, you should set up the database and fill it with the required tables and data from the install directory (Listing 6). The last command sets the password for the user admin. Although the server comes without a password, the software does not allow login without a password.

Listing 6

Setting Up the Database

mysql -h localhost -u user -p concerto < schema.sql
mysql -h localhost -u user -p concerto < data.sql
mysql -h localhost -u user -p concerto -e "update user set password=md5('password') where id=0;"

Concerto has a short diagnostics script (Figure 4) that lets you see whether the installation works. During testing, I found a mistake in the setting for the variable PATH_INFO. I resolved this easily with one click on try visiting this. If this doesn't do the trick, you will need to add the directive AcceptPathInfo On in the Apache configuration file .htaccess.

Figure 4: You can check the installation of the Concerto server with a small script.

As a final step, you should install a cron job (Listing 7). If Concerto is on a virtual server or in a subdirectory, adjust the path that is included accordingly.

Listing 7

Installing a cron Job

*/5 * * * * wget --delete-after --quiet http://localhost/common/scripts/cron.php

Now, Concerto is ready to use. Logging in takes you to the dashboard (Figure 5). Here, it quickly becomes apparent that Concerto is a complex application. In addition to user administration, Concerto has the ability to activate content, install screens, and upload and administer content.

Figure 5: The Concerto dashboard lets you administer the functions of Concerto from one central location.

As a first step, you should install the templates from the homepage [6]. You can do this by going to Template Importer located at the bottom of the Admin menu (Figure 6). A template describes where text, graphics, and potentially the time of day will go on the display screen. The template also defines the background picture.

Figure 6: Templates are used to determine the layout of the contents on the digital information screen.

Next, download a template ZIP archive, unpack it, and select the graphics and XML files in the importer. Then, set up a feed in the Browse Content tab. Now, you can categorize the messages. Users can fill the feeds with content. Administrators choose which feeds occur on the display screen and how often they occur.

Next, you should set up the first screen in the Screens tab. The MAC address that the software asks for will be the same one you have already entered into the client when providing the URL to the browser. This is how the Concerto server recognizes the individual screens.

If you have set up the screen, then click again on the display screen and configure it for the feeds that it should contain via Manage Subscriptions. As a last step, you should add content using the menu option Add Content and determine the feeds to which the content belongs.

Concerto permits users to set up an account themselves via Signup and then to transfer content. However, the content will remain invisible until a moderator possessing the requisite rights makes it visible (Figure 7).

Figure 7: New content submitted by users must be released by an administrator before it can appear on the display screen.

Conclusion

If you want a quick and easy way to turn a monitor into an information display screen, then Screenly OSE is an excellent option. Installation and administration are easy, and the software already has the features built in that you will need to get started.

Concerto is probably overkill if you only want to operate one display screen. Also, all that Concerto currently supports are images and text. The developers are working on Concerto 2 [7], which should handle videos and dynamic content, such as weather forecasts.

Raspberry Digital Signage might well not be able to compete in this area yet. The way the developers have made the code available for download does not invite any active cooperation.

Many other projects use a Raspberry Pi as a control mechanism for digital signage. If the solutions introduced here do not fulfill your requirements, then you can find further inspiration in the digital signage overview on Elinux.org [8].

The Author

Wolfgang Dautermann works as a system administrator and has tamed many versions of Linux and various other Unix beasts, including Solaris, Irix, and Tru64. He is one of the organizers of the Linux Days in Graz, Austria.

Buy this article as PDF

Express-Checkout as PDF

Pages: 6

Price $2.95
(incl. VAT)

Buy Raspberry Pi Geek

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content