Keeping Busy

What do you do when you’re missing your wife and darling daughter? In my case, you keep busy.

I had intended to go into the crawlspace under our house at the weekend to lay down some CAT5e cable. The intention was to run Ethernet to the spot directly under where our TV is located, then up through a tiny hole in the floor that the previous owners must have (had) drilled. That would give us the much needed wired network access that we’re missing in the living-room.

Well, when I went to do the work, I noticed that I had purchased the wrong kind of cable; I had bought solid cable instead of braided. So, I went back to Media Markt yesterday and switched my solid cable for a 50m reel of braided.

Today, I had no good reason to put off the work any longer, so with the family out of the way, I got down to some undisturbed work in the cellar.

The crawlspace under our house is really quite vile. It’s not just a flat, dusty space down there. Oh no, it’s full of rubble, old plastic bags, bits of old wire and God knows what else; probably a load of rat turds and asbestos, I shouldn’t wonder.

I’d bought a nice, powerful Maglite torch yesterday, an essential piece of kit when crawling around on your belly and elbows in the pitch black. It has a rotary head, so that you can turn from a wide angle beam into a sharp, bright point of light. I’d been bitching for ages that we didn’t own a decent torch, but thanks to a local ironmonger’s, that’s now been put to rights.

Anyway, I was under the house for only about fifteen minutes and there were no unexpected hitches. It was easy to draw the cable across the breadth of the house and feed it up into the living-room.

Upon exiting the crawlspace, I immediately headed upstairs for a shower. My clothes, skin and hair were covered in… I don’t even want to know what.

Back downstairs, I carefully stripped the cable in the living-room and crimped an RJ-45 connector onto the end, using an excellent guide, turned up by Google. If you think that I know the colour-coding order of an Ethernet cable off by heart, you’d be wrong.

With one end done, I went back downstairs into the cellar and crimped a connector onto the other end. I then hooked up that end to the router.

Back in the living-room, I plugged the other end of the cable into the on-board Ethernet jack of the MythTV box, tried to bring up the link and… bingo!

Sep 20 16:43:32 tourbillon kernel: e1000: eth0: e1000_watchdog_task: NIC Link is Up 100 Mbps Full Duplex

I’ve already decommissioned the 802.11b WLAN card inside the MythTV box, as it’s no longer needed. It wasn’t working well any more anyway, because it was suffering interference from the wireless speakers of our recently purchased Logitech Z-5450 5.1 speaker set.

With a 100 Mbit link from the MythTV box, I’ll now be able to stream TV programmes to my workstation on the top floor, which could be handy if Sarah is commandeering the real TV downstairs.

In the future, I suspect we’ll eventually move to gigabit Ethernet and a distributed MythTV set-up, so that we can stream programmes and DVDs to televisions anywhere in the house. We could even make the front-ends discless, so that there would be almost no noise emanating from the cases.

Anyway, that stuff is all some way off yet. I’m just happy to finally have Ethernet where the TV is.

Posted in System Administration | Leave a comment

UPC programme data grabber released

I mentioned a few days ago that I’d been working on a grabber to pull TV programme timetable data for the channels in UPC’s digital TV package.

Well, with the family out of the country, I seized the opportunity to clean up the code, squash a couple of bugs and add some hopefully useful command-line options. With that work done, all that remained was to put up a page, telling people how to use the software. And with that work now done, I can announce it, which is what I’m doing.

I don’t expect a lot of interest in this software. After all, how many users of MythTV can there be in The Netherlands? And how many of those are subscribers to UPC’s digital TV package? And how many of those care about the channels for which data can’t be obtained from the usual source, tvgids.nl? Well, I’d be surprised if I needed more than one hand to count them all.

For those people, but mostly for myself and Sarah, I give you tv_grab_nl_upc.

Posted in Ruby, Technology | Leave a comment

DB9

I saw an Aston Martin DB9 in the P.C. Hooftstraat yesterday afternoon. If my immediate family contained fewer members than the number of seats in that car (or even an equal number), that’s a vehicle I might have to consider. What a nice car; and so subtle, too. I could drive around in that without feeling like a complete wanker.

The only problem I could see was that literally about 30 – 40% of all the people who walked past it in the street stopped to admire it and peek inside. You’d attract a similar number of glances parking it and getting out, as well as getting back in. I suppose that’s precisely the reason some people would want a car like that, but I personally can’t stand being the focus of attention and the resulting loss of casual anonymity. I’d end up waiting on the other side of the street for people to walk away from my car, then quickly scuttling across the road to get back in before the next admirer happened along.

Ah well, that’s another advantage to our Audi A6 Avant. It’s a fantastic car, but not very glamourous.

Posted in Cars | 2 Comments

MythTV or TiVo?

My friend and former colleague Jason in California has a couple of TiVo units in his house in California and says that he can’t see a need for a MythTV box.

TiVo PVRs are great, and I would have bought one for use in Amsterdam if they were available in this country, but having been forced down the MythTV path by a distinct lack of viable alternatives, I have to say that I’m now happy I was.

But for someone in the US or the UK, why would anyone choose MythTV over a TiVo?

Well, in a nutshell, power and flexibility are the reasons to choose MythTV.

Here are just a few of the things a MythTV box can do that a TiVo can’t:

  • House more than two tuners. For example, our MythTV box has four. No more (well, far fewer) scheduling conflicts.

  • Mark and automatically skip advertisements, a political hot potato in TiVo’s world.

  • Allow complex matching rules when determining which programmes to record.

  • Be a simple (discless) front-end for a networked back-end with masses of storage. This enables you to watch the same content all over your house.

  • Perform duplicate programme detection over a period longer than 28 days. MythTV never forgets what you have recorded, so it won’t record duplicates of things you’ve already seen, even a year or more down the line.

  • Allow you to reconfigure the user interface using themes. MythTV’s OSD (on-screen display) is also separately themeable.

  • Watch programmes at greater than normal speed, using time-stretching.

  • Be configured via a Web interface (handy if you learn about a programme while at work). (Hacked series 1 TiVo units can be made to do this)

  • Rip your CDs and DVDs.

  • Archive programmes to the network or burn them to DVD.

  • Play arbitrary audio and video content from local or networked storage, such as OGG, MP3, MPEG4, etc.

Let’s look at just one of those features a little more closely, namely the ability to set up complex recording rules.

Sarah likes to watch a lot of (IMHO) mindless tat. For example, she really likes to watch America’s Next Top Model. My suffering doesn’t stop there, however. She also likes to watch Britain’s Next Top Model, Australia’s Next Top Model and, of course, Holland’s Next Top Model. (Thank Christ she doesn’t speak any other language.)

Rather than making one recording rule for each of these, we can make a single rule that performs an SQL query of the database table containing the programme data. That table is called program:

program.title LIKE ‘%Next Top Model%’ OR program.subtitle LIKE ‘%Next Top Model%’

Holland’s Next Top Model has the actual title of Modelmasters, with the more familiar title being relegated to the subtitle slot, which is why the OR clause is needed.

Now, that’s not too difficult, so let’s look at something else.

I like to watch Top Gear. Love him or hate him, Jeremy Clarkson is very funny and I like to look at all the crazy things he, Richard Hammond and James May get up to in the same of automotive research.

Well, Top Gear originally airs on BBC 2, but is later rebroadcast on BBC Prime. The Dutch channel Veronica also picks up each new series within a few months. If things were that simple, I’d just elect to record any showing of the programme on any channel. However, there’s a fly in the ointment.

BBC World also broadcasts Top Gear, but it’s a stripped down version with just the highlights from one of the episodes. They’re also repeated with astonishing frequency, but without enough information to detect duplicates. What to do?

Well, we simply create a rule to record any showing of the programme, except for those broadcast by BBC World:

program.title LIKE ‘%Top Gear%’ AND channel.callsign != ‘BBCWO’

This rule also has the advantage that it will record broadcasts of Top Gear Xtra and even Best of Top Gear Xtra

But there’s more.

In the evening, I like to watch the Dutch news. However, sometimes the news is broadcast on NED 1 and at other times on NED 2. Theoretically, ti could also show up on NED 3. The news is also on earlier in the day, but in a repeating loop of the most recent new edition. I don’t want those, just the ones in the evening.

The resulting rule looks like this:

program.title = ‘NOS-Journaal’

AND channel.callsign REGEXP ‘NED[123]’

AND HOUR(program.starttime) >= 18

AND HOUR(program.starttime) < 23

The SQL in itself isn’t enough, however. Since there’s nothing more useless than old news, I only ever want the latest edition, so I elect to record a maximum of one episode and let the previous one expire. That last part is important; otherwise the system will stop recording new episodes when the requested maximum of 1 has been reached.

Now, because the news is generally on at 18:00, 20:00 and 22:00, I’m pretty much guaranteed to have a recent edition of it on disc. For that reason, I don’t want the news to be recorded instead of some other programme if there happens to be a scheduling conflict (i.e. the system needs to record more channels than there are tuners available), so I lower the priority of this recording rule from the default, 0, to -1.

So, now I can record just the evening news, no matter which channel it happens to be on, and be sure that it will only record a new edition if nothing more important needs to be recorded while it is on.

Much more complicated recording rules are possible, even utilising the data from other tables in the MythTV database, but in practice, it seems unlikely one would need anything much more involved than this. Being able to restrict programme searches to certain parts of the day (or week or month) and/or a certain selection of channels is something I will find very useful.

No other PVR system offers this level of power and flexibility. Of course, that sometimes gets in the way of simple functionality, so I should mention that I’m discussing MythTV’s advanced search capability. If you just want to record every episode of Desperate Housewives or every film with Robert de Niro, that’s as simple as a couple of clicks on the remote-control. It wouldn’t be much fun if recording your favourite programme required having even a rudimentary understanding of SQL.

So, Jason, do you now see a need for MythTV? TiVo is cool, but MythTV is superb. If TiVo turned watching TV into an art, then MythTV makes it a science.

Posted in Technology | 2 Comments

More Rubbish Hardware

Do you remember that I had bought a Logitech Harmony 885 universal remote-control? Wlel, I finally got around to trying to configure it last night, only to discover that two of its buttons on the right side didn’t work.

Do I have a hardware curse or what?

So, another fun trip in the car to Media Markt was required. Unfortunately, they had sold out of the 885 model, so I had to accept a refund. And, because every single computer shop in Amsterdam is absolute shite (Fry’s, where are you when I need you?), I can’t find anywhere else on-line that has it (except for one shop, that wants €50 more than even pricey Media Markt. Ik ben toch niet gek?)

So, no universal remote control for another few days at least.

Posted in Technology | Leave a comment