Wednesday, April 27, 2011

Time and Tide

As anticipated, there was little time to work on Elmo over the Easter weekend.

My time during the week is firstly being spent on getting a cross-platform version running on my Windows development machine and then on working on the analysis of the received signals. Hoping that the next long weekend coming up will see me able to devote more time.

Wednesday, April 20, 2011

Early Learning

Another weekend with little time to work on the project.
During the week I'd written an analyser which took previously captured codes and worked out the commonalities. With what I learned from this, I wrote some test code to see if the real capture process worked the way I thought it did and, broadly, it does.

It's ended up being rather more involved than I wanted but I think I have a clear view of what needs to happen. Due to the inaccuracies that creep in with timing and ambient conditions the results from the IR receiver are not always identical. This means that some degree of fuzzy logic needs to exist in the learning process and fuzziness is something that's difficult for computers to do.

I managed to get as far as working out the best frequency fit for each remote control and selecting candidate signals that looked basically compatible. The next challenge is to work out when a signal is a slightly different version of one I've already received and when it's a different signal altogether. Some remotes alternate signals and so this has to be taken into account as well. This basically looks as though it should work, but some tweaking of the parameters will probably be required in order to obtain the most reliable results.

Next weekend is Easter, so I doubt much will get done, but I'm trying to make at least a little progress each week to keep the momentum going.

Monday, April 11, 2011

I fought I.R. and ... I won

My previous assessment of interfacing directly to the IR device was, surprisingly, confirmed this weekend.

Due to the glorious weather this weekend, I didn't have a great deal of time, but I managed to take the basic code I'd written in the week, port it onto the Linux box and successfully transmit codes to the Sky box (the digit 1). Having done that, with some more work I managed to capture IR from the remote control and confirm the numbers I was capturing matched those I'd previously sent. The trickiest part was getting all the data in the correct format since it doesn't seem to be consistent for different messages.

The upshot of all this is that Elmo can now capture IR signals from a remote control and regurgitate them to control devices (so far, only the Sky box). LIRC, the bane of my life, has been abandoned and I'm communicating directly with the IR device driver via a pipe. Initial indications are that the codes captured are very consistent.

I've taken the time to capture codes from 4 different remotes so I can work out the best way to analyse and store the codes - which is the task for this week whilst I'm away from home. If I can get a reasonable mechanism to do this then the most difficult part should be over. It's taken a very long time to get this far!

Next step: Analyse the captured remote codes and decide on the best way to record and store them. Write some code to support this, ready for porting to Linux at the weekend.

Wednesday, April 6, 2011

Signs of life

I managed to find some time on Monday to look through the IR dongle utilities code. To my surprise, using the device seems to be reasonably straightforward (a first on this project). There are a number of utility functions which can be reused to drive the basic protocol which just leaves the higher, packet, level to drive.

I was lucky enough to grab some time yesterday and quickly put together a program using the utility code to open a connection and read some data from the dongle. It worked! Knowing this, I can now work on some basic learning functionality so I can program up the remote controls I have. My plan is to keep this fairly simple for now and refine it later. The focus is to be able to issue individual commands to multiple individual devices. I already have a demonstration of the networking ability, so that can be put to one side for now.

Right now it feels like the project once again has a future, but this will be tempered by the reliability I manage to get from the learned codes. I fear there may still be a way to go yet.

Monday, April 4, 2011

Wonders of USB

My previous idea of using third-party IR codes was all very well until I found that the majority of remote controls I have do not seem to have files available on the net. So, I'm back to having to capture my own IR.

During my usual weekend frenzy of work on the project, I discovered the problem with capturing IR was that, once again, LIRC has been using the internal IR receiver rather than the external dongle I want it to use. I finally managed to disable the internal device by blacklisting the driver but now LIRC doesn't want to work at all!

I think there is a problem within the system because both the interal and external receiver use USB, but I cannot confirm this. Anyhow, I then decided to revert to using the tools supplied by the dongle manufacturer and finally had some success! I've managed to record some IR and retransmit it, successfully controlling the satellite box!

The process is currently rather tedious and manual - requiring copying dats from one tool into another, but I've downloaded the source code and am hoping to find the interfaces I need to access the interfaces programmatically. Hopefully this will then allow me to reliably record and retransmit IR signals. I'm quite excited by the prospect but I've thought I was at this point before and it all came to naught. The good thing is that I can examine the source during the week when I'm away from home.