View Full Version : TV Listings with XMLTV

April 25th, 2003, 02:24 PM
I'm writing a Pocket PC app that pulls listings from an xmltv file and displays them. Ideally, I'd like to incorporate this into NetRemote so that you could schedule viewings/recordings. I'm planning on doing this in the .NET Compact Framework. Is there any way that I can plug this into NetRemote? Are there any special considerations I should take when developing?


Mr T
April 25th, 2003, 10:52 PM
That sounds Very Cool.
Will it work with current pvr apps, ie. MyHD?

April 25th, 2003, 11:47 PM

There's a format (tvvi, tvpi) which many capture software understand (this includes the myHD software, and many others which can be programmed with titantv.com)... It would be great if you could be compatible with this (I just spent quite a bit of time looking at XMLTV and how to program my HDTV card with www.myHTPC.com... and this would be a time saver).

April 26th, 2003, 12:57 PM
There's a format (tvvi, tvpi) which many capture software understand (this includes the myHD software, and many others which can be programmed with titantv.com)... It would be great if you could be compatible with this (I just spent quite a bit of time looking at XMLTV and how to program my HDTV card with www.myHTPC.com... and this would be a time saver).

My thoughts exactly. I'm even using myHTPC as a front-end as well. That's where I first read about XMLTV and saw their EPG. Figure'd it wouldn't be too hard to reproduce on the Pocket PC.

On that note, I'm still unsure about how to plug this into NetRemote. These developer forums are a little dry, and since I'm planning on using the .NET Compact Framework I'm not sure if it will be compatible with NetRemote. Any developers able to point me in the right direction on doing this sort of thing?


Ben S
April 27th, 2003, 10:43 AM
Hi Garth,

I'm unsure how a driver written in .NET would play with NetRemote. Does the .NET framework include C++, or is it VB and C# only?

If it includes C++, I don't see a problem. If it doesn't, I don't have much experience with interfacing a C# .dll with a C++ main app. I'm happy to give you the C++ driver "sdk" and let you play. It would be -very- cool if it could work easily.

The SDK will be available in a few days. I've finalized the driver model for the 1.0 release, and just need to create a "sample driver" and pack it up.

Unfortunately I don't think there a lot of developers around here, yet. I'd like to change that, so hopefully once the SDK is out we can start "hyping" it.

Thanks Garth.

April 27th, 2003, 01:46 PM
I'm unsure how a driver written in .NET would play with NetRemote. Does the .NET framework include C++, or is it VB and C# only?

It is possible to include C++, or "unmanaged" code in a .NET application. I'm not much of a C++ developer myself, but if you have a good sample or two (and are willing to answer a question or two) I should be able to figure it out.

The SDK will be available in a few days. I've finalized the driver model for the 1.0 release, and just need to create a "sample driver" and pack it up.

Eagerly awaiting it :D

Ben S
June 3rd, 2003, 06:37 PM
Hi Garth,
I just want to double check you're still around, as the SDK is not available yet, but will be shortly, and am quite excited to get XML TV integration.


June 26th, 2003, 07:43 PM
I'm still around, though I seem to have run into some difficulty with my app. It seems that the .NET Compact Framework is EXTREMELY slow at reading XML. A 200 K file takes about 20 seconds... and one day's listing from XMLTV for my digital cable is a few megs. Doesn't look like it's gonna happen.

That said, I've been looking into alternatives, and I wouldn't mind some feedback as to which might be best.


1) Convert the XMLTV file to a SQLCE database on the PC then synchronize it over to the Pocket PC. I haven't experimented with this much, but I expect the response time to be considerably faster than XML. The downside is that there are more steps involved, and that a conversion must be run on the PC frequently.

2) Create an ASP.NET application that plugs into NetRemote on the PPC side of things. This would be fairly straightforward and wouldn't require much work on the part of NetRemote integration as it would basically be a webpage that you were viewing through NetRemote. Kinda boring.

3) (My personal favorite) Create an ASP.NET web service and accompanying NetRemote plugin. This way you could store offline listings on the PPC (a couple hours worth or maybe some favorite channels), and you could get access to the full listings on the PC. An accompanying webpage could be created relatively easily (as per option #2). The end result would be somewhat of a hybrid between #1 and #2, with a fat client sitting on the PPC and a web service from which it retrieves its data.

The downside to both #2 and #3 is that you must be running IIS and the .NET Framework on your PC as well. This is not a problem for me, but I'm a developer and I'm not sure how the rest of the world behaves :wink:

At any rate, feedback is most appreciated. Sorry I haven't been here for so long... I've been checking the front page for any new announcements but haven't stuck my head into the forums for a few weeks.

Ben S
June 27th, 2003, 10:11 PM
I don't think it's the .NET CF Framework, I think it's the whole PPC that's slow at reading XML. I need to stick with non-xml based protocols for MediaCenter as I just didn't see the horsepower to parse the XML.

Have you looked into Girder and luascript, much? Gavin uses Lua to parse to collection.xml file exported by DVD Profiler, and sends the data as requested to NetRemote's GirderDriver.

It might be possible to do something similar with XML TV. This could alleviate the need to run IIS on the desktop machine.

What do you think?

June 28th, 2003, 05:36 AM
.. or just get LUA to parse the XML and filter out unneeded fields (free LUA XML parser at teh end of LDJ :lol:). IIS could be a lot of overhead (and configuration troubles for new users) for what is basicly a simple task.


June 29th, 2003, 03:57 AM
Those are great suggestions, but my #1 priority here is to get some experience with the .NET framework. I just thought this would be a good project to learn with. If I go the LUA route, I'm shifting priorities which isn't something I can afford to do right now.

If anyone can think of a way to implement this using the .NET Framework, I'm all ears. Otherwise I'm going to have to put it on hold for awhile and find something else. Anyone? Anyone? Bueller? :D

Ben S
July 2nd, 2003, 08:11 AM
I think it would be a lot of work, but you could make a .NET app that is listening on a socket, and a .NET driver for NetRemote that talks to it.

I would try to stay away from having to run IIS on the HTPC. That's just my opinion, of course.

July 10th, 2003, 11:27 PM
How will the SDK work? Will I have to talk directly to NetRemote on a specific port or will it go through Girder? Do you have anything at all that you could provide with respect to the SDK just so I have some idea of what it's going to look like? This would help make my decision a lot easier.

January 13th, 2004, 01:15 PM
Is this dev effort dead? I'd love to see XMLTV ported to the NR platform (yes, I'm calling it a platform now :P )
I use XMLTV with Homeseer but since they are only using tables the graphics stink.

January 13th, 2004, 01:49 PM
I don't know if that develeopment is dead, but look at http://briancollins.dns2go.com/avid/ScreenShots/Home.htm and press the button "Timers" and then click on the list.

This is for DigiTV, but I plan to open-source it, so it should not be too difficult to use with other TV software. The data is obtained via XMLTV.


January 15th, 2004, 10:53 PM
This would be fantastic... I'd love to see a goo programmer like Ben or Dave build a plug-in using XMLTV. A nice graphical interface for scheduling recordings and changing channels would be fantastic!

January 16th, 2004, 04:33 AM

But what would you want such a plug-in to do??

My plug-in does three things - two of which are specific to the TV software I use - DigiTV.

1) It displays the listings for a given channel on a given date.
2) It allows me to click on a listing and cause that to be scheduled for recording.
3) It allows me to view/edit/delete previously scheduled timers.

Only the first of these is independent of the DigiTV software. The others access and manipulate the DigiTV schedule.

To implement it, I have three components:

1) XMLTV on the HTPC to periodically collect the listings and store them as XML files (to the XMLTV schema).
2) A server process on the HTPC, that accesses these files and talks to the DigiTV software to set/edit timers.
3) A plug-in for NR that communicates (via a socket) with the server process to fetch, display and act on the listing and timer information.

I am having trouble seeing how the XMLTV part of it could be decoupled from my use of DigiTV.


January 17th, 2004, 12:25 AM
It would be nice if someone could modify your code to send/receive commands from a Tivo hack called TivoWeb. TivoWeb allows a user to control the Tivo via a browser or send HTTP commands directly to change channels, view recorded shows, schedule recordings, view the channel grid, etc.

A great programmer in the Homeseer community has built an XMLTV interface for Homeseer (see attached pic). It is not pretty so I'd like to be able to display it in NR using custom graphics to match the CCFs style.

This type of plug-in should be a hit I'd think.

January 17th, 2004, 03:24 AM

I guess it shouldn't be difficult to modify the middle "server" bit of my code to talk to TivoWeb instead of DigiTV. My guess is that someone with decent C++ experience and a TivoWeb to play with (that rules me out) could do it in easily in a weekend.

The XMLTV gathering bit and the Pocket PC NR driver bit need not be changed.

BUT - I only have a Pocket PC implementation of the driver. Because of the complexity of the info I want to display and edit, and because it started life as a stand-alone application outside of NR, I have chosen to do it as a Windows dialog box, and that would not port very easily to a bigger screen. It can be done - but personally I don't have much motivation for doing it!


So it might turn out to be a bigger task that you might have hoped. Any volunteers?

Anyway, as I said before, I will post the source (of this and my related WMP9 system) once Ben has a stable release of NR.


Ben S
January 19th, 2004, 08:44 AM
The problem with stuff like this is the more complicated the data you want to show, the less abstract you can make it (from an interface perspective), so the harder it is to skin it.

I could see making a flexible "list report" control where you can add columns and rows, and allowing you to scroll through it, but it would probably not even be as attractive as the homeseer webpage, because you wouldn't be able to easily control the look.

mhwlng's web page stuff may come the closest, because at least you could change the background graphic to match your ccf.

Stuff like this is stuff I'd like to tackle in a nice looking abstract way once 1.0 is out the door.

January 19th, 2004, 07:21 PM
apps like myHTPC does put a "pretty face" on XMLTV very successfully. Here's a screen shot... http://myhtpc.net/images/screens/large/epg1.jpg

I'd love to see netremote become the "center" of my entire home automation environment[/url]

Ben S
January 22nd, 2004, 01:27 PM
Agreed. That looks fantastic, but is it skinnable? I'd like to make it a bit more abstract to be able to host other information, as well as allow for skinning.

I think Marcel's work is a good stop-gap for now. Hopefully we can make it more configurable (skinnable) using NetRemote, but for now Marcel's stuff looks awesome.

April 11th, 2004, 09:40 PM
Any work on Marcel's work in this area?

April 12th, 2004, 03:48 AM
My solution is quite simple and probably not suitable for your requirements...

I simply read the current and next program from http://www.tvgids.nl (DUTCH ONLY :!: )

and then turn this info into a table which I then present in the embedded web browser. you can click on a channel and the tv will change channel... that's it :D

The only change that I have planned is to use a GACSCheme style presentation instead of the web browser (like Gavin Brock's LUA DVD Jukebox or my artist list)


April 12th, 2004, 07:24 PM
Homeseer has a plug-in that is based on XMLTV and runs in the web browser - any thoughts on how to convert it to GAC?

I do not know much about GAC... is this a Girder specific thing (I don't use Girder, and would like not to) where is the wealth of info on it?


April 13th, 2004, 03:39 AM
If you already have a web based system, why not simply use the embedded browser already built into NR ?

Converting an external web page to a GAC *style* presentation (you don't actually use the GAC function, that is for JRMC only) would require considerable amounts of LUA/LUACOM code in girder to analyse a web page and put information from the web page in NR variables...

and also, when using a web browser there are no limitations in the layout.

Using NR variables instead, you are limited in the layout and the way you scroll to the next page of information..

All ben's example ccf files show how to use GACSchemes.

Another example of what is required for your tv conversion is Gavin Brock's LUA DVD Jukebox...


April 13th, 2004, 10:28 AM
I do that now but the "look" is not that nice... and certiainly does not match my nice graphics for my CCF:


Browser based interfaces have flexibility, sure, but they are a pain to edit and always need a refresh of some sort. I use iframes extensively and it still is not 'instant' feedback like NR gives (or most any Windows or Java GUI interface).

Follow the URL below and you will see my current interface... you can see the imbeded browser (the white areas)... they are 'ok' but again, limited by the browser functionality/visuals. To load a ton of images (as my CCF does) a browser screen build/refresh (even with iframes) would stink!


April 13th, 2004, 11:07 AM
you can see the imbeded browser (the white areas)... they are 'ok' but again, limited by the browser functionality/visual

The background doesn't have to be white and you don't have to have a scroll bar either (see pictures)

You don't have to have the screen flicker/redraw when you update information on the web page at regular time intervals.
Use a HIDDEN iframe that loads the data. this hidden iframe will reload every x seconds,. this triggers a javascript function that fills certain table cells/ div's on the visible page. This is instant. No flickering at all. But to make this work, you have to know javascript/DOM very well...

You can have 'dynamic' data in NR as well. but it is limited to a 'grid' layout. You basically define a bunch of variables like value_1, value_2, value_3 etc. in girder and NR can show these in a grid form... (like in the various examples that I mentioned)
GACSchemes are only for JRMC, but the principle is the same (the GAC command creates these numbered variables instead of your own code in girder)


April 14th, 2004, 12:35 AM
Those are some nice pages!

I'm really hoping to get away from HTML/ASP completely... BUT if I cannot do you have an example of the Hidden Frames?

Also, are you willing to share your nice pages?


April 14th, 2004, 03:05 AM
do you have an example of the Hidden Frames?

just google for "remote scripting javascript"


April 14th, 2004, 10:01 AM
did you make your weather and timezone pages? I'm interested in using those if you would like to share?

April 14th, 2004, 10:39 AM
The worldtime won't work on windows ce because it uses vml and this is not supported on windows ce

the weather uses png files and binary behaviours/filters etc...
I doubt that this will work on windows ce (not sure though)