Control Your TV with Your Phone

Control Your TV with Your Phone
Control your TV, DVD, Stereo, DVR, Cable box, Mac, Xbox, or any other IR device with the Web Clicker!

The Web Clicker is a web server & IR transceiver.  You can record any IR command and play it back via an AJAX web interface or just by requesting a URL.  It works great from a cell phone and it's especially handy for home automation projects.  It's based on a Propeller Platform USB, here's a little demo;



Continue on and I'll answer a few questions and then show you how to make it.
 
Remove these adsRemove these ads by Signing Up
 

Step 1FAQ

FAQ
What can I do with it?
The Web Clicker can control any IR device (TV, DVD, Stereo, etc) simply by requesting a URL. There's also an AJAX based control page so you can use it with a web browser, like on your iPhone or computer.

The Web Clicker is awesome for home automation projects because of it's ease of implementation - just request a URL and you'll generate an IR signal or trigger a series of IR signals

Why?
I built the web clicker mostly for home automation - I have a MythTV DVR that uses an RF remote.  Now, I've set it up so when I push the power button on the remote, the DVR makes a page request to the Web Clicker and it generates the correct IR signal. 

How?
The Web Clicker is a Propeller Platform USB and E-Net Module, and a very basic IR circuit.  Web server code is based on PropTCP, by Harrison Pham, and I wrote a custom object (Magic IR) for capturing and playing back IR signals. 

I started researching IR control schemes - after a few days of work, I decided it would be better to code my own IR recorder - this way it's compatible with any TV without having to look through a huge code list.  It's like a learning remote that has greater than 100ns accuracy & unlimited storage capacity.

I'm using a 38kHz IR receiver, which is the most common (95% of devices).  If your devices uses another frequency, it's easy to use a different IR receiver.

All the software & hardware is available under the MIT license, which is essentially public domain.

Using it
I'll get into using it in a bit, but here's the big picture;
  1. Enter the webserver address into your browser
  2. Hit 'Record' to capture IR commands
  3. Initiate playback either by:
    1. requesting a URL (something like: http://192.168.1.252/exec.cgi?x- where x is the command number), or,
    2. through the web interface on your smart phone or PC.

« Previous StepDownload PDFView All StepsNext Step »
35 comments
Jan 4, 2012. 12:06 PMoakleym82 says:
This is the perfect instructable, thanks! This will be my first one. My company recently installed two pan/tilt/zoom cameras in our conference room (that are IR controlled only), as well as an IR controlled video input selector. We want to allow our remote employees to select which camera to view and remotely pan/tilt/zoom them. I'm looking forward to putting this together.

One question: Do I have to have the SD card? e.g. when I program the device does it go into volatile storage, requiring it to be reprogrammed every time power is lost, or is there some on-board flash?
Jan 12, 2012. 3:18 PMoakleym82 says:
I've been pouring over this for a while and being new to Spin, I can't figure out how to get the LONGs to go to a file or something that I can use to reload the codes when it reboots. Any help would be greatly appreciated.

Also, I am having the problem where it crashes after recording 5 codes, or sometimes on playback.

One more thing, any advice on how I could rework it so that I can mimic holding a button like Vol+ instead of clicking it a bunch of times to raise the volume a lot?
Dec 15, 2011. 9:06 PMbdeschamps says:
could you use the Spinneret Web Server?
Oct 26, 2011. 3:37 PMholdenba says:
We need to control the selections of different videos to be shown in one projector via our iPhone/SmartPhone and and internet or 3G connection. Can your device do this?
Oct 26, 2011. 8:43 PMholdenba says:
The DVD players have a remote. I thought that maybe that would work.
Jul 8, 2011. 5:12 AManankin says:
it works for me but is it possible that he save codes in memory card??
Jan 27, 2011. 6:54 PMStianF says:
Hi

Thank you for the code and instructions I just have two problems:

- The codes are stored in ram, and I want to save them to a sdcard, with one file pr code or in raw. I should be able to make that by my self, but if anyone already have written it, I would be happy to take a peek at your code

- My clicker crashes after just recording 5 codes, tried to adjust the allocated variable sizes but that shouldn't be the problem since they allow 10 codes (at least?). I think I have narrowed it down to the assembly for recording codes, but I can't figure out whats wrong, anyone have a clue?
Jan 23, 2011. 9:49 AMlol XD says:
Hello Kitty ftw!
Btw, nice 'ible
Jan 9, 2011. 8:18 PMquartarian says:
This project is Awesome! Is there currently any way to add wifi to the propellar platform Though? It would be great to have this sit on my coffee table and control all of my devices. Thanks again for posting the great project!
Jan 14, 2011. 3:33 PMcaseysmiller says:
i did not see a wifi module while dinkin around on gadget gangster but I do have a suggestion. A wifi bridge (anywhere from $30-$200 depending on where you buy) will allow you to connect anything with an Ethernet port to a wireless network. You simply plug it into your computer one time to teach it to connect to your wifi then plug any ethernet device into it as if you were pluggin em directly into your router.
Jan 14, 2011. 3:29 PMcaseysmiller says:
This project is almost PERFECT for what I have in mind for my entertainment system when I refinish my basement soon. My intention is to have multiple tvs throughout the house connected to a 8x8 hdmi matrix. I know its overkill but heh anything worth doin is worth overdoin right ;). Anyhow a pair of directv receivers and a pair of hd OTA tuners, among other boxes, will be stacked in a cabinet. I would like all remote function to be handled through a web page hosted on my htpc. The ability to activate a code through a simple page call is perfect for this design. Due to this fact I need to have discreet IR blasters for each receiver. Otherwise changing the channel on one will change them both. Is it possible to have a second or even third IR transceiver and be able to set codes to only blast the code over the correct pins. Im sure this is possible but its a matter of how hard would the coding be. I have never played with propeller platform before but i am willing too learn. If nothing else i know i could just build multiple controllers but seeing as i'll be dropping $1k on the hdmi matrix i would like to be able to keep costs down elsewhere. Any help would be greatly appreciated and once again BIG kudos on designing this awesome little toy.
Nov 3, 2010. 5:48 PMCalegari says:
Hi, i just assembled this project and works pretty good.

I only have one problem, when i power off the webclicker all the recorded commands are lost, in order to make it save and do not lose the commands, what do i need to do? save everything in the microSD? How can i do that?

Thanks!
Sep 18, 2010. 11:58 AMthrglassdarkly says:
Sorry if this is a dumb question - would it be possible to connect multiple IR LEDs or add an extension wire so the LED can be placed further away from the device? I read somewhere that speaker cables can be used for that.

Thanks
Oct 31, 2010. 5:08 PMrrrmanion says:
you should be able to do that, and then just wire them in parallel.
Sep 7, 2010. 10:41 AMjeff-o says:
Now this is really, really cool. Would there be any way to add a simple GUI to the web page? I'm thinking of using this system with my iPod touch, and the small text links would be a pain to use. But, a full GUI would be EPIC. I've got a Harmony remote but I don't like how it works...
Sep 7, 2010. 11:48 AMjeff-o says:
Sweeeeet.

And can macros be assigned to buttons, too?

Forgive all my questions, I'm a rather poor programmer, and have insufficient knowledge of Java to figure it out myself.
Sep 7, 2010. 12:21 PMjeff-o says:
Neat. I'll have to see if I can track down the parts to make this. Now if only it could control my (locked standard Bluetooth) PS3!
Sep 7, 2010. 12:25 PMjeff-o says:
Ha, scratch that, I could just use a USB IR dongle like this!
Sep 13, 2010. 11:04 AMjeffeb3 says:
That remote can't turn the ps3 on though. You still need the controller for that.
Sep 12, 2010. 12:47 AMdlevans says:
Is there any source code for an Arduino? I've been working on this exact same project.
Sep 13, 2010. 10:22 AMdlevans says:
well I can do it with the Arduino...
http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html

I'm just not sure how to do the server side with the remembering of the codes.
Sep 12, 2010. 1:03 AMdlevans says:
actually... i can figure out the pins and code it's the server i'm having trouble with. I'm looking at your source right now. Thanks for posting.
Sep 13, 2010. 10:23 AMdlevans says:
I've got the AsyncLabs wifi shield.
http://asynclabs.com/

Again, I'm just not sure how to do the HTML/Server stuff with the Arduino.
Sep 12, 2010. 11:33 AMDemonSpawn says:
@dlevans, please let me know how thats going i would like if this was in arduino very much!
Sep 12, 2010. 10:02 PMdlevans says:
will do.
Sep 9, 2010. 4:51 PMmnc says:
wow!
that is the project i was looking for ages =)
you're awesome.

first i'll try to gather the parts, but if i cant,
well..
may be you can make one and sell to me ?

anyway that is really cool, i'll try to create a house automation working via my android phone.
opening apt's door, closing lights etc.. even thinking is awesome.
THANKS!

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
142
Followers
47
Author:Gadget Gangster(GadgetGangster.com)