Archive for the ‘how-to’ Category

Audio Visual Nirvana

Saturday, January 29th, 2011

I admit it – I’m currently obsessed by two things: sound and style.  In sailing, rule #1 is: look good.  It turns out that you have to be able to sail well to obey that rule.  I’ve decided that the same rule should apply to my audio visual life at home.  In my mind, this means four things:

  • Excellent sound and picture quality everywhere.
  • Control of the sound and picture from anywhere.
  • No computers next to AV equipment.
  • No visible wires.  Anywhere.

To truly obey rule #1, I’ve discovered a few things.  Placing devices into iPod docks does not work.  It’s inconvenient, and you have to walk into the room to control the sound.   I want my phone with me, not connected to my home stereo.  Also — connecting speakers directly to a computer sucks.  I don’t want “computer speaker” sound.  I want stereo HiFi.  I want to be able to shake the room while I’m working, but pause the sound in all parts of my house instantly if my phone rings, without taking a step.

Here is the solution I’ve come up with.  To the tech-religious nuts who read this – I’m sure it can be done equally well with some other product suite.  I’m not trying to sell you on my choice of platform, only the end result. Do please use whatever you want to build the same thing if it makes you happy.

Here is my architecture:  if you want details, read below.  With the architecture below, I get fantastic quality stereo from any of the bottom three devices, to any of the top two high-quality zones.  My office stereo is completely physically separate from my desk, nicely tucked away in a bookcase. And I can control either of these zones from my iphone without getting up from wherever I’m sitting.

The Architecture

The Details

My system works through the use of the following bits:

  • Home Sharing:  this is an iTunes feature that lets you broadcast music and video from an iTunes Library.
  • Airplay:  this is a feature of iPod/iPhone apps for music, photos, and movies that let you choose a remote output source.
  • Remote:  this is a free app from the app store (made by Apple) that lets you connect to and control both iTunes Libraries and devices like AppleTV.
  • AppleTV:  this is a device from Apple that streams audio and video from Home Sharing, Airplay, and other internet sources and outputs to HDMI and/or digital audio.
  • Airport Express:  this is a device from Apple that streams audio only from Home Sharing and Airplay sources using digital audio or RCA.

All of the named entities in the above diagram are network entities with unique IP addresses in my home network.  Gemini and Soyuz are computers running iTunes with Home Sharing Enabled.  Soyuz is an old 12″ powerbook that is now acting as a server, both containing my music and video library, and acting as a Time Machine backup server.  Sputnik and Apollo are audio sources that show up when the Airplay icon is selected from any of Atlantis, Soyuz or Gemini.

Setup is pretty well plug & play – you will need the airport utility to configure the Airport Express from your computer, because it has no video interface.  The AppleTV can be configured from your TV.  All of the devices connected to the AV equipment are for all intents and purposes invisible. There are a few notes though:

  • All of the devices must both be on the same network and home sharing must be enabled with the same Apple ID.  Apple sees all, would you expect anything else? Note that while Home Sharing Apple IDs must match, the Library itself can sync to the iTunes store with a different Apple ID, so this architecture does allow everyone to keep their own AppleIDs for apps etc.
  • This solution only works with iTunes.  If I watch a video on YouTube in my office browser, there is no way to get that sound to my office stereo (I can go to my living room and play it on the apple TV though, because the apple TV can directly stream from YouTube).
  • As far as I know, there is no need for any Apple computers to use this setup.  A PC running iTunes can replace either Gemini or Soyuz.
  • You’ll pay as much for the Airport Express as your Apple TV even though it is lesser tech from an A/V perspective, because the Airport Express can also be configured as a wireless router.
  • No  proprietary cables are needed for these solutions, not that this saves you any money, the standard stuff costs a fortune.  The cost of assorted speaker wire for 5.1 audio, HDMI cables, digital audio cables, and an RCA-to-mini-audio-jack collectively surpassed the cost of both the appletv and airport express combined.
  • You stream photos to the AppleTV, both as a screensaver and for slideshows.   I have my screensaver set up to stream photos from my Favorites list in Flickr, meaning every time I add to that list, I’m enriching the photography shown on my wall while music is being played, or while AppleTV is not busy with other things.
  • If I stream video from an iTunes Library, it will be from Soyuz, which is hard-wired to my wifi router.  Currently my plan is to rip my DVD collection to iTunes – at that  point, I won’t even need a DVD player.
  • The weakest link in this whole setup is iTunes itself.  Maybe one day Apple will wake up to the fact that iTunes should be a personal DJ system – allowing you to classify, organize, and moderate your media content with the most sensitive of nuances — as you’re listening, not in advance.  In my opinion, they’ve put a pinto at the center of their media empire, instead of the lotus esprit that they should be capable of.

Life is good :)

MediaWiki OpenID Extension

Monday, February 11th, 2008

After working to install version 0.7.0 of the MediaWiki OpenID extension, it turns out that the whole thing boils down to 7 pretty darn simple steps. Although the OpenID extension README says the extension was “tested with 2.0.0 rc2″ (of the php-openid library), the plugin doesn’t actually work with php-openid-2.0.0.  For some reason, I feel chicken about clarifying this point on the actual extension wiki site – perhaps if somebody externally validates my findings and comments here, I’d feel better about it…

  1. Download/check out the extension and place it in the extensions directory as extensions/OpenID.
  2. Create the user_openid table from the .sql file included in the OpenID directory:
      mysql <dbname> -u <username> -h <hostname> -p < openid_table.sql
  3. Create an includes directory within the extensions subdirectory (this is where I put it – if you want it somewhere else, just make sure that it is a place that won’t be overwritten or deleted during upgrades, and alter the path in step 6 accordingly).
      mkdir extensions/includes
  4. Download version 1.2.3 of the PHP-OpenID library and place it in extensions/includes.
  5. Run the detect.php script inside of extensions/includes/php-openid-1.2.3/examples and do your best to deal with what it says. If you are missing things like MySQL and PEAR, you’ll just have to figure that out yourself, sorry. If, however, the results of the detect.php script tell you that you have no big integer math support as shown below, you should uncomment the define command in the code you paste into LocalSettings.php in step 6:
  6. Your PHP installation does not include big integer math support. This
    support is required if you wish to run a secure OpenID server without using
    SSL..

  7. Add the following lines to LocalSettings.php (remember to uncomment the NO_MATH_SUPPORT line if you received the error shown in step 5):
  8. #
    # -- OpenID Extension
    #
    $path = "$IP/extensions/includes/php-openid-1.2.3";
    set_include_path(get_include_path() . PATH_SEPARATOR . $path);
    # -- uncomment the following line if you have no big integer math support!
    #define("Auth_OpenID_NO_MATH_SUPPORT", true);
    require_once("$IP/extensions/OpenID/OpenID.php");

  9. Attempt to log into your site with an OpenID – hopefully it works!
  10. Update:  if you have issues, a reader emailed in to say that he had to add a trailing slash (“/”) to the path statement in step 6 before anything would work.  It would look like this:  $path = “$IP/extensions/includes/php-openid-1.2.3/”;  It couldn’t hurt to give that a try… (thanks Christian)