Digital signage with WordPress and a Raspberry Pi
October 18, 2016 - Mike
We’re in the middle of building a little project at the moment for our lovely clients, The American Museum. It’s a bit out of the ordinary for us and takes us into unknown territory – but we like a challenge..
We’ve already been developing some prototype builds with Raspberry Pi’s – among them a really nice project which involves running WordPress on the Pi and it throwing out a local WiFi network – this means you’d be able to create localised digital points for things like mobile tours even in environment where there’s little mobile signal and no network. Think Info Point, only cheaper and based on open source tools.
But: this project is even simpler. The basic requirement is to have a digital signage screen up behind the reception area in the museum with regularly updated content: events happening that day, freeform text areas to drop in images and video, etc. The team were first of all thinking about a simple Powerpoint presentation running on a cheap PC, but realised that changing content would be painful – and they wanted something a bit more flexible.
Our approach is to use WordPress – but this time not on the Pi itself. Instead we’ve got WordPress running on the web so that the team can log in and add new slides, edit existing ones, etc. There’s a new Custom Post Type called “signage”:
In here the team have just one “page” ( = one digital sign) to edit – but we’re thinking that if the project works well then they may want additional signs in the future:
Once you’re editing a sign you can then add slides. We use a kind of modular system we’ve developed which hooks into Advanced Custom Fields – and at the moment there are only a few content types – but this could easily expand in the future:
..and a pretty easy to use / familiar WordPress editing interface:
The team can then do all the things they’d be able to do in WordPress – re-order slides, save drafts, preview the signage – and then when they’re ready, publish.
Then on the Pi itself we have a little script which polls the WordPress site every 3 minutes, and pulls down the content locally. We’ve also got some caching in there so if the WiFi network goes down then the most recently fetched version is used instead. Incidentally, we had all manner of problems getting Epiphany browser to full-screen on boot – and then it messed up our styling. But the recently arrived Raspbian Jessie includes Chromium which runs brilliantly in kiosk mode. My other hot tip is to use the ever-so-simple Etcher to do the SD card burning – none of the “write failed” issues you often get!
The actual presentation side of things uses the excellent reveal.js, which is basically a simple way of doing html presentations. This allows us to do nice transitions and other stuff with minimal markup. At the moment the display is very simple:
One of the things we’ve had to think quite hard about is being able to change the look and feel of the slides remotely. Although we can get to the WordPress site easily via SSH we don’t know yet if we’ll be able to SSH in to the Pi itself. So the CSS is kept in one file, and that is fetched as part of the polling process.
For the actual screen itself – we did some research via the MCG list (which also validated using RPi’s – there are lots of museums doing this!) – and although some people responded suggesting high end displays (between £700 and £1500) we had a positive response from the V&A team about a 43″ Digihome 287 TV. It’s made by Tesco (I know) and retails at £199. It isn’t display quality of course but actually it’s pretty good, and ridiculous value for money.
We’re almost ready to install the hardware at the museum – will keep you updated as things progress!