From ece5da847e7a90ba54f35eb066283f538cd091ff Mon Sep 17 00:00:00 2001 From: sillyfrog <816454+sillyfrog@users.noreply.github.com> Date: Wed, 29 Aug 2018 11:34:33 +1000 Subject: [PATCH] How to use the IR Remote with rules --- MagicHome-LED-strip-controller.md | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/MagicHome-LED-strip-controller.md b/MagicHome-LED-strip-controller.md index cd58394a..3fdd004f 100644 --- a/MagicHome-LED-strip-controller.md +++ b/MagicHome-LED-strip-controller.md @@ -55,6 +55,18 @@ Due to variants, you can configure: - GPIO13 - This pin is not used on RGB board (so you'll leave it as "None"), but on RGBW, it's driving another channel (cold white or warm white) for LED strip. -Variant without Rx/Tx pads: +## Variant without Rx/Tx pads: + -![](https://raw.githubusercontent.com/wiki/xoseperez/espurna/images/flashing/ledcontroller-20-flash.jpg) + +## Using the IRrecv (IR Remote) feature + +If you have a variant with an IR Remote (as per the opening picture), you can use the new `rule` command to make the remote buttons change the light levels. For example, this rule allows me to turn it on and off, change the brightness, and turn it on to full white: + +``` +mosquitto_pub -t 'cmnd/light/rule1' -m 'on IrReceived#Data=FFF807 do power OFF endon on IrReceived#Data=FFB04F do WAKEUP endon on IrReceived#Data=FF906F do dimmer + endon on IrReceived#Data=FFB847 do dimmer - endon on IrReceived#Data=FFA857 do color #000000ff endon' +``` + +The hex codes for the "Data" value come from the data tag when looking at the JSON sent via MQTT. From here you can program it to do what ever you want. See here for more details: https://github.com/arendst/Sonoff-Tasmota/wiki/Rules + ![](https://i.imgur.com/AWXrYTp.jpg) \ No newline at end of file