Simple monitoring of a Raspberry Pi powered screen - Part 2

Posted by Chris Houston on Vizioz Umbraco Blog See other posts from Vizioz Umbraco Blog or by Chris Houston
Published on 2014-04-08T09:04:00.000-07:00 Indexed on 2014/05/26 21:58 UTC
Read the original article Hit count: 307

Filed under:
|
If you have read my previous blog post Raspberry Pi entrance signed backed by Umbraco - Part 1 which describes how we used a Raspberry Pi to drive an Entrance sign for QV Offices you will have seen I mentioned a follow up post about monitoring the sign.

As the sign is mounted in the entrance of the building on the ground floor and the reception is on the 1st floor, this meant that if there was a fault of any kind showing on the screen, the first person to see this was inevitably one of QV Offices' clients as they walked into the building.

Although the QV Offices' team were able to check the Umbraco website address that the sign uses, this did not always mean that everything was working as expected. We noticed a couple of times that the sign had Wifi issues (it is now hard wired) and this caused the Chromium browser to render a 404 error when it tried to refresh the screen.

The simple monitoring solution

We added the following line to our refresh script, so that after the sign had been refreshed a screen shot of the Raspberry Pi would be taken:

import -display :0 -window root ~/screenshot.jpg
Finally we wrote a small Crontab task that ran on a QV Offices Mac that grabs this screen shot and saved it on the desktop, admittedly we have used a package that it not mega secure, but in reality this is an internal system that only runs an office sign, so we are not to concerned about it being hacked.

*/5 * * * * /usr/local/bin/sshpass -p 'password' /usr/bin/scp [email protected]:screenshot.jpg Desktop/QVScreenShot.jpg
As the file icon updates, if the image changes, this gives a quick visual indication of the status of the sign, if for some reason the icon does not look correct the QV Offices administrator can just click on the file to see the exact image currently displayed on the sign.

Sometimes a quick and easy solution is better than a more complex and expensive one.

© Vizioz Umbraco Blog or respective owner

Related posts about Raspberry Pi

Related posts about Umbraco CMS