Two bits I like and make it a bit different - the handmade wood case, and the switches. The case is cedar and purpleheart, so it looks striking and smells amazing. The big chunky toggle switches are set up to play music, so it can work as a jukebox without needing the TV on to access controls. There's a python script to do this, which I'll detail later.
So, without further ado, the build. First up, making the case. I cut some channels into the cedar to slide the base into later (I don't have a full-size router so I did it with my 3KW mitre saw - luckily this is nice chunky wood so I could make those cuts without risking going all the way through). Clamp them bad boys up to the piece of purpleheart that is the front of the box (never enough clamps....) with some woodglue, leave for 24 hours.
Meanwhile, got some work to do on the top. There was a few little cracks so I cleaned them out and filled them in using crushed turquoise and superglue. Sparkly! A bit of sanding is needed from this photo to get it perfectly flat.
Uh-oh! I drastically underestimated the amount of space the socket extenders and the various usb link cables would take up - there's no way this lot is going to fit in the box. Argh!
XBian on there and got Kodi up and going, wifi and so on.
There's some python in the background of this picture (over ssh) which is monitoring voltage drops over various pins. I enjoy programming python, and I very enjoy doing physical IO. The basic script worked easily enough, I can spot pins being closed/opened. Time to hook up the switches and get on with the fun bits.
OK, quick break to make some copper labels for the switches. Simple 4mm letter stamps on 1mm thick copper plate, cover in Protectaclear sealant so they stay nice and shiny. The text is a bit wobbly but I like it that way.
But what happens if the user turns on the 'jungle' switch without turning off 'reggae'? Jungle starts playing, OK - but then maybe they notice reggae is still on, and turn it off! Then, confusingly, the music stops while jungle is still turned on. That's not right.
So, with a bit of cleverness we can keep track of which order the switches were turned on, and make sure that we don't stop anything unexpectedly, and always activate the most-recently turned on switch. Neat, huh!
But, it doesn't stop there. I later found out that Kodi will let you combine playlists - so you can make a playlist which is made up of other playlists. That means the final version of the script will add playlists - if you turn on reggae, then turn on jungle, you get a playlist which is made up of both reggae and jungle. Turn off one, it's removed from the list - turn on another and it's added. This way you can look at the switches and you know what should be playing. The system is predictable and consistent (hopefully!)
The script itself is here, feel free to take a copy if it's any use to you. It needs to run as root, so it can access the Pi's GPIO pins.
Alrighty, back to the build. Switches are working, software is installed and set up - it's just time to assemble. The wood has had a few gentle coats of beeswax, just to give it a little sheen, and I added a little copper gilding to spice it up a bit. Here's the final assembly.
From the back, note HDMI and headphone jack outputs - Kodi is configured to send audio to both. Power socket and power switch on the left, as well as a nameplate (I had a bit of spare copper, why not?)
From the front. Man, purpleheart is so good looking.
Usual shameless plug for my store.