Thursday, February 21, 2008

iPod touch home controller project PART 3

IR SERVER 

In order to separate interface from the IR engine, I'll use a socket connection between them.
The interface will open a socket to the server and write the IR code string.
On the other side, the server loads the IR module and listen for IR codes from the socket. When received, the code is sent to the IR module and blasted !
Here's a simple PHP script that sends an IR code to the socket server :


$fd = fsockopen('192.168.1.20', '9494',  $errno, $errstr, 30);
if ($fd) {
fwrite($fd, utf8_encode('0000 006C ... 0015 0E4A'));
}


This screenshot shows the debug output of the socket server running and intercepting this code.




The next step is the PHP client that will also store the codes in a database

iPod touch home controller project PART 2

DESCRIPTION

After a brief introduction on my iPod touch remote control project, here we are.


The computer runs on a Linux Ubuntu.

In order to send IR codes to the equipments and learn codes from existing remotes, the computer uses a USB IR Transmitter, available at usbuirt.com.


Linux drivers are available and easy to set up. It's also provided with an API wich you can implement in a simple catch/send program.

This screenshot shows a simple test program that catchs IR signals. I simply put my remote control in front of the module, press the 'power' button and here what I get : 

This way I can get easily every codes of my equipments.

I'll use the Pronto format. A lot of ressources and equipements codes on that format are available on remotecentral.com

Now that basic IR reception/emission is working, let's talk about the software on part 3.

iPod touch home controller project PART 1

INTRODUCTION

For some years now, I've been looking for a smart universal remote control, to control my home theater system in an elegant way. 

These are existing solutions for that :
  • so-called 'universal' cheap remote controllers. Unfortunalty unusable in a custom configuration.
  • pronto-like remotes.  Too expensive for a non flexible machine, and poorly-designed
  • professional domotic solutions. Much too expensive !
When Apple released the iPhone, and the iPod touch some months ago, I thought these machines were good starting points for a remote controller. 
They have :
  • gorgeous design
  • screen-touch control
  • web browser
  • and a wifi connection
But the iPod is not meant to be a remote controller, so it has no infrared built-in, and that's what remote control is all about.

To act like a remote controller, the iPod have to call a webpage via the browser.
Then, the web server actually sends the IR codes to the appliances ( receiver, television and whatever I want ) via a IR transmitter.



I'll describe the project in details in an upcoming post.