{"id":3181,"date":"2023-09-25T09:25:32","date_gmt":"2023-09-25T14:25:32","guid":{"rendered":"https:\/\/lab.rapternet.us\/?p=3181"},"modified":"2023-08-14T10:07:38","modified_gmt":"2023-08-14T15:07:38","slug":"ir-remote-with-wled","status":"publish","type":"post","link":"https:\/\/lab.rapternet.us\/?p=3181","title":{"rendered":"IR Remote with WLED"},"content":{"rendered":"\n<p>I do small experiments from time to time to try out features or functionality before building them into a project (or project design even). In this case I wanted to try out the IR functionality in WLED for a project that may not have WiFi for access to the full fledged WLED feature set.<\/p>\n\n\n\n<!--more-->\n\n\n\n<p>The <a href=\"https:\/\/kno.wled.ge\/interfaces\/infrared\/\" target=\"_blank\" rel=\"noreferrer noopener\">WLED wiki page on the infrared<\/a> interface makes it seem pretty simple to start out with, and that impression is 100% correct. They do make it dirt simple to integrate in and utilize.<\/p>\n\n\n\n<p>Let&#8217;s start out by reiterating the warning on the WLED wiki:<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p>IR receiving will not work on ESP8266 if you use any LED pin other than GPIO 1, 2, or 3 for <em>digital<\/em> LED strips.<\/p>\n<\/blockquote>\n\n\n\n<p>Since all my controllers so far have been ESP8266 based, we&#8217;ll be following that guidance. I drew up a quick diagram for the wiring below.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"380\" height=\"240\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/ir-wled.png\" alt=\"\" class=\"wp-image-3201\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/ir-wled.png 380w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/ir-wled-300x189.png 300w\" sizes=\"auto, (max-width: 380px) 100vw, 380px\" \/><figcaption class=\"wp-element-caption\">Circuit Diagram<\/figcaption><\/figure>\n<\/div>\n\n\n<p>I used a large extension wire group because that&#8217;s what I had, but I&#8217;m only using 3 of the connections. I hooked up my controller following the guide and everything worked out of the box after configuring WLED.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/P_20230731_163051-1024x768.jpg\" alt=\"\" class=\"wp-image-3222\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/P_20230731_163051-1024x768.jpg 1024w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/P_20230731_163051-300x225.jpg 300w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/P_20230731_163051-768x576.jpg 768w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/P_20230731_163051-1536x1152.jpg 1536w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/08\/P_20230731_163051-2048x1536.jpg 2048w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/figure>\n\n\n\n<p>I found the IR settings in the settings LED preferences menu option. Here I could set the IR data pin to GPIO4 to match my connection point. I also selected the 24 key remote to match the one I had laying around.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"472\" height=\"280\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/image-7.png\" alt=\"\" class=\"wp-image-3197\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/image-7.png 472w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/image-7-300x178.png 300w\" sizes=\"auto, (max-width: 472px) 100vw, 472px\" \/><figcaption class=\"wp-element-caption\">Settings -&gt; LED Preferences<\/figcaption><\/figure>\n<\/div>\n\n\n<p>Things just worked after that. I did find that Flash\/Fade\/Strobe\/Smooth buttons activated presets, so I added a few presets to experiment with for that. <\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"322\" height=\"289\" src=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/image-5.png\" alt=\"\" class=\"wp-image-3191\" srcset=\"https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/image-5.png 322w, https:\/\/lab.rapternet.us\/wp-content\/uploads\/2023\/07\/image-5-300x269.png 300w\" sizes=\"auto, (max-width: 322px) 100vw, 322px\" \/><figcaption class=\"wp-element-caption\">Presets from 1 to 4 controllable by the ir remote<\/figcaption><\/figure>\n<\/div>\n\n\n<p>The main outcome I found is that I needed at least one preset for a solid single color in order to let the other color buttons work again. Those buttons didn&#8217;t auto swap the WLED option to solid off the patterns I had set in the presets (so just keep one boring preset along with 3 fun ones).<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Conclusion<\/h2>\n\n\n\n<p>My test subject running the IR receiver worked out reasonably well. The remote didn&#8217;t have the best range and the receiver didn&#8217;t have the best field of view. But considering that this was a demo unit to see if everything would work, well it passed with flying colors. I have a large project that should be able to move forward with using the IR functionality.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Resources<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/kno.wled.ge\/interfaces\/infrared\/\">WLED Wiki on IR Remotes<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/learn.adafruit.com\/neopixel-remote-ir-control-with-wled\/overview\" target=\"_blank\" rel=\"noreferrer noopener\">Adafruit article on the IR interface<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I do small experiments from time to time to try out features or functionality before building them into a project (or project design even). In this case I wanted to try out the IR functionality in WLED for a project that may not have WiFi for access to the full fledged WLED feature set.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[39,14,49,58],"class_list":["post-3181","post","type-post","status-publish","format-standard","hentry","category-how-to","tag-home-assistant","tag-quick-bites","tag-smart-home","tag-wled"],"_links":{"self":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/3181","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3181"}],"version-history":[{"count":14,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/3181\/revisions"}],"predecessor-version":[{"id":3282,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=\/wp\/v2\/posts\/3181\/revisions\/3282"}],"wp:attachment":[{"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3181"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3181"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lab.rapternet.us\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3181"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}