diff --git a/wled00/html_settings.h b/wled00/html_settings.h
index e99c03c5..d6cf7490 100644
--- a/wled00/html_settings.h
+++ b/wled00/html_settings.h
@@ -189,7 +189,7 @@ const char PAGE_settings_sync[] PROGMEM = R"=====(
Sync setup
Button setup
On/Off button enabled:
-Infrared receiver type (0 = disabled):
+Infrared receiver type (0 = disabled):
IR info
WLED Broadcast
UDP Port:
diff --git a/wled00/ir_codes.h b/wled00/ir_codes.h
index dda33e7b..8c42126c 100644
--- a/wled00/ir_codes.h
+++ b/wled00/ir_codes.h
@@ -170,6 +170,29 @@
#define IR44_FADE3 0xFF609F //
#define IR44_FADE7 0xFFE01F //
+//Infrared codes for 21-key remote https://images-na.ssl-images-amazon.com/images/I/51NMA0XucnL.jpg
+#define IR21_BRIGHTER 0xFFE01F
+#define IR21_DARKER 0xFFA857
+#define IR21_OFF 0xFF629D
+#define IR21_ON 0xFFA25D
+#define IR21_RED 0xFF6897
+#define IR21_REDDISH 0xFF30CF
+#define IR21_ORANGE 0xFF10EF
+#define IR21_YELLOWISH 0xFF42BD
+#define IR21_GREEN 0xFF9867
+#define IR21_GREENISH 0xFF18E7
+#define IR21_TURQUOISE 0xFF38C7
+#define IR21_CYAN 0xFF4AB5
+#define IR21_BLUE 0xFFB04F
+#define IR21_DEEPBLUE 0xFF7A85
+#define IR21_PURPLE 0xFF5AA5
+#define IR21_PINK 0xFF52AD
+#define IR21_WHITE 0xFF906F
+#define IR21_FLASH 0xFFE21D
+#define IR21_STROBE 0xFF22DD
+#define IR21_FADE 0xFF02FD
+#define IR21_SMOOTH 0xFFC23D
+
#define COLOR_RED 0xFF0000
#define COLOR_REDDISH 0xFF7800
#define COLOR_ORANGE 0xFFA000
diff --git a/wled00/wled20_ir.ino b/wled00/wled20_ir.ino
index d602e4e1..d645ef2d 100644
--- a/wled00/wled20_ir.ino
+++ b/wled00/wled20_ir.ino
@@ -83,6 +83,7 @@ void decodeIR(uint32_t code)
case 2: decodeIR24CT(code); break; // white 24-key remote with CW, WW, CT+ and CT- keys
case 3: decodeIR40(code); break; // blue 40-key remote with 25%, 50%, 75% and 100% keys
case 4: decodeIR44(code); break; // white 44-key remote with color-up/down keys and DIY1 to 6 keys
+ case 5: decodeIR21(code); break; // white 21-key remote
default: return;
}
}
@@ -315,6 +316,35 @@ void decodeIR44(uint32_t code)
colorUpdated(2); //for notifier, IR is considered a button input
}
+void decodeIR21(uint32_t code)
+{
+ switch (code) {
+ case IR21_BRIGHTER: relativeChange(&bri, 10); break;
+ case IR21_DARKER: relativeChange(&bri, -10, 5); break;
+ case IR21_OFF: briLast = bri; bri = 0; break;
+ case IR21_ON: bri = briLast; break;
+ case IR21_RED: colorFromUint32(COLOR_RED); break;
+ case IR21_REDDISH: colorFromUint32(COLOR_REDDISH); break;
+ case IR21_ORANGE: colorFromUint32(COLOR_ORANGE); break;
+ case IR21_YELLOWISH: colorFromUint32(COLOR_YELLOWISH); break;
+ case IR21_GREEN: colorFromUint32(COLOR_GREEN); break;
+ case IR21_GREENISH: colorFromUint32(COLOR_GREENISH); break;
+ case IR21_TURQUOISE: colorFromUint32(COLOR_TURQUOISE); break;
+ case IR21_CYAN: colorFromUint32(COLOR_CYAN); break;
+ case IR21_BLUE: colorFromUint32(COLOR_BLUE); break;
+ case IR21_DEEPBLUE: colorFromUint32(COLOR_DEEPBLUE); break;
+ case IR21_PURPLE: colorFromUint32(COLOR_PURPLE); break;
+ case IR21_PINK: colorFromUint32(COLOR_PINK); break;
+ case IR21_WHITE: colorFromUint32(COLOR_WHITE); effectCurrent = 0; break;
+ case IR21_FLASH: if (!applyPreset(1)) effectCurrent = FX_MODE_COLORTWINKLE; break;
+ case IR21_STROBE: if (!applyPreset(2)) effectCurrent = FX_MODE_RAINBOW_CYCLE; break;
+ case IR21_FADE: if (!applyPreset(3)) effectCurrent = FX_MODE_BREATH; break;
+ case IR21_SMOOTH: if (!applyPreset(4)) effectCurrent = FX_MODE_RAINBOW; break;
+ default: return;
+ }
+ lastValidCode = code;
+ colorUpdated(2); //for notifier, IR is considered a button input
+}
void initIR()
{