DISCLAIMER - I’m not an EE and I’m not particularly good at this - I might be drawing too much power from the Fio, for example.
I’m not going to discuss how to get the IR codes here - http://www.arcfn.com/2009/08/multi-protocol-infrared-remote-library.html discusses how to do it (the library comes with a very easy-to-build and easy-to-use test rig.) Just add a $5 IR Receiver available at any given Radio Shack.
My current device is more or less based on:
The simplest wireless solution I could sort out came from:
(1) $25 Arduino Fio* - https://www.sparkfun.com/products/10116
(1) $35 RN-XV 802.11 Wireless Module - https://www.sparkfun.com/products/10822
(2) $2 “High Output” Infrared LEDs from Radio Shack (1.2V / 100mA)
(1) $0.25 10 ohm resistor (per http://led.linear1.org/led.wiz to limit current to the LEDs)
(1) $0.25 100uF/25V capacitor (to keep from browning out the microprocessor)
(1) $1 2N3904 (I used an NTE123, any similar NPN transistor will be fine)
(1) $1 Micro-USB power supply (alternatively you can use a $9 LiPo battery with the Fio - I have one on order, not sure when it will be here.)
(various) jumper wires, headers soldered on to the FIO, solderless breadboard, FTDI cable to program the Fio
*https://www.sparkfun.com/products/11520 is a similar product but won’t require an FTDI cable and can be used to emulate a USB device - it should be possible to plug it in to your PS3 via USB and have it issue HID commands and maybe even monitor power state - I need to do more research here.
It took about an evening to piece it together and write simple firmware that accepts commands via telnet - I had written an HTTP+JSON server but the RN-XV can only serve one socket at a time and is VERY slow to close sockets - one second per request felt like an eternity…I figure I’ll set up a small server application that my wireless-ir remotes will call in to and let that server provide a nice REST API in front of the sockets to the real devices.
Advantages: Works; is quite small.
Disadvantages: Expensive-ish; requires extra software.
Alternative 1: Use a router
(These use my Amazon affiliate account - please feel free to remove the tag but I would otherwise appreciate the kickback!
(1) $25 Arduino Uno R3
(1) $20 TP-Link Router
(1) $21 Arduino Ethernet Shield
(…) IR parts and miscellany as above
This is $6 more than going pure wireless and will give you a MUCH easier to work with solution (no soldering required) - it’s also possible to find the arduino and shield on sites like dx.com and seeedstudio.com - I paid about $10 for my Arduino and $11 for the shield but had to figure out documentation myself (and bend pins back from damage, and wait about a month for delivery…)
Pros: Much more flexible solution (can use standard Arduino shields to add Bluetooth Low Energy, relay controls, etc.)
Cons: Larger footprint, separate power for router and Arduino, battery support not built in.
Alternative 2: Buy a pre-built USB solution
(1) $19.50 Infrared Toy http://www.seeedstudio.com/depot/usb-infrared-toy-v2-p-831.html?cPath=174
I haven’t personally used this but, from the documentation, it’ll let you read and send IR codes from a usb-equipped computer. If you’ve already got a media center (or you need something to read codes in with) it might be a great solution.
Cons: Requires USB
Alternative 3: Buy a pre-built WiFi solution
(1) $110 WF2IR
This company has a series of devices that can control serial port (useful for some receivers such as my Denon AVR3806), contact closure, and infrared devices via WiFi. $110 is more than I wanted to spend…although I’ve easily spent 3x-4x as much prototyping things.
Alternative 4: The Electric Imp
(1) $30 Electric Imp - https://www.sparkfun.com/products/11395
(1) $13 Breakout Board - https://www.sparkfun.com/products/11400
(…) IR parts and miscellany as above
The Electric Imp is a rather nifty device. It’s the size of an SD card, gets programmed online, and can do a variety of general-purpose-microcontroller tasks. Nobody’s written an IR library for it yet (and the Arduino one is top-notch) but it’s theoretically possible - IR Receive would probably not be due to some limitations of the current Imp firmware.
Pros: Tiny, easy to power via battery
Cons: Nobody’s tried it yet.
Most TVs have hidden codes to do “discrete” actions - that is to say, there’s a POWER_OFF and POWER_ON code as well as the usual POWER_TOGGLE that your standard remote sends - that’s one way of getting around unknown initial state. For other detection I think that the most promising approach would be to plug in to a USB port (my TV turns the USB port’s power off if the TV itself is off - the USB port is useless for control or HDMI port on the TV - http://en.wikipedia.org/wiki/HDMI#CEC sounds like what we really want but it’s not quite there yet.
More later- glad to hear there are others interested in this!