Friday, January 27, 2006

Ring Ring!

Ok. Not content with Media Center, and distributing it to all the TV's in the house, it was time to add some gadgetry to the telephone.

Caller ID to Media Center

There are a number of caller-id interfaces for the British telephone system, which present the callers number to a serial port interface while the phone is ringing. Apparently UK Phones use a different system to most of the rest of the word, which renders many 'worldwide' modem cards no use to us for caller-id data.

Automated Home (www.automatedhome.co.uk), had a number of posts where people had figured out that many of the stand-alone caller-id display units available actually presented the number data in serial format, and it just needed interfacing to the PC. So armed with Google, I found this : http://www.amarok.demon.co.uk/dl/cd50_mod/ which documents a *very* simple circuit to interface a CD50, or other similar caller-display unit to provide a serial output to your PC. ... Step one .. I built this.

Next was the software side of things. This hacky little circuit is not TAPI compatible , which is the standard that the internal Caller-ID support in Media Center uses, so its back to the home workshop for this also.

I ended up building a small Visual Basic application ,that runs on the machine with the Caller-ID connected, and monitors the serial port for incoming calls. This then takes the number, looks it up in a file, and, if the 'name' of the caller is in the file then the name is used in stead of the number.

I have a number of devices in my house, that (predictably) are completely incompatible, and I wanted to build something that was 'extensible' for future displays and things to allow me to put the caller info up on the TV etc.

Interfacing to MediaCenter 2005

Firstly, I needed a way of displaying messages on the MediaCenter TV screen, in the nice 10 foot interface. I found MCE-YAC (yet another callerid) at http://www.byz.org/~ethanz/mce-yac which is essentially a media-centre network client application for MediaCenter, which can take messages from the popular YAC application (www.sunflowerhead.com/software/yac), which is a fully featured Caller-ID program.

Now this seemed like it would all work nicely, but I then discovered that MCE-YAC acts as a network listener, using a TCP Socket 10629, so I wrote a quick .NET app which can send on TCP ports, and called that from a command script.

I then modified my VB caller-id app which listens to the caller-id unit, to call out to a command script which then notifies all my devices - this allows easy addition of other devices and stuff via a command script. The script below also sends the caller info to my Roku Soundbridge M1000.

The vb app calls this script, with 2 parameters, a message and a name, but you could modify this to say anything, and it will appear on the MCE screen, as well as the Roku Soundbridge M1000.

Sample script:

@echo off
if exist c:\cid\ locked.flg goto end
echo locked > c:\cid\locked.flg
c:\cid\socketsend (mce-ipaddress) 5150 pause
c:\cid\socketsend (mce-ipaddress) 10629 %1 %2
c:\cid\rocku-display (roku-ipaddress) scroll pause %1 %2
del c:\cid\locked.flg

You can download my nasty hacked-together utilities: socketsend, or roku-display, I make no claim to quality coding with these, nor originality, as most of the code is sample stuff available on the internet. It took a little while to get the Roku to behave, and sometimes it doesnt quite work properly - make of it what you will.

I will post the VB Caller-ID app if there is demand, but it will need re-writing slightly, as I use a 3rd party socket OCX in there which is not distributable - and you wont be able to build it.- post a comment if you are interested and I'll do something with it if anyone is interested....

Going further...

It also seemed logical that if the phone rang, the MCE 2005 machine should 'pause' whatever it is doing and let you answer the phone. This was fairly easy once I discovered the excellent
MCE Controller app (www.kindel.com/products/mcecontroller). this allows you to send any supported remote-control command to MCE via the network.. and seeing as I already had a nice little TCP sender program, that was easy:

c:\cid\socketsend 5150 pause

Now the MCE machine pauses when the phone rings, and displays the caller ID info if there is any. The only slight issue with this is that 'pause' is a toggle, so if you're 'paused' when the phone rings, it will play again! - this is not an issue for me, as I've never suffered from it, but you could work around it with sending repeated vol- commands to turn it down I suppose.

Skype

Finally, it was time to join the VOIP revolution. Some time ago I concluded that the best WAF would be achieved if I could integrate the Skype with the home phones, and hey presto, this is exactly what the 'Yamamoto EasyBlue' USB interface does. http://www.yamamoto-group.co.uk/index.php?page=easyblue - available on Ebay, and lots of other places.

So, to summarise the way I set it up:



This makes all the house phones ring when there is a skype call , and they still work normally for standard phone calls. The incoming ring is slightly different (it's longer), when skype calls are received, so you can tell the difference.

To make a call, you just lift a handset, and dial normally, for a skype call, lift the handset and dial * followed by the short-dial for the skype contact you want (1-99) and then #.

Clearly, the PC has to be 'ON' for this to work, with SKYPE running, and the little 'callme' application that comes with the easyblue.

the solution works really well, the call quality to a friend in Australia recently was excellent.

I also added 'MCEPhone for Skype' to the Media Center, http://www.cbuenger.com/mcephone/ - as it's an excellent way to manage your skype from MCE, though with the EasyBlue connected you should really initiate phone calls with the phone handset and dial-pad to avoid calling people and have no way of hearing or speaking to them!

There's only one thing missing from Skype- the ability to 'sign-in' and 'sign-out' at specific times. Now if you have a PC and a headset with skype, I guess this isnt important, because you turn off the PC, or sign out of skype at night etc. But! - if all your phones are hooked up to it, it's quite important, because sooner or later someone will skype you at 2am in the morning, and all your phones will wake you up!

Enter 3rd nasty .NET utility: SkypeCommand. I'm too ashamed of the quality of the code in this to post it right now, I'll clean it up and post it soon. 8-o

This allows a really primative command-line interface to Skype. I only needed to be able to send
'SET USERSTATUS INVISIBLE' and 'SET USERSTATUS ONLINE', but there are many comamnds supported by the Skype Messaging API that probably work. This app is run from a scheduled task in Windows, and at the appropriate time I send the 'online' or 'invisible' command to skype, and I drop off the map when I want to get a peaceful nights sleep. Probably the only other recommendation is that you only allow skype calls from your contacts, but then if you've used skype you've probably learned that one already - unless you like random calls from people you dont know 8-)

More another time... Probably my experiences with the Harmony remote control....

Friday, January 06, 2006

The Media Centre of the universe...

I have some friends who are *deeply* into home automation, and have motorised curtains, talking bookcases and all that, but somehow, I just couldnt face routing out all those cabling runs all over again and laying more cables 8-)

My PVR Setup

For about 2 1/2 years, I've kicked myself for not buying a Tivo - that you could get in the UK, for a while, and as the supply of 'display' ones dried up in Coment and Dixons a few years ago, I yearned for something similar.... and started searching the net... I found Myth TV

MythTV

So, first for me, there was Linux and MythTV... WOW! - I spent much time with this, bought a hauppage DVB-T tuner card and compiled away. I tried it 3 years ago with an analog card, and got *no-where*, because it was just too hard - even being a Linux head for 4 years beforehand had not prepared me for the challenges ahead to get all this to work.

I enlisted the assistance of a Danish pal to get it up and running, and eventually we were there.

The beauty of open-source is that you're not bound by marketing departments, strategic plans and all that stuff, and people just 'do stuff' because it's cool - Myth can do all sorts of stuff, and actually (now I've lived with Media Center 2005 since it was released) it in some ways more feature-packed than MCE 2005.

There are a number of linux 'distributions' that make it VERY easy to set up mythtv, so long as you have supported hardware, but in some ways, this list of hardware is longer than MCE's, and Myth will run on more modest hardware, due to it's split architecture, known as a 'front end' and a 'back end'.

Check out http://www.mysettopbox.tv/ for more info on the last one I used, and of course , the free download of the CD image(s) for it.

I eventually got knoppmyth (see above) working on a PIII 700mhz, with 256 mb ram and one DVB-T PCI card - it was functional, but had stability issues, but this was MythTV 0.14 at the time, and I'm sure it has improved since then. I toyed for months with Myth, obsessed by it's capabilities, these included many plug-ins, DVD-ripping to hard-disk, and music libraries as well as a very powerful architecture.

The split MythTV stack allows you to split the playback (front-end or user interface component) from the 'server' or back-end, essentially allowing multiples of both, and streaming TV and the native UI on the front-end, leaving the back-end free to 'record stuff' and do the other bits. I managed to get the front-end running from a bootable CD, on a cheap Celeron PC, with no hard disk, and only 128mb of RAM, this resulted in a silent box under the TV to drive the system, connected via 100mbit lan to the back-end, which was a PIII 700MHZ box, that was much more ugly and noisy than the front end.

This is something that Microsoft now support with Extenders as we all know, but it's refreshing to see it in an open-source product. Naturally, there are many open-source and freeware media center type applications for Windows, Linux that can do this also.

As many a married man knows, there is only one crucial factor in any of this... will the setup pass the WAF (Wife Acceptance Factor) Sadly, in my case the answer was 'no' due to several issues surrounding my choice of remote-control, and the stability of the setup, which I have recently discovered was mainly due to the older builds of MythTV being unable to handle poor DVB-T reception from my antenna.

Media Center 2005

Having created the demand for this, I had to deliver, and searched for another platform. My MCE2005 machine has been in place since MCE2005 was released, and I would say is more critical to my household than my employers email server! I've rebuilt it a couple of times, once to change PC motherboard, and once to swap the system disk to SATA.

Here is some detail on it:



Hardware




  • ASUS Pundit-R with 1.8ghz P4 processor
  • 512MB RAM
  • 200GB SATA disk (OS and TV Recordings)
  • 120GB external USB-2 drive (Music)
  • Hauppage Nova-T PCI DVB-T card (the oldest model, bought ages ago)
  • Packard-Bell DVB-T PCI Card (Connexant 2388x based, from ebay!)
  • Microsoft Media Centre USB Remote reciever

Main Issues:

  • Stuttering recordings (video freezes for a seconds or two, but audio carries on)
  • Low 'virtual memory' sometimes
  • 'slow response' (PC seems to swap to disk excessivley, if you leave it be for a few hours and pick up the remote and press 'down', the machines goes mad - perhaps loading up stuff that is paged to disk, then responds) - probably needs more RAM, but I keep telling the wife I need an Athlon 64 to fix it, so lets keep telling her that shall we 8-)

I dont think any of these issues have gone away fully after the application of Rollup2 for MCE2005, but my dual-tuners have started working properly so it's not too bad.

OI PUNDIT! - SHUT UP!

By far the biggest issue I encountered with both MythTV and MCE2005, was that of NOISE from the machine - clearly, this has bothered many people on the forums, but I decided to take a more budget approach to quietening my MCE machine due to the fact that the ASUS Pundit has hardly any room inside to tinker, and it didnt look that easy to replace the cooler on the CPU for example. I've read about replacing the PSU fan (which is the main source of noise), but currently, the machine hums away in the spare room, and is not overheard from the living room!

Distributing Video / Audio to the TV(s)

*WARNING WARNING* Wiring, soldering, please dont attempt this sort of stuff unless you are confident soldering plugs and running cables etc - incorrect connections might fry your remote extender, or your TV, or YOU!! You do this at your own risk! **

I have 2 TV's in my house, one in the lounge and another in the kitchen, I wanted to have multi-room MCE, but couldnt really think why I needed to have anything more than the same feed from the MCE machine to both TV's , so rather than spend a fortune on 2nd MCE machine, or extenders, or (gasp an Xbox360!), I bought a cheap video amp from Maplins (labelled sb 3714 4-way AV splitter) and used it to pump the Composite feed from the Pundit to the two TVs.

A Flat-screen TV in the living room, and a cheap little LCD in the kitchen:



The feed to both these TV's is just shielded AV twin core cable from Maplin. the length to the Lounge TV is about 10M and if you site it away from other cables, e.g mains, speakers etc, the picture is pretty good. My future plan is to invest in a KAT5 TV Transmitter/Reciever (see www.kat5.tv), which balances the video and audio to send along Cat5 cabling, and will result in better quality pictures.

So, that part is easy, just wire up the cabling with SCART plugs on one end wired to feed composite video and audio, and some appropriate phono's on the other end to take the Audio from the back of the AV amp.

Interestingly there is enough signal from ONE of the AV amp outputs, that I actually split the feed at the Panasonic TV, and fed it thru to the kitchen, and both of them are fine with this, if I could run a dedicated kitchen feed I would , but the carpet is now down, and I'm not taking it up AGAIN! (insert disclaimer about carpets disintegrating round the edges when you pull them up to run cables down the edge of the room between the gripper strip and the wall)


There is a 'little' bit of FIZZ to the picture, probably due to the fairly low quality AV amp I'm using, and if you can I'd recommend using the DVI or VGA feed from a PC to feed a screen if it has the inputs - Sadly my Panasonic TV has only HDMI (only? what am I saying!), which after some research, I learn cannot be extended to my knowledge beyond about 10m max, you cant make your own HDMI cables (too many solder joints too close together), and to go further than 10m you have to shell out for fibre-optic DVI extenders which are about £500. - so, the av amp and the slightly fizzy picture will do me, as i can only see the fizz up close.

The DVI-HDMI route is definatley worth it if you can stand your MCE box near the TV, as the picture is great on there, but remember a bit of blur and fizz actually disguises that nasty freeview picture quality on these tvs which are now able to show it in all its mpeg blockyness that you never saw on that CRT TV. 8-)

What about the IR remote?

Well, totally, you need that to drive the MediaCenter! - I tried (unsuccessfully) to use wireless remote-extender/repeater devices from several manufacturers, I always found that they either put a huge delay in or single keypresses resulted in multiple ones being recieved, rendering it fairly hellish to use the controller in the EPG etc. In the end, even after reading up on several 3rd party remote-control 'repeater' products that are very good, as they can resolve 'collisions' on multiple recievers (e.g 2 people pressing a different key in 2 rooms), but due to my luddite attitude to multi-room media-centre, I settled on these:





This is the OmniLink IR Extender, designed for SKY boxes. You can pick em up in B&Q and probably other places like Argos etc for under £30. They work by using the TV Antenna cable to pass the IR signals along to the back of the sky box , which 'understands' the signals on the wire it's feeding your TV with, and responds - no IR spiders/transmitters needed. Luckily, they also supply the reciever in this pack, with a brick PSU, and those handy spiders. - the device works well for all the IR devices I've tried - including the Microsoft remote that is used with MCE 2005.

I installed 2 of these one in the kitchen (you can see it sticking out under the TV), and one in the living room. Now for the wiring:

I tried co-ax between the TV's via my Antenna amp in the attic (this is also by the way an OmniLink item), as the AMP also supplies the 9v feed down all the co-ax feeds to run these suckers without the powerbrick. But, enter the world of Media Centre, and you soon learn that the PCI tuner cards (I have anyway) seem to 'short this 9v out' or eat it , such that when you hook the IR reciever and spiders up to the antenna feed at the back of the MCE, you get no LED which means no power and no IR signals! - so, rather than run MORE CO-AX everywhere, I just used that nasty bell-wire you get in the DIY store to connect them together. I run a length of this down beside the shielded twin-core cable carrying the audio and video, and bingo! - Just one point: The 9v DC supply to the reciever pod is polarised! - so when wiring this use a multimeter/tester to connect the centre pin to the centre-pin otherwise it wont work!

I also, pushed my luck and wired them like this:



This actually seems to work quite well, I've not had any issues with it, and the bell-wire is easier to route under carpets etc if you dont want to drill the place apart again having decorated. You could probably use a pair in a cat-5 cable.

Note: I've also used one of the omnilink sets to 'forward' IR signals into my TV / AV cabinet - you dont need any bell wire for that- just plug the Transmitter and Reciever in to each other back-to-back and place the IR spiders inside the cabinet. I even managed to get most of the devices in the cabinet to respond to one spider, because its 'dark' in there I guess its easier for the IR emitter to light the inside of the cabinet up!

Ultimatley, my Pundit is getting on my nerves even here, next to me in another room, so another look at the KAT5 sender reveals that it can also do IR forwarding via the same single CAT5 cable that it sends video and audio down, so I will upgrade to a one-stop solution when I finally figure out where to banish the noisy MCE machine to -ether the attic, near the antenna!, or the garage.

Thats all for now, Next time, SKYPE, Telephones , Media Centre and CallerID, and after that probably my experiences with the Logitec Harmony 688 Remote if I ever get it to work properly 8-(.....

Please feel free to post comments here, questions etc, hope this is all of use to someone 8-)