Archive for the ‘Electronics Projects’ Category

The Boxee saga or Except that it wasn’t

Tuesday, December 21st, 2010

As I continue my journey on setting up a home entertainment system, I decided that one thing I have wanted for some time is a connected TV system.   I have wanted to set something up for maybe 10 years, but I just never had the time or the money to put into a dedicated system.  Of course now you can buy one off the shelf, and a number of software options are available.  I already have a roku, but I wanted something that could play my videos, especially some of the workout videos that I have been using for some time.  I opted for Boxee.

My first attempt was to build it on a computer that I got from my brother.  A Sony Vaio.  He had broken the power jack on the laptop, so it was useless to him.  He had replaced it with a mac laptop months ago.  I got it apart, pulled out the old jack, soldered in a new one, and everything was great.  I reinstalled the OS from a secondary partition, installed Boxee, and all was good with the world.  Except that it wasn’t.  The Vaio had only an svideo out option that would work with my TV.  The video looked terrible on my hi-def TV.  Worse than that, the Vaio got so hot I was afraid that it would damage something if I left it on all the time.  My brother says it has been that way since he bought it.  A search online confirms a heat issue.  I suspect that it would work fine as a daily use laptop, but I don’t recommend keeping it on all the time.  Lastly, the power supply I bought was noisy and interfered with the video reception making the anemic svideo even worse.  I decided that the Vaio wasn’t for me.

I did have an old HP laptop and docking station available.  It had a DVI out which I know is compatible with HDMI.  So that was going to be it.  I installed Ubuntu on it, and everything went smoothly.  I got boxee on it, plugged it into my TV, and that is where things got interesting.  Support for two monitors wasn’t great.  Having the TV be so different from the display on the laptop made it worse.  I just couldn’t get the resolution right.  Eventually I played with xrandr and created a shell script that would allow me to tweak and zoom the TV display until it looked good.  I started up boxee, and played a DVD.  It looked good, however, I couldn’t get any flash based videos to work.  I would get the dots across the screen like it was going to work, but it just hung there forever.  After some research I discovered that the issue was that I had too new a version of Ubuntu.

I reinstalled an older version, tried again, and now it didn’t hang, but would return to the launch screen after a few seconds without having played the video at all.  Worse than that, there was no support for Netflix.  That was unacceptable.  In doing my research, I have discovered that support for Netflix on linux does not exist (unless you use the Windows emulator Wine).  That means that even the retail version of Boxee (the Boxee Box) has no support for Netflix.  That is a huge problem.  I hope they get that sorted.

Eventually, I remembered that I had a copy of windows XP that I had bought years ago.  I didn’t have it installed on any computers, so I installed it on the HP laptop and activated it.  Life was good!  Except that it wasn’t.  Windows didn’t recognize any of the hardware at all.  There was a list in the device manager maybe 20 items long of unknown hardware.  Included in that was the sound card.  No audio!  This was not boding well for me.  I went to the HP site and downloaded driver pack after driver pack.  I got most of the things I needed figured out, but no sound yet.  Eventually I found, under the modems heading, a sound modem.  I had no idea what that was, but “sound” anything was promising.  After some research I discovered that the laptop had a modem/sound card chip in it.  Apparently that helps with saving space, who knew?  Once that was installed, everything was recognized and I had audio!  I spent the next several days installing Windows XP patches.  Then I installed boxee.  It worked great.  Next up was configuring the TV as a display.  I spent quite a while configuring the display.  The laptop has Intel video hardware, and the Intel drivers are so horrible that it was worthless to try to get things to work.  The closest I got was the correct resolution of 1280×720, however there was a serious overscan issue.  I couldn’t even see the start bar.

The display was also a bit pixelated.  I knew from playing with Boxee in Linux that there was some overscan correction in Boxee, so I said close enough on the overscan thing.  I started up boxee, went into the display config, went to advanced calibration, and pushed and pulled boxee to correct the overscan.  I was also able to correct the pixelation by setting Boxee to a higher resolution.  It looked great!  Except that it wasn’t.

I had issues with flash based videos skipping.  It was pretty jittery and terrible.  I research and discovered that the I needed to downgrade flash to version 10.0 plus as opposed to 10.1.  I made the change and the video was smooth as a baby’s bottom.  Everything looked great!  Except that it wasn’t.  Hulu won’t work anymore.  It needs 10.1 flash.  Life is not good in the Boxee neighborhood.  I hope that gets sorted out soon because Hulu has a ton of great content.

So step one of the process is complete.  I now have a laptop running boxee all the time.  It works great, and I’m happy with the it in general.  There are still a few gripes with the setup however.

  1. My internet connection is too slow, a lot of the content gets choppy because the connection can’t keep up with the bandwidth requirements of high resolution programming (TED talks, I’m talking to you)
  2. The Netflix app is horrible.  I have a Roku, and Netflix on my Wii.  The interfaces are clean and easy to use.  They are intuitive.  The Netflix app on the Boxee is anything but.  I was watching Lost last night.
    1. They had no episode numbers so I couldn’t tell visually what order they should be played in.
    2. When one episode ended they didn’t have the option to play the next one.
    3. They don’t give you the option of replaying an episode from the beginning (Netflix remembers where you last were, so without this option you have to watch the video from wherever you last left it.)
    4. They didn’t provide episode descriptions so there was no way to tell where you left off based on the storyline
    5. Worst of all, when I brought up the disk, the episodes were all out of order.
    6. Based on all of these things, in order to play them in order I had to reference an episode guide on Wikipedia.
  3. The App organization could be a bit more intuitive/customizable.  It lacks a little clarity
  4. The File category which includes any local and network based files is also a bit loose, and could use some more structure.
  5. A working Flash version would be great.  Something that say, plays Hulu and isn’t jittery.  I don’ t know what the issue is.  It works fine from my browser.

All of the issues that I have with Netflix are features that I have even on my Wii console.  Boxee has been around long enough to take care of this issue.  It doesn’t seem that complicated.  Between this and no Netflix on the Boxee box I think they have a pretty crippled system.  It does, however, work for me.  At least for now.  So now onto my other home entertainment projects.  More details to follow.

Step 1: Hacking Pandora or My First run in with security!

Tuesday, November 2nd, 2010

My first step in the audio project was to see if I could actually figure out a way to control Pandora.  If you’re not aware, Pandora is an incredible music service which allows you to create “stations” based on music that you like.  It will then play other songs that it thinks you might like.  You can thumbs up or down songs and it will refine the songs it plays accordingly.

Anyway, I need to be able to change the stations remotely from a web interface on my phone.  To do that I searched for an API of some sort.  This was hard because the only thing I was able to find was a reference to a 2.0 api but no further details.  I eventually gleaned that this “API” was actually an undocumented set of javascripts accessible from the pandora site.  The javascripts are actually what Pandora uses to control content.

I read through the js files and realized that if I could get some of the javascript functions to execute that I would be in great shape.  Pandora allows you to switch stations from your profile page.  Although the player itself is a flash object which is inaccessible by the average bear (mostly me) the profile page is straight HTML.  It has links that execute js which changes the player on the player page.  My first idea was to create an html frameset.  From one frame I would execute the js in the frame that holds the pandora profile info.  Well, of course that was a waste of time since I quickly figured out that javascript security will not allow a script from one domain to execute a function from a script in another domain.  Good to prevent hackers, bad for me!  Strike one.

I was undeterred.  I use Firefox and am a big fan of the greasemonkey plugin.  The Greasemonkey plugin allows you to manipulate a page as it is loading and before it renders.  You can add or remove elements, and all kinds of other shenanigans.   Before you could wash a greasy monkey I had injected a little js in the page which would execute the pandora function for changing the currently playing station.  A few more lines of code and I was able to add an HTML parameter to the url of the profile page with the pandora station ID, and strip that out with greasemonkey and embed it into the pandora function I had gotten to work previously.  So now a url www.pandora.com/profileurl/?sttn=09990089899 (not a real url) for example, would cause the pandora player to switch to the station associated with the id 09990089899.  It was magical, and life was good.  Now I just have to figure out the rest of the stuff.  Detail, details.

Rube Goldberg was here

Monday, November 1st, 2010

I have started to explore my interest in electronics and have been reading and watching with eager eyes all of the possibilities that exist with modern electronic DIY. It’s pretty incredible. To this end I have come up with two projects that I think will be a lot of fun, and useful to me. The first is a home audio distribution system, the second is a home video distribution system.

Here are the specs for the Audio distribution system:

I have speaker wire that I have run throughout my house, I even have speakers in my kitchen ceiling. I have yet to wire any of this stuff together though. I want to hookup the kitchen speakers, and put in some patio speakers, and connect them to some sort of audio system. It has to be cheap (because I can’t justify the $1000+ expense of an audio system for this purpose) and it has be controllable from a device, such as my iPhone or my wife’s iTouch.

Here is my initial idea:

  • Setup a laptop running pandora
  • Buy/Build an audio amplifier/ controller that can support multiple rooms
  • Build some electronics that can control the amplifier
  • Interface the electronics to the laptop
  • Build a web interface to the computer that will allow me to change stations on pandora, and control the audio and room settings
  • figure out how to control pandora via said web interface
  • figure out how to control the amplifier through the web interface

I’m sure I’m missing something, but I’ll detail my progress as I go. The video distribution is something I will tackle later, but a lot of the same requirements hold through.   Seems fun, and really challenging considering I have never ever even soldered a piece of electronics in my life.  Yay!