Archive for the ‘Tech’ Category

About 2 years ago I wrote a program called Tivo to Media center because we have a Tivo in the family room and an Xbox in the bedroom.  The bedroom TV isn’t hooked up to cable, but we can watch dvds, streaming shows from the xbox, or television recorded by our Tivo (using Tivo to Media center).  It’s a generally painful process to copy the shows since it takes several hours, but with the program I can just let it do the copying overnight and then they are always available.  This has worked out well, though it’s honestly pretty rare that we end up watching the copied shows anyway.  Still, it’s nice to have the option.  The other choice, of course, would be to simply buy another Tivo since they support multi-room viewing.

Anyway, I was generally happy with the way it was working.  The other day I watched a show and decided I wanted to add it to the list of shows that were copied to our media center.  It had been a while since I’d let the program run, so I spun it up just to make sure it was working.  Of course, it wasn’t.  After a little investigation it turns out that the Tivo web server was returning 403 (Forbidden) for the downloading of those shows.  After looking into it further, it seems that the cable companies have started to annotate content with a bit that specifies whether the content can be copied or not.  Further, the FCC has required device manufacturers to obey this flag.  I looked through the 300+ shows recorded on our Tivo and almost all of them are now set to ‘copy once’.  This means that they can be recorded, but cannot be copied to another Tivo or computer.  Unfortunately this completely defeats the purpose of my app, and I can’t imagine Tivo is terribly happy about it either since it cripples their TivoToGo and multi-room viewing functionality.  In short, it’s lame.

Oddly this bit is being set by the cable companies, apparently in completely inconsistent ways.  I’m certain that some networks ask for their content to be ‘copy once’ only.  However, it seems that Comcast and Verizon, e.g., set the bit differently on the same shows.  That’s frustrating to say the least.  What’s more frustrating is that 15 years ago we could have just recorded the show on VHS and watched it on any device in the house. 

I can’t imagine that the cable companies believe this is a long term solution.  At least, I hope they don’t think that.  I am fairly tired of paying for cable service, a cable card, and Tivo fees all separately anyway.  It’s just silly, expensive, and apparently going backwards.  I continue to hope that XBox will make more deals with TV providers so that at some point we can dump the cable card and Tivo entirely.  Sadly the most recent deal with FIOS only works for Verizon customers and not Frontier. 

I wish the sun would shine on a weekend, even just for an hour, so I could take some pictures of my car and write a blog post about it.  Alas I haven’t seen the sun in what seems like weeks and for the brief periods when it’s not raining it’s always cloudy.  I generally don’t mind, but I’m a bit worried there will be flooding here.  It turns out the wetland next to our house really does get wet and last week we had to deal with a ‘high water’ alarm installed on the side of our house. 

Oh well, in the absence of some decent pictures I’ll write about what I spent most of the weekend on.  I mentioned in my last post that we put our newer TV into the master bedroom.  The master bedroom doesn’t have cable, so we have an XBox hooked up that lets us watch DVDs, play games, and stream Netflix.  It has been bugging me that we can’t watch recorded TV on it though (particularly shows like House and Fringe that we watch once a week in HD that would look amazing on this TV).  I researched it a bit a few weekends ago and it turns out that the Tivo exposes a REST API for querying the Now Playing list and for downloading the videos to your PC.  The Tivo folks have written some primitive software that lets you do exactly that, but it’s clunky and it doesn’t let you save the files into any other format than .Tivo.  In fact, because of some poor choices that they made the Tivo software doesn’t even let you save to network drives; so I couldn’t use it to save onto the media shares of my Windows Home Server.   I spent another few hours looking around for some automated solution that would let me simply get the files off of the Tivo and into a format Windows Media Center could stream to an XBox.  Sadly I couldn’t find anything that worked the way I wanted it to (the Tivo folks suckered me into paying $25 for the ‘Pro’ version of their software because it is supposed to transcode the video into formats like H.264; it does, but only at a small resolution for mobile devices).  I ultimately decided I was going to just replace the Tivo with a media center with cable card support, until I found out how expensive they were at the moment.

To make a long story short I decided to write something custom that would work the way Rach and I wanted.  I had a couple of goals for it.  First, it needed to be completely automated so that I could run it using the Windows Scheduler at night when we weren’t using the computers.  Second, I wanted it to have a snazzy UI (for no other reason than I wanted to play around with WPF more).  Third, it needed to be smart about what files it copied over so that it would only keep a certain number of any particular series.  Finally I wanted to get it up and running as quickly as possible, so I didn’t want to make it too complicated.  I was originally thinking of using a WPF grid to list the set of shows to be downloaded; but honestly  I couldn’t find a single Grid example which was anything other than hideous (that didn’t include an $800 component anyway).  I gave up on the Grid and decided to go with a very clean basic UI.  I’m pretty happy with the result.  This is a screenshot of the app downloading an episode of House:

TivoToMediaCenter

The app works in the following way.  First, it starts by querying the Now Playing list of the Tivo through the rest API.  The Tivo’s web server is pretty basic, but you can see a simple Web UI by navigating to the following link: https://{0}/nowplaying/index.html where {0} is the ip address of your Tivo.  If you’re using IE it will recommend not browsing to the site because it can’t verify the SSL certificate, you can safely ignore that error.  You’ll also be prompted for a username and password.  In this case the username is always tivo, and the password is your “Media Access Key”.  You can find your Media Access Key on tivo.com under your profile or usually somewhere written on the tivo box or documentation.  You should now see a simple UI of your Now Playing list and download links.  With just that you can choose to individually download the files to your PC, though they will always be .Tivo files which are only playable if you have the correct codec installed.  There is a slightly different URL you use if you want the XML that represents the Now Playing list; it looks like this: https://{0}/TiVoConnect?Command=QueryContainer&Container=%2FNowPlaying&Recurse=Yes.  The XML is fairly detailed, giving you a list of all recordings on the box along with a ton of information about each.  My app currently only uses the Title, EpisodeTitle, Description, SourceSize, EpisodeNumber and DownloadLink.  Regardless, the app downloads the XML for processing.

The app uses an XML configuration file as input.  The configuration file tells the app which series it should download episodes from.  It basically consists of the series name, the total number of episodes to keep on the windows home server at one time, and the algorithm to use to determine which episodes to keep.  At the moment there are two algorithms to select from, either keep the most recently recorded or choose to keep the episodes with the highest episode numbers.  Rach and I generally watch two types of programs; syndicated things like the George Lopez Show or Wings for which we just want to see the most recently recorded (we watch them out of order) and the shows that we watch each week.  For those the Tivo may choose to record an older one during the middle of the week and I don’t want that overwriting the WHS version, hence the second algorithm.  The app reads this configuration file and builds a list of possible episodes to copy over.  It then filters this list based on a cache that it built from its previous run which contains the episodes it has already transferred.  The remaining episodes are the ones that will be processed.  This occasionally requires deleting episodes off of the WHS since there may be N new episodes which delete K old episodes.  The app takes care of that and then starts the processing.

The processing is straight forward.  There is a download link in the XML that can be used to retrieve the .Tivo file.  As usual there was a small complication.  For whatever reason WebClient doesn’t understand the format of the cookie that the Tivo web server returns on a request for this file.  Because of that the WebClient doesn’t include the session id as part of the header when it tries to actually get the bits of the file, which ultimately leads to a ‘bad request’ response from the Tivo.  To fix this I had to do a ‘fake’ request first, get the session id, and then set the cookie container manually.  To add another layer of complexity WebClient doesn’t support setting a cookiecontainer for some reason, so I had create a specialized version that would.  Honestly all that was cake compared to dealing with all of the asynchronous baloney that you need to do to keep a responsive UI.  I ended up using BackgroundWorker pretty extensively with what so far seems to be pretty good results.  I added support for cancelling the background work on exit, and surprisingly that has been working well.  Anyway, the app uses the modified WebClient to download the .Tivo file into a media cache that it keeps on the Media Center PC.  It then shells out to a program called tivodecode which converts the .Tivo file into an .mpg.  The app just directly converts it from the cache to the WHS, and then deletes the cache file.  After it’s all done the app writes out the episodes it has burned into the cache for its next run.

There are several things I need to finish and add, but sadly it’s getting late and I should probably get some sleep.  I want to add: 1) auto-shutdown after it completes after a 10 min wait, 2) finish implementing the algorithms mentioned above, 3) show summary information on completion, 4) log the major info and errors to a file, 5) remove the console window that appears when the app shells out to tivodecode, and 6) set it up to prevent the computer sleeping while it’s copying and make it so the WHS sends a Wake on Lan to the Media Center PC right before the app is scheduled to run.

Here’s a video of the UI: 

 

I’ve been meaning to write about our home network for a while now.  It’s funny, because as with most things getting it 90% set up was 10% of the work.  I’ve still got a ton of changes to make, but things are starting to come together.  I think I’ll keep this post mostly at a high level and then write more later about the specifics of how we set certain things up (like WHS and our multiple routers).  Our network generally looks like this:

Network

We have FIOS for internet and TV which is piped in through coaxial cable into our master bedroom.  We have hard-wired connections between the closet and the living room and the office upstairs.  Unfortunately we don’t have it hard wired into the master proper, though that’s something I’m going to do in the next few weeks.  For the moment we have two routers, one which acts as the DNS server and has a coaxial WAN input and the other which proffers the N access point.

In the master bedroom we have our new TV which I’m pretty sure I’ve mentioned before.  If not, it’s one of the Samsung LCD LED TVs; it has an amazing picture.  We have an Xbox Elite hooked up to it for gaming, watching DVDs, and streaming content.  In the master closet we have our Windows Home Server which stores all of our media (videos, pictures, movies, etc.).  In the office we have my desktop which currently acts as our Media Center.  We don’t record TV with it at the moment, but it’s what we use to stream movies to our Xboxes.  The printer is also in the office.  Both the computer and the printer are connected to a switch which then connects to the router through the wall wiring.  We also keep the wireless picture frame that I have in the office, though with the changes I made yesterday it will stop working soon.  Finally we have a switch  in the living room with an Xbox and Tivo connected to it.

This configuration enables the following:

Automated backups: The Windows Home Server will back up every configured machine on the network on a daily basis.

Streaming media: From either the living room or master we can stream any of our videos or music by using the Xboxes as extenders (which connects them to the Office computer which then reads the content off of the Windows Home Server).  Our Zunes can auto-sync with the media center PC upstairs so they are always up to date with whatever music we may have downloaded recently. 

This also enables streaming of DVD content, so I have started to take our DVDs and burn them to a folder on our Windows Home Server so that we can easily browse and watch them from either the master, living room, or wherever we happen to have a computer lying around.

Shared devices

Any of the computers on the network have easy access to the printer upstairs.  They also can access each other for shared files.

Remote access

A Windows Home Server gives you the option to set up your network to be publicly accessible (even without a static IP).  If you do that then you’re able to remote desktop into any machine that is active in your house.  I use this every once in a while when I need something I left at home for work.  It’s extremely useful, particularly when paired with addins that let you remotely wake up computers that are on your network.

The interesting posts will come later I think.  I want to write about the best way I’ve found so far of encoding ripped DVDs for playback on XBox, how I’m copying and encoding TV shows off of the Tivo for streaming to the 360, and the best ways I’ve found to use your own router when you have FIOS delivered with coaxial cable.  On the other hand, I’ll probably write about our new car first :-)

Family updates:

1) We got the recording numbers today for our old house.  We’ve officially sold it! Sadly we don’t get the check until Tuesday because Monday is a holiday.

2) I’m busy reading Personal Finance for Dummies on the Kindle app for the PC (on my Acer Aspire tablet) in order to figure out the best way to invest some of what we make off the old house.  If anyone has suggestions please let me know (on either good places to invest or good books about investing to go read).

3) We have most of the furniture we ordered but the dining room table isn’t going to get here until sometime in Feb :(.  As soon as it does we’ll post some updated tours.

4) We have the ground cleared, leveled, and set up for the shed that we want to get.  We’ll be working more on that in the next week or so (finalizing it with the city and actually getting something ordered).  We’re looking at using the Tuff Shed folks from Home Depot.  Here’s what the area looks like (cans represent 6’x10’ which is the size of the shed we want):

FullView

The retaining wall isn’t quite finished in that picture, but it will be soon

5) Our mole problem is slowly getting fixed.  One down, no more than 100 more or so to go.

6) We’re pretty sure we’ve got everything we need for our Bahamas trip next month.  Swimsuits, shorts, sandals, and our wedding outfits.  

More soon…

A few weeks ago Eric and Jane organized a Christmas get together.  It was a ton of fun; we went out for Chinese food and then eventually saw Avatar.  We also had the opportunity to meet and hang out with some friends of Mike and Sharon, and even had a chance to tour their beautiful new house (which, coincidently was basically right next door to our old house).  For Rach and I there were two things that stood out about the tour.  First, they had a Maine Coon Cat.  I’d never seen that particular breed before, but he was a giant pure-bred named Merlin and he was just super cool looking and had a great temperament.  Second, they had replaced their entry deadbolt with an automatic lock that immediately set off my ‘geek-envy’.

It took a bit of time but I was able to find the same brand on Amazon for a ‘decent’ price.  The deadbolt is made by Sunnect and is called the AP501 Advanced Protection Digital Door.  There were several reasons we were interested in getting the lock outside of its coolness factor.  The deadbolt that we had on the front door has had issues since we bought the house.  Its major problem was that the door had to be placed somewhat exactly in order for the throwbolt to slide into place.  On further inspection I found that the deadbolt had a 1 inch throwbolt, but the strikeplate hole was only about a 1/2” deep.  This was annoying as well because it meant that the deadbolt never felt like it really ‘locked’ into place.  Finally the deadbolt unlocked by turning right, but the doorknob unlocks by turning the key left.  I would get that wrong at least once a day.

In addition to fixing the issues above the Sunnect deadbolt has a keypad on the outside, so we can never be accidently locked out.  The second thing Rach and I love about the new deadbolt is that it auto-locks about 3 seconds after the door is closed.  We’re pretty paranoid so we always manually lock the door ourselves and this saves us the effort.  The ‘keys’ are proximity based, you just hold them up to the sensor for a second or so.  They are also programmable, so if we accidently lose one we can just deactivate it on the lock after which it will no longer be able to unlock the door.  Finally, and perhaps most important, it plays happy little musical chimes when the door is locked or unlocked.

I planned to install it myself last weekend.  I think for 95% of houses that have standard doors the installation would be pretty easy.  Unfortunately after I had taken off the existing deadbolt on our front door I realized that it had no recessed area for the plate around the throwbolt, the throwbolt hole wasn’t deep enough, and the new strike plate assembly wouldn’t fit because for some reason the other door (double doors in the entry) is basically ‘hollowed out’ about a 1/2 inch up and down the door.  I think its that way to support the slidable inserts that allow that door to be selectively opened, but what it also meant was that when the old throwbolt was fully extended it actually was encased in only a very tiny bit of wood.  Anyway, and it pains me to admit this, I eventually had to get help to prep the doors so that the deadbolt could be installed.  I did help put the rest of it on after the door was prepped, but I think I need to increase my tool chest to include a chisel for future projects. 

You can see the end result below.  I took a couple of videos showing opening from the inside, auto-lock and how the keypad works.  I don’t show the actual key entry, but if you’re interested I’m pretty sure the Sunnect site has a lot of videos (including shooting the deadbolt with a bullet -  a common problem around here).

I’m happy to say that we’re one step closer to a robot army and sentient house.  In the future the vacuum will probably conspire with the deadbolt to keep us out so that the house will stay clean.  Machines and their cold logic.  Who can blame them though? It would probably work.

Phones and home security don’t seem like they should be related.  At least, I didn’t think about them being related right up until Rach and I decided to get an alarm system. 

When we moved to our new house we decided that we no longer needed a landline.  We use our cells for 90% of our calls, and the 10% of the time someone called our landline it was because they were trying to sell us something.  The landline was purportedly costing us $18/mo, but that was the pre-tax and fees price.  In reality it was closer to $30/mo.  In the old house it made some sense to keep it since our cell phone reception was spotty in certain areas of the house (</3 AT&T).  Regardless we dumped it when we moved to our new place and have been happily saving our $360/yr.

That was just peachy, right up until we started to seriously consider getting a home security system.  There are a ton of different options when buying a security system but one of the biggest distinctions is whether the system is monitored by a company like ADT or not.  If you do get a monitored system, then you end up paying $30-$40/mo.  I initially had trouble coming to terms with a security system; after all, if everything goes well you pay a ton of money and have nothing to show for it.  Our insurance offers a minimal discount for an installed system, but nowhere near what the monthly costs would be (the total discount amounts to $3/yr).  It’s really the same as insurance; ultimately you’re paying for peace of mind.  In the past several years we’ve had 2 car radios stolen, a couple boxes of checks stolen, our mail stolen, and our credit card number stolen.  We haven’t had the misfortune of anyone breaking into our house, but we have friends who have had to go through that nightmare and it’s no fun at all.  Ultimately I came to terms with the large monthly cost, particularly when I thought of it as basically trading the monthly cost of a local line for the monthly cost of a monitored security system.  That’s when we ran into a bit of a snag…

It turns out that virtually every monitored alarm system on the market today requires a landline.  I would have thought that by now an internet connection would be sufficient, but the models that support that are few and far between, expensive, and not available through the company we had install the system.  So I went back to price out the cheapest possible landline that we could get; hoping that we could find a bundle deal that would let us get it for less than $10/mo.  There is nothing like that in the area unfortunately; the least that we could get was around $25/mo. after taxes and fees.  I was reconsidering the whole thing up until Varun happened to mention the possibility of getting a cell enabled alarm system.  Instead of a landline the system has a small cell phone that it can use the call the monitoring company.  I dug around a bit and found out that it was only $8/mo. more to get the cell option with the model alarm system that we were looking at.  That was good enough for us, but it’s pretty comical that we have a cell phone that can only call a single number.  It turns out a cell system is slightly more secure; any burglar trying to rob the place can’t just cut a landline now, they would have to somehow get into the house and disable the cell communication. 

The long and short is that I’m pretty happy with our current solution (thanks Varun!).  It’s probably worth mentioning that we have run into another snag that I didn’t expect as a result of dumping the landline.  Our new house is big.  When I come home from work, I’ll often dock my cell to recharge it.  If I happen to be upstairs when the cell rings I will often miss the call (that’s after bounding down the stairs, stepping on the cat, and tripping over furniture).  In our old house we could just put phones anywhere there was a jack, so we were set.  I’ve been looking around and it turns out there is a workaround for this in the form of bluetooth enabled phones and handsets.  Basically you get a base station that will connect to your cell with bluetooth.  The base station then connects to any number of handsets which you can place around your house.  After it’s set up you can put your cell in its charger (indeed, locating the charger in the area of your house where your phone gets the best reception) and then use any of the handsets to place calls through your cell.  In fact, you can hook up multiple cells to the same headsets (with different rings) and selectively choose which one to use to call out.  Rach and I are currently considering the VTech Dect 6.0 set.

Okay, okay, so there is one more issue that we’re having since dropping the landline :)  Our landline was pretty much our dedicated spam line.  We never gave out our cell numbers when we were buying goods, registering accounts, etc.; we would hand out our landline instead.  Without a landline we end up giving our cell numbers out, and now my cell has started to get calls from marketing slime.  By the way, one of my all time least favorite things is when an automated machine calls my cell and then asks me to hold for the next available representative.  Seriously?  I can’t think of a single person I know who would hold.  Anyway, Varun (again) introduced me to a solution just the other day.  It turns out that Google offers a service called Google voice.  Google voice is intended to be a one stop shop for managing all of the various numbers that you have (cells, landlines, work numbers, etc.).  Basically you sign up and then choose a new phone number from a list of available numbers across the country.  You can then set it up so that single number will make any of your phones ring when you get incoming calls.  It’s possible to selectively choose which phones ring based on the caller (family rings them all, friends only ring cell, boss goes to work phone, etc.).  You can also block calls.  I’m not a huge fan of their implementation.  The way it works for the caller is that they dial the number and after a ring or two they’ll get asked to say their name by an automated system (identifying itself as Google Voice).  That’s not something that I would want to put family or friends through, it’s just annoying.  However, on the other side my mobile rings and says [Name] is calling, press 1 to accept the call or 2 to send it to voice mail.  I figure this new number is perfect to give out to companies that require a phone number but who you never want to call you (like say, best buy, or the grocery store).  That way if the number ‘accidently’ gets sold to a marketing company you can easily screen your calls.  Better yet, when their automated system calls me, my automated system picks up.  Our two automated systems can have a nice chat and I don’t have to deal with it.

I’m a bit of a list person (just ask Rach).  I really like to put together a todo list for a week and add and remove stuff as I get it done.  It helps keep me focused and makes me feel like I’m making progress.  At work I use Outlook tasks, which work really well because I’m constantly taking email and turning it into a task.  I also regularly have things that need to be done by a certain date, so the ability to set a due date is crucial.  Outlook tasks also let you set up a recurrence, so for things that you need to do every few months (e.g. have your furnace serviced, or clean your gutters) it’s easy to get reminders.  However, I tried using Outlook for more personal tasks that I do on a daily basis and it really doesn’t work for me.  It’s too difficult to create tasks unassociated with email;  there are simply too many options.  The real kicker though is that there is no iPhone access to Outlook tasks. 

I have been using a pad of a paper for a while now.  I just write down stuff I want to get done for the next day and copy over items from the day before.  This works really well for me, but it bugs me that I have to constantly copy items over; sadly I rarely finish the stuff I set out to do so having a lot to copy over is a pretty regular occurrence.  I thought about writing my own todo app, but  I figured there must be someone out there that got it right.  I started by looking at Windows Live Calendar which has TODO items.  This mirrors some of the functionality found in Outlook, though with a significantly simpler UI and web based access.  Sadly the Windows Live folks haven’t gotten around to adding an API for it yet.  I might look again when they do, but until that point I can’t write an iPhone app for it.  I browsed around a bit and stumbled across Zenbe lists. 

Zenbe lists is exactly what I wanted.  You register on their site and you can start creating named lists.  Lists are collection of single item tasks.  They are trivial to create, reorder, edit, etc.  Zenbe also has an iPhone app for $3.00.  The simplicity of their apps and site was a real selling point.  A really great feature of these lists is that they are sharable.  Rach and I set up a grocery list that she shares with me.  I can edit the list and add whatever I’d like, and the next time she’s at the store she can just glance at her phone and see the items.  If I happen to get there first, I’ll check them off and they’d be removed from her list as well. 

I think Zenbe is going to work out really well.  I’ve only got a few complaints at the moment.  First, the iPhone app requires an explicit sync after it’s been opened.  So you need to remember to hit it after checking off a few items or the website won’t know about your changes.  Kind of a frustrating  model; though it does mean that changes on the phone itself are super fast.  Second, I haven’t yet figured out how to move items from one list to another on the phone.  It’s trivial on the site, but I’ve only been able to figure out how to move items within a list on the phone.  Both of these seem like pretty reasonable restrictions at the moment – we’ll see how they play out long term.

image  

Write boring blog post about lists – Done!