This is an old revision of the document!
Xlights with ESP8266 as an Infrared Transmitter
WARNING: This article is going to be HUGE.. Huge Jerry .. Huge !!!
Terminology:
IR - Infrared
Hacks will be denoted by:
Target Audience: You got these cool piece of LED hardware (in my case, floodlights), and you want to control them with Xlights, but Don’t want to open them up, so you need to be able to control them with Xlights and IR.
Grabbing the IR Codes
NOTE: The setup is totally throw-away. You only need the IR codes
- Tools Needed:
- A computer
- A breadboard and some jumper wires
- An IR receiver module (Amazon)
- An arduino of some kind (I used the Nano Every - I could have probably used the ESP8266, but I didn’t want to)
- Arduino IDE
- Your piece of crap IR transmitter
Wiring the breadboard
EE people.. Please don’t beat up on me.. For the love of Pete. Arduino Sketch My sketch isn’t mine. It was written by someone FAR FAR smarter than me.. I have a slightly modified version of it here: https://github.com/mlivolsi63/Arduino-with-Infrared/blob/master/IR_nano_receive.ino
Once you have everything running, go to your serial monitor and record the hex codes. WARNING: Each transmitter will be different. For my reference, the codes were as follows:
| Color | Code |
|---|---|
| Red | 0xC |
| Yellow | 0x5E |
| Green | 0x4A |
| Blue | 0x42 |
| On | 0x47 |
| Off | 0x43 |
| Brighter | 0x45 |
| Dim | 0x46 |
| Red Built in Effect | 0x16 |
| Blue Built in Effect | 0x19 |
| Green Built in Effect | 0xD |
| Bright White | 0x1C |
| Cycle Colors | 0x40 |
| Teal | 0x15 |
| Orange | 0x7 |
Cool Feature: The sketch will give you the instructions on how to transmit




