-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Infrared Control
Since v0.8.2, infrared control from various IT remotes is supported for ESP8266 and since v0.9.0 for ESP32, too.
A dedicated infrared receiver module is required. (KY-022 or TSOP38238 are confirmed to work and inexpensive)
The default sensor pin is GPIO4. It can be changed in the Wled settings.
To use IR remote go to Settings
, Sync Interfaces
and change the value for Infrared receiver type
according to the IR remote type of the following list:
- white 24-key IR remote with R,G,B + 12 color-tones
- white 24-key IR remote with CT+ / CT- buttons
- blue 40-key IR remote with keys for 25%, 50%, 75% and 100%
- white 44-key IR remote with up/down arrows for the colors R,G and B
- white 21-key IR remote with R,G,B + 9 color-tones
- black 6-key IR remote with CH up/down + Vol up/down
- JSON IR - Easily configure and use any IR remote. New in 0.13, see kno.wled.ge.
Have a random remote laying around? Or a button on your TV remote that does nothing? You can make these compatible with WLED if they use a 38kHz carrier frequency like most IR remotes do.
Firstly, connect your ESP8266 to a PC and open the Arduino IDE serial monitor. Try pressing the button(s) you'd like to program. If your receiver is connected correctly, you should see something like this printed to the serial monitor:
IR recv
0xFFDE10
In this example, 0xFFDE10
is the infrared code in HEX. If you get 0xFFFFFFFF
, the same code was received multiple times - try only tapping the remote button for a very brief time.
Now, open the file ir_codes.h
and add your IR code by adding (for example) #define IRCUSTOM_MACRO1 0xFFDE10
.
Almost done! Open ir.cpp
and add your IR code into the switch
structure in the decodeIRCustom()
method. You should be able to follow the existing code to program your desired action. For example, you could do case IRCUSTOM_MACRO1: bri = 255; break;
to set maximum brightness.
- List of effects and palettes
- Macros & Button
- Multi strip
- Presets
- Segments
- Webserver sitemap
- Control a relay
- Blynk
- DMX Output
- E1.31 (DMX) / Art-Net
- UDP Realtime / tpm2.net
- HTTP Request API
- Infrared
- JSON API
- MQTT
- Philips hue sync
- WebSocket
- WLED UDP sync