Failed Interfaces

A project log for Car Audio Player

An inexpensive audio player with a simplified interface to make driving safer.

JeremyJeremy 10/25/2016 at 19:430 Comments

If I haven't said this before, I'll say it now. I'm not the smartest person out there. If a project doesn't have some good documentation, I might not be able to figure it out. MPD has some API/interface projects out there, but most of them are fairly confusing for a simple man like me.

I tried MPD Web Remote by Thomas Preston. It worked fine, but the interface was too cluttered for a crappy touchscreen. I want the UI to be as easy as the car stereo. On top of that, the touchscreen isn't very accurate so you can easily tap the wrong button if the buttons are small. I could try reusing code, but sometimes it's easier to create than reverse engineer enough to reuse.

I also tried Mipod, which is a REST API (or websocket if you want) for MPD. It required node.js, which I have never used before. It took a bit to set up. I had to have Mipod listen on a different port so it didn't conflict with Apache. I didn't think the documentation showed how to use the commands well. One of the commands supposedly required a POST method, but I could only get it to work using the GET method.

Ultimately, I decided against using these APIs for various reasons. The UI I want is basically a swipe-based UI. You start on the Artist level. Swipe left or right to select the artist. Swipe down to see the artist's albums. Swipe left and right to choose an album. Swipe down to see the songs from that album. At any of those levels, if you tap, it will play/pause. None of the APIs organized the data in the artist->album->song hierarchy, probably because MPD doesn't doe this. So I am making a simple PHP script that will handle the logistics. It will probably just execute shell commands and format the output. I'm sure it would be better to figure out how to interface directly with MPD, but as I said, I'm a simple man. And I don't care that much about security. There won't be any sensitive data on the Pi (except my Beastie Boys music) and it will rarely be connected to a network.

So that's where I'm at right now. Still creating the HTML/Javascript UI and the PHP API.