Introduction: IR Remote Agent

Remote control is almost a standard accessory for most home applications, like TV, Hi-Fi, air conditioner and so on. Though remote control brings us leisure, when you really need it but have completely no clue where it is, or which one it is, you have every right to be pissed off. To solve the remote  clutter, IKEA may tell you to buy a remote storage bag, but believing in a geek spirit as us, we would tell you to stack up a hardware and download an app so that you can integrate all your remote commands into one Android device. Sounds like no bother to track and find the correct remote? Follow me and create one for yourself!
Check out how we used it to replace our air conditioner:

Step 1: How It Works and What We Need

Seeeduino plays a mailman role in this project. We added an infrared receiver on it, so that Seeeduino can get the command message from the remote. We added a bluetooth module on it, so that Seeeduino can talk with the Android panel we used here. And at last we added a  infrared emitter so that Seeeduino is capable of sending IR commands. Besides, to run up all these electricity consumers, we prepared a Lipo rider to handle the battery. You can find how all these devices look like on the first picture and the principle diagram on the second picture.

The whole process can be divided into 3 steps. They are:

1. Pair
   Pair the Android device to the serial bluetooth on Seeeduino. 
2. Study
   Aim the conditioner remote at the infrared receiver on Seeeduino. Press the target key on the remote, for example ON/OFF button, then the Android panel knows how to repeat the command.
3. Send
   Now aim the infrared emitter to the conditioner, press "send" button on the screen. The conditioner should be turned on or off.


Part List (including where you can find them and where to download the app and demo code):

1. Seeeduino V3.0
2. Grove - Base Shield
3. Grove - Infrared Emitter
4. Grove - Infrared Receiver
5. Grove - Serial Bluetooth
6. App & Demo Code(available on Github)
7. Arduino lib for IR remote(import this lib before you upload the demo code)
8. An Android Device(only panel now due to the high resolution picture)

Step 2: Pair-up

The panel need to gain approval from Seeeduino before they talk via Bluetooth. That agreement is pair-up.
Open the APP. Click the first button with a Bluetooth logo on, then a note will pop up for you to select device and enter PIN.

The default PIN is "0000", as the second picture.

Step 3: Study

Tap the second button on the screen. After that, point the remote to the infrared receiver. Press the key you want the panel to learn till you find meaage "Got it!" show up on the screen.

Step 4: Try It!

Now you should be ready to use this function.
Point the infrared emitter to the conditioner. Tap the third button on the screen. What happens to the conditioner? If it reacts to your command, congratulations! If not, back to the "Pair-up" step, and have these all over again.