Raspberry Pi Jukebox (XMBC)

tldr; I wanted to use my Raspberry Pi as a jukebox (music only) using XMBC, but it doesn’t like to run without a screen.

I recently acquired a second Raspberry Pi. I’m using the first one for a bunch of web automation stuff for work, and I intended to use the new one to encourage my son in the direction of hacking/programming stuff. However, he’s mostly interested in Minecraft, which also has a lot of potential when it comes to hacking/programming, but doesn’t really lend itself to the low power of the RaspPi. So, for the moment, I have this additional Pi sitting around to play with.

One of the cool things that folks are doing with RaspPi is the XMBC project, which is a home theater server. There’s several Raspberry Pi distros of it, and I tried the Raspbmc distro, since it was *really* easy to install.

It boots up directly into the media center UI, much like a Roku does, so there’s no mucking about with user accounts, and no learning curve for folks who aren’t Linux users. Very slick.

Unfortunately, I primarily wanted to use this as a jukebox, for music, and not for media. As such, I wanted to run it “headless” – ie, without a screen – and be able to control it entirely with the remote, for the purposes of playing music in my office.

I ran into two problems.

One, in order to do what I wanted, I needed to have several USB devices hanging off of the Pi, including a wireless networking dongle and a USB hard drive. Both of these draw quite a lot of power, and so can’t be plugged directly into the Pi, but have to be plugged into a powered USB hub. It appears that all of the USB hubs I have don’t provide sufficient power. From the reading I did, this seems to be a common problem – that “powered’ USB hubs often don’t provide as much power as they promise, and so it makes it hard to actual use powered devices on them. The symptom I experienced was that the hard drive kept powering down every few minutes, and I’d get a warning message on the Pi.

Which brings me to my second problem.

When rebooting the Pi, I very consistently got a warning message that I hadn’t powered it down properly. This warning message is a popup dialog that requires you to click OK. A second dialog warns you against shutting down the device incorrectly, and also has an OK button. Unfortunately, this means that it’s effectively impossible to run the device without a screen, ’cause you can’t see to click OK. As stupid as that sounds, this was a game-stopper for me, as I don’t want to dedicate a screen to my jukebox in my very limited office space.

FWIW, I eventually purchased a Roku (as I blogged earlier) as a late Christmas present to myself and Maria, and it does the jukebox stuff as well as all of the other shiny things.

But I’d still like to do something with this Pi sitting on my desk. Suggestions welcomed.

Roku

My “I don’t need it but I want it” technology purchase this Christmas was a Roku.

I spent several hours early on the Christmas break trying to build a XBMC raspberry pi media center to act as an office jukebox. This worked ok, but I learned two things. One, it doesn’t like to run “headless” (ie, without an active screen) and two, you really need a powered USB hub if you’re going to plug in any non-trivial (ie, not a keyboard) USB devices, such as a wifi dongle or a USB hard drive.

Anyways, as fun as that was, I wanted something more polished, and picked up the Roku 3 at Radio Shack. In addition to playing my music collection, it can also do Pandora, Netflix, and a few thousand other things.

So, it’s kind of overkill for what I wanted – just an easy way to play my music with a simple remote control – it’s a fun toy, and also a great way to watch Netflix in the evening.

It’s also interesting to compare this with the Google Chromecast that I picked up at LinuxCon a few months ago. While the Chromecast is a cool device, it’s *way* behind Roku in terms of content and apps, and it’s going to take a lot of catching up before I’d consider using it in place of the Roku. I’m sure that they’ll get more content, but they may have already lost the race.

Proliferation of OSes

As of yesterday, we now have the following operating systems in this house:

Desktop:
* Windows 7

Laptops:
* Chrome OS
* OS X
* Fedora 20
* CentOS 6

Phones:
* Android
* iOS
* Random AT&T phone

Tablets:
* Android
* Android with CyanogenMod

Raspberry Pi
* Pidora
* Raspbian

And, of course, being The Computer Guy, they’re mostly my job. Fun, fun.

Blog comments

I just upgraded Habari (the blog software) and in the process of purging spam comments, I appear to have also nuked all legitimate comments. I suppose I should be upset, since there were almost 3000 comments on the site, but it feels like a chance to start fresh, and not have to paw through a million spam comments for the occasional diamond.

The one page with really valuable comments is archived at archive.org

OpenStack Meetup, Cincinnati

Last night I attended the OpenStack meetup in Cincinnati. It was a lot longer drive than I anticipated, as it was on the north side of Cincy. But it was worth the drive. There were only five people there including myself, and although there was nothing formal planned in terms of a presentation, we had a great conversation around what we do in our various jobs with OpenStack, and I think we all learned something new about the OpenStack world in the process.

If you’re in the Cincy/Louisville/Lexington area, and you’re interested in future meetups, please let me know (rbowen at red hat dot com), so that we can get you included in those announcements. I’d really like to do something in Lexington, so that I don’t have to drive so far. 😉 So if you’re in Lexington and are interested in, or are using, OpenStack, please ping me and we’ll set something up.

How Not To Program

Today I saw this tweet:

And it took me back …

2000, I was attending YAPC. I had been doing Perl stuff for several years at that point, and had written, among other things, a web calendar app called Hypercal. Calendar math was something I was very interested in at the time – particularly non-Gregorian calendars.

While at YAPC, I had several conversations with people about calendrical calculations, and on improving the core Perl date/time libraries. It was, in fact, immediately after one of these conversations that I attended a talk titled something like “how not to program”, which featured spectacularly bad code examples from published works. I *think* that the speaker was MJD, but this was a long time ago.

As I watched the speaker expound on the horrors of the code he had found, I gradually realized that this was MY code that he was lambasting. As it happens, an early version of Hypercal had been used as an example in a Japanese book on CGI programming. I still have a copy of it somewhere, I’m sure, but I expect it’s out of print now. But, there it was, on the big screen, for everyone to see.

It was truly awful code, and it could have been a truly humiliating experience, had I not, by that time, progressed a ways past my early errors. What’s amazing was that, at the time, there were few enough people producing Open Source web apps that my dreadful code ended up being an example worth putting in print.

I often think of that incident when helping beginners. It’s good to remember that 1) everyone you meet knows how to do something you don’t, and 2) no matter where you are now, at one point you were a clueless beginner.

Mulled wine and a nice tree

7 years ago this evening, I knocked nervously on Carie’s door. We had a date to make mulled wine. Yes, it’s an odd first date.

We made several bottles of mulled wine, a few of which we still have. I said that one of her paintings was “nice”. Yep, I really did. “Nice.” Sheesh.

Eventually, it was time to go, and I said I’d like to see her again some time.

And here we are. And, seven years on, it just keeps getting better all the time. If there’s a regret, it’s that I didn’t find her sooner. The nice painting hangs over my desk. It’s still very nice.

nice tree

The Margin Is Too Narrow