Sunday, 25 February 2018

PC case notification screen, part 3 - software & installation

In the first two parts of this project, I setup a Raspberry Pi to display notifications from my desktop PCs to a small LCD which I then 3D printed mounts for to install it into the PC itself.

Software
I originally hoped to use existing software, such as Grafana and Graphite, but although they do run on the Raspberry Pi, it was difficult to get them to behave reliably, so I ended up going for a homebrew solution.

As I alluded to in an earlier post, the data comes out of the desktop by piping output from the linux command sensors via the a USB serial port like so:

sensors > /dev/ttyUSB0 2>/dev/null

The application running on the Pi reads data from the serial port, and using a simple parser, extracts the system temperature.

This is then passed to a Processing.org sketch, which draws an (admittedly rather basic) gauge, displaying the temperature.

The code is available on Github. It also contains an interface class and an example implementation of that class, this is a wrapper I made around the Processing.org library to make it easier to compartmentalise the processing functionality into separate classes, with the intent of making it easier to create a modular display (so further notification modules could be added in future - system speed, email/social media notifications etc).

Installation

The two mounts are either side of the metal front panel of the case, back-to-back.
The Pi sits on the inside, and the display sits on the outside (of the metal chassis - it is covered by the actual front panel of the case).
This allows the outside of the case to remain unchanged, but the display of the LCD is bright enough to shine through the translucent panel.

When the PC is powered down, the USB port still provides power, so the Pi stays on, but the power to the display is cut. This avoids having to go through the Pi boot sequence each time, but allows the display to be shut off.


A post shared by Anthony (@darkmidnight_diy) on

No comments:

Post a comment