[Note] EyeTV EPG Proxy now has it’s own website. Check it out for more details.

_ _

[Update] Elgato now offers Canadian EPG in EyeTV 3.1 (they’re now using TV Guide as their source for both US and Canada). The first year is free for all users, but starting in 2010, we’ll need to pay 20$ US a year to continue receiving the EPG._
I own a Mac-based DVR for quite some time now; a Miglia EvolutionTV. Since I bought it, I switched from the packaged EvolutionTV software to the more mature EyeTV software package (non free).
Recently, EyeTV added a full screen interface which integrates beautifully with Front Row. The actual full screen interface for EyeTV is actually quite the same as the Front Row interface, and one can launch Front Row from a menu item in there.
This made using the EyeTV for more than just recording an actual option.
The only problem I had left with the EyeTV software was the EPG (Electronic Program Guide); there is no EPG support for canadian users!
This was a fact of life I lived with ever since I bought the EvolutionTV hardware, until I gave up waiting for Elgato to release an EPG for Canada.
Taking the matter into my own hands, I created a TitanTV (US-only EPG) account, configured EyeTV to download TitanTV data, and sniffed the HTTP packets exchanged between my computer and TitanTV’s server. Luckily, nothing was encrypted. I was able to intercept the provider lookup from a zip code, the channels lineup lookup using the chosen provider, and finally the EPG data download using the chosen lineup.
I then added an entry to my own web server in my Mac’s /etc/hosts file, and started to create PHP scripts on my server that would answer EyeTV’s requests for EPG data.
Faking the provider list and the channels lineup was easy enough; a simple XML format was used.
For the EPG data, I first had to find valid canadian EPG data. A big thanks to Zap2It for that! :) They provide EPG data using a web service (SOAP), free of charge for personal use.
I then fiddled with PHP’s SOAP capability, and Zap2It web service, until I was able to successfully pull the correct data from their server (compressed, to lower the amount of data transferred between both servers).
To make sure I didn’t try to download EPG data from Zap2It for no reason, I added a one day disk cache (PHP’s un/serialize functions) for this data.
Half the work was done. The only thing left was converting the actual EPG data into TitanTV XML format.
I struggled for some time with timestamps conversion (TitanTV use a base-time value, and schedule’s timestamps are relative to that base-time) and program IDs (EyeTV doesn’t support alpha-numeric IDs - I had to convert Zap2It IDs into pure numbers) but I was finally able to completely simulate TitanTV data from my own server.

The result :

I’m very satisfied with the results. I can now schedule recordings using valid EPG data for my provider, and browse the currently playing shows easily, all from the full screen interface of EyeTV. :)

_[New] _I added support for XMLTV data source, instead of Zap2It. This should allow people from Europe to use it by using the XMLTV grabber that fits their need. For Canadian users, there’s really no need to use XMLTV, since the XMLTV support for North America comes from Zap2It anyway, so it’s better to just use Zap2It Web Service directly.