{"id":46130,"date":"2017-11-18T12:02:57","date_gmt":"2017-11-18T12:02:57","guid":{"rendered":"http:\/\/randomnerdtutorials.com\/?p=46130"},"modified":"2020-03-05T01:30:39","modified_gmt":"2020-03-05T01:30:39","slug":"node-red-with-xiaomi-yeelight-rgbw-smart-bulb","status":"publish","type":"post","link":"https:\/\/randomnerdtutorials.com\/node-red-with-xiaomi-yeelight-rgbw-smart-bulb\/","title":{"rendered":"Node-RED with Xiaomi Yeelight RGBW Smart Bulb"},"content":{"rendered":"<p>Xiaomi Yeelight is a Wi-Fi smart RGBW LED bulb that you can integrate with Node-RED. So, in this project we\u2019re going to show you how to build a web application with Node-RED and Raspberry Pi to control the Yeelight lamp.<!--more--><\/p>\n<p><img data-recalc-dims=\"1\" fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter wp-image-46191\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Yeelight-with-Node-RED-thumbnail.jpg?resize=701%2C394&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"701\" height=\"394\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Yeelight-with-Node-RED-thumbnail.jpg?w=1280&amp;quality=100&amp;strip=all&amp;ssl=1 1280w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Yeelight-with-Node-RED-thumbnail.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Yeelight-with-Node-RED-thumbnail.jpg?resize=768%2C432&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Yeelight-with-Node-RED-thumbnail.jpg?resize=1024%2C576&amp;quality=100&amp;strip=all&amp;ssl=1 1024w\" sizes=\"(max-width: 701px) 100vw, 701px\" \/><\/p>\n<p><em><strong>Note<\/strong>: If you have any trouble following this tutorial, you can follow <a href=\"https:\/\/randomnerdtutorials.com\/node-red-with-xiaomi-mijia-bedside-lamp\/\" target=\"_blank\" rel=\"noopener noreferrer\">this one instead<\/a>, that is also compatible with the Xiaomi Yeelight Smart bulb:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/node-red-with-xiaomi-mijia-bedside-lamp\/\" target=\"_blank\" rel=\"noopener noreferrer\">Node-RED with Xiaomi Mijia Bedside Lamp<\/a><\/em><\/p>\n<h2>Watch the video demonstration<\/h2>\n<p style=\"text-align:center\"><iframe width=\"720\" height=\"405\" src=\"https:\/\/www.youtube.com\/embed\/uIP99Arls0U?rel=0\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p><span style=\"font-weight: 400;\">If you want to learn more about the Xiaomi Yeelight specifications and how it works with the official app, go to <a href=\"https:\/\/makeradvisor.com\/xiaomi-yeelight-rgbw-smart-bulb-review\/\" target=\"_blank\" rel=\"noopener noreferrer\">Maker Advisor to read our review<\/a>.<\/span><\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>You should be familiar with the Raspberry Pi \u2013\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-raspberry-pi\/\" target=\"_blank\" rel=\"noopener noreferrer\">read Getting Started with Raspberry Pi<\/a>.<\/li>\n<li>You should have the Raspbian operating system installed in your Raspberry Pi \u2013\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/installing-raspbian-lite-enabling-and-connecting-with-ssh\/\">read Installing Raspbian Lite, Enabling and Connecting with SSH<\/a>.<\/li>\n<li>You need\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-node-red-on-raspberry-pi\/\">Node-RED installed on your Pi<\/a>\u00a0and\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/getting-started-with-node-red-dashboard\/\">Node-RED Dashboard<\/a>.<\/li>\n<\/ul>\n<p>If you like home automation and you want to learn more about Node-RED, Raspberry Pi, ESP8266 and Arduino. I recommend that you download my course:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/build-a-home-automation-system-for-100\/\" target=\"_blank\" rel=\"noopener noreferrer\">Build a Home Automation System with Node-RED, ESP8266 and Arduino<\/a>.<\/p>\n<h2>Project overview<\/h2>\n<p>Here\u2019s some important aspects about the Node-RED application built in this project:<\/p>\n<ul>\n<li>The Xiaomi Yeelight Smart Wi-Fi Bulb will be controlled using the Yeelight node that you need to install;<\/li>\n<li>In the application, you have a color picker or a drop-down menu to change the bulb color;<\/li>\n<li>The application also allows you to change the temperature and brightness;<\/li>\n<li>Finally, you have the &#8220;Toggle&#8221; button. This means that if you press that button when the lamp is on, the lamp turns off and vice versa.<\/li>\n<\/ul>\n<h2>Parts required<\/h2>\n<p><a href=\"https:\/\/www.gearbest.com\/smart-lighting\/pp_361555.html?lkid=11957492\" target=\"_blank\" rel=\"noopener noreferrer\"><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-46169\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-lamp-bulb.jpg?resize=550%2C300&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"550\" height=\"300\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-lamp-bulb.jpg?w=550&amp;quality=100&amp;strip=all&amp;ssl=1 550w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-lamp-bulb.jpg?resize=300%2C164&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<ul>\n<li><a href=\"https:\/\/makeradvisor.com\/tools\/raspberry-pi-board\/\" target=\"_blank\" rel=\"noopener noreferrer\">Raspberry Pi Board<\/a>\u00a0\u00a0\u2013 read\u00a0<a href=\"https:\/\/makeradvisor.com\/best-raspberry-pi-3-starter-kits\/\" target=\"_blank\" rel=\"noopener noreferrer\">Best Raspberry Pi Starter Kits<\/a><\/li>\n<li><a href=\"https:\/\/www.gearbest.com\/smart-lighting\/pp_361555.html?lkid=11957492\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Xiaomi Yeelight Smart Bulb RGBW &#8211; E27 AC220V<\/strong><\/a><strong>\u00a0<\/strong>&#8211; <a href=\"https:\/\/makeradvisor.com\/xiaomi-yeelight-rgbw-smart-bulb-review\/\" target=\"_blank\" rel=\"noopener noreferrer\">read full review<\/a><\/li>\n<\/ul>\n<p>You can use the preceding links or go directly to <a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\">MakerAdvisor.com\/tools<\/a> to find all the parts for your projects at the best price!<\/p><p style=\"text-align:center;\"><a href=\"https:\/\/makeradvisor.com\/tools\/?utm_source=rnt&utm_medium=post&utm_campaign=post\" target=\"_blank\"><img data-recalc-dims=\"1\" decoding=\"async\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/10\/header-200.png?w=1200&#038;quality=100&#038;strip=all&#038;ssl=1\"><\/a><\/p>\n<h2>Enabling LAN Control<\/h2>\n<p><span style=\"font-weight: 400;\">Having the Yeelight bulb connected to your router, you have to go to your Yeelight app and enable the LAN Control. <\/span><\/p>\n<p><span style=\"font-weight: 400;\">1) Select the Yeelight Color Bulb:<\/span><\/p>\n<p><img data-recalc-dims=\"1\" decoding=\"async\" class=\"aligncenter size-full wp-image-46141\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155833.jpg?resize=550%2C311&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"550\" height=\"311\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155833.jpg?w=550&amp;quality=100&amp;strip=all&amp;ssl=1 550w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155833.jpg?resize=300%2C170&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>2) Open the bottom right menu and choose the LAN Control option:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46131\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155844.jpg?resize=528%2C650&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"528\" height=\"650\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155844.jpg?w=528&amp;quality=100&amp;strip=all&amp;ssl=1 528w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155844.jpg?resize=244%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 244w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><\/p>\n<p>3) Tap the enable button:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46132\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155854.jpg?resize=550%2C692&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"550\" height=\"692\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155854.jpg?w=550&amp;quality=100&amp;strip=all&amp;ssl=1 550w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Screenshot_20171116-155854.jpg?resize=238%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 238w\" sizes=\"(max-width: 550px) 100vw, 550px\" \/><\/p>\n<p>After that your Node-RED flow can interact with the Yeelight bulb. You can find the documentation of the Yeelight app <a href=\"https:\/\/www.yeelight.com\/en_US\/developer\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/p>\n<h2>Installing the yeelight Node-RED node<\/h2>\n<p>To control the Yeelight with Node-RED, first you need to install <strong>node-red-contrib-yeelight<\/strong>. In the Terminal window type the following (this may take a few seconds to complete):<\/p>\n<pre>pi@raspberrypi:~ $ <strong>node-red-stop<\/strong>\npi@raspberrypi:~ $ <strong>cd ~\/.node-red<\/strong>\npi@raspberrypi:~\/.node-red $ <strong>npm install node-red-contrib-yeelight<\/strong><\/pre>\n<h2>Starting Node-RED<\/h2>\n<p>To start Node-RED, enter the following in the Terminal window:<\/p>\n<pre>pi@raspberrypi:~ $ <strong>node-red-start<\/strong><\/pre>\n<p>To access Node-RED, open a tab in any browser on the local network and type the following:<\/p>\n<pre>http:\/\/<span style=\"color: #ff0000;\"><strong>Your_RPi_IP_address<\/strong><\/span>:1880<\/pre>\n<p>You should replace\u00a0<strong>Your_RPi_IP_address<\/strong>\u00a0with your Raspberry Pi IP address. If you don\u2019t know your Raspberry Pi IP address, in the Terminal enter:<\/p>\n<pre>pi@raspberrypi:~ $ <strong>hostname -I\n<\/strong><\/pre>\n<h2>Creating the Node-RED Flow<\/h2>\n<p>Before creating the flow, make sure you have the\u00a0<strong>yeelight<\/strong>\u00a0node, as show in the figure below. If you don\u2019t have the node, check that you\u2019ve followed the instructions above in the\u00a0<strong>Installing the yeelight Node-RED node<\/strong>\u00a0section.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46136\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-node.png?resize=153%2C94&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"153\" height=\"94\" \/><\/p>\n<p>Here\u2019s the flow to control the Xiaomi Yeelight bulb.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-46140 aligncenter\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/nod-red-flow.png?resize=566%2C231&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"566\" height=\"231\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/nod-red-flow.png?w=566&amp;quality=100&amp;strip=all&amp;ssl=1 566w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/nod-red-flow.png?resize=300%2C122&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 566px) 100vw, 566px\" \/><\/p>\n<p>As this flow is a bit complex, we recommend importing the flow we provide instead of building it from scratch. Then, you can make modifications to the flow, if necessary.<\/p>\n<h3>Importing the Node-RED flow<\/h3>\n<p>To import the Node-RED flow provided, go to the\u00a0<a href=\"https:\/\/raw.githubusercontent.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/master\/Projects\/Node-RED_Yeelight_flow.txt\" target=\"_blank\" rel=\"noopener noreferrer\">GitHub repository<\/a>\u00a0or click the figure below to see the raw file, and copy the code provided.<\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/master\/Projects\/Node-RED_Yeelight_flow.txt\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-62667 size-full\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-node-red-import.png?resize=988%2C98&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"988\" height=\"98\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-node-red-import.png?w=988&amp;quality=100&amp;strip=all&amp;ssl=1 988w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-node-red-import.png?resize=300%2C30&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-node-red-import.png?resize=768%2C76&amp;quality=100&amp;strip=all&amp;ssl=1 768w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-node-red-import.png?resize=975%2C98&amp;quality=100&amp;strip=all&amp;ssl=1 975w\" sizes=\"(max-width: 988px) 100vw, 988px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/RuiSantosdotme\/Random-Nerd-Tutorials\/master\/Projects\/Node-RED_Yeelight_flow.txt\" target=\"_blank\" rel=\"noopener noreferrer\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-45986 size-full\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/flow-code.png?resize=991%2C96&amp;ssl=1\" sizes=\"(max-width: 991px) 100vw, 991px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/flow-code.png?w=991 991w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/flow-code.png?resize=300%2C29 300w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/flow-code.png?resize=768%2C74 768w\" alt=\"\" width=\"750\" height=\"73\" \/><\/a><\/p>\n<p>Next, in the Node-RED window, at the top right corner, select the menu, and go to\u00a0<strong>Import\u00a0<\/strong>\u00a0&gt;\u00a0<strong>Clipboard<\/strong>.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-45987\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes.png?resize=523%2C291&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"523\" height=\"291\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes.png?w=523&amp;quality=100&amp;strip=all&amp;ssl=1 523w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes.png?resize=300%2C167&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 523px) 100vw, 523px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-45987\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes.png?resize=523%2C291&amp;ssl=1\" sizes=\"(max-width: 523px) 100vw, 523px\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes.png?w=523 523w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes.png?resize=300%2C167 300w\" alt=\"\" width=\"523\" height=\"291\" \/><\/p>\n<p>Then, paste the code provided and click\u00a0<strong>Import<\/strong>.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-51645\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/01\/node-red-import-flow.png?resize=503%2C337&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"503\" height=\"337\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/01\/node-red-import-flow.png?w=503&amp;quality=100&amp;strip=all&amp;ssl=1 503w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2018\/01\/node-red-import-flow.png?resize=300%2C201&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 503px) 100vw, 503px\" \/><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-45988\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes-2.png?resize=500%2C337&amp;ssl=1\" sizes=\"(max-width: 500px) 100vw, 500px\" srcset=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes-2.png?w=500 500w, https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/import-nodes-2.png?resize=300%2C202 300w\" alt=\"\" width=\"500\" height=\"337\" \/><\/p>\n<h2>Adding your Yeelight&#8217;s IP address<\/h2>\n<p>In order to retrieve the Yeelight IP address, you can use the an IP scanner like Advanced IP Scanner or <a href=\"http:\/\/angryip.org\/download\/\" target=\"_blank\" rel=\"noopener noreferrer\">Angry IP Scanner<\/a>.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46139\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/ip-scanner.png?resize=668%2C286&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"668\" height=\"286\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/ip-scanner.png?w=668&amp;quality=100&amp;strip=all&amp;ssl=1 668w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/ip-scanner.png?resize=300%2C128&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 668px) 100vw, 668px\" \/><\/p>\n<p>In my case, the Yeelight&#8217;s IP address is 192.168.1.131. Double-click one of the Yeelight&#8217;s nodes:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46150\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/nod-red-flow-open-yeelight-node.png?resize=570%2C240&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"570\" height=\"240\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/nod-red-flow-open-yeelight-node.png?w=570&amp;quality=100&amp;strip=all&amp;ssl=1 570w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/nod-red-flow-open-yeelight-node.png?resize=300%2C126&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 570px) 100vw, 570px\" \/><\/p>\n<p>Open the config node:<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46133\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-color-picker.png?resize=492%2C408&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"492\" height=\"408\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-color-picker.png?w=492&amp;quality=100&amp;strip=all&amp;ssl=1 492w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-color-picker.png?resize=300%2C249&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 492px) 100vw, 492px\" \/><\/p>\n<p>Type your Yeelight&#8217;s IP address (leave the default port number 55443):<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46134\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-config-node.png?resize=491%2C195&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"491\" height=\"195\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-config-node.png?w=491&amp;quality=100&amp;strip=all&amp;ssl=1 491w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-config-node.png?resize=300%2C119&amp;quality=100&amp;strip=all&amp;ssl=1 300w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/yeelight-config-node.png?resize=250%2C100&amp;quality=100&amp;strip=all&amp;ssl=1 250w\" sizes=\"(max-width: 491px) 100vw, 491px\" \/><\/p>\n<h2>Node-RED UI<\/h2>\n<p>After making all the necessary changes, click the\u00a0<strong>Deploy<\/strong>\u00a0button to save all the changes.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-40013\" src=\"https:\/\/i2.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/06\/11_deploy_button.png?resize=138%2C40&amp;ssl=1\" alt=\"\" width=\"138\" height=\"40\" \/><\/p>\n<p>Now, you Node-RED application is ready. To access Node-RED UI and see how your application looks, access any browser in your local networks and type:<\/p>\n<pre>http:\/\/<span style=\"color: #ff0000;\"><strong>Your_RPi_IP_address:1880<\/strong><\/span>\/ui<\/pre>\n<p>Your application should look as in the following figure.<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46137\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/dashboard-yeelight.png?resize=512%2C667&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"512\" height=\"667\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/dashboard-yeelight.png?w=512&amp;quality=100&amp;strip=all&amp;ssl=1 512w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/dashboard-yeelight.png?resize=230%2C300&amp;quality=100&amp;strip=all&amp;ssl=1 230w\" sizes=\"(max-width: 512px) 100vw, 512px\" \/><\/p>\n<p>Here&#8217;s a quick demonstration (for the full demonstration see the video at the beginning of the post):<\/p>\n<p><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-46168\" src=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/node-red-yeelight-demo-img.jpg?resize=600%2C337&#038;quality=100&#038;strip=all&#038;ssl=1\" alt=\"\" width=\"600\" height=\"337\" srcset=\"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/node-red-yeelight-demo-img.jpg?w=600&amp;quality=100&amp;strip=all&amp;ssl=1 600w, https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/node-red-yeelight-demo-img.jpg?resize=300%2C169&amp;quality=100&amp;strip=all&amp;ssl=1 300w\" sizes=\"(max-width: 600px) 100vw, 600px\" \/><\/p>\n<h2>Wrapping up<\/h2>\n<p>In this project we\u2019ve made a Node-RED application to control the Xiaomi Yeelight. We hope you\u2019ve liked this project, and have fun controlling your LED lamp.<\/p>\n<p><em><strong>Note<\/strong>: If you have any trouble following this tutorial, you can follow <a href=\"https:\/\/randomnerdtutorials.com\/node-red-with-xiaomi-mijia-bedside-lamp\/\" target=\"_blank\" rel=\"noopener noreferrer\">this one instead<\/a>, that is also compatible with the Xiaomi Yeelight Smart bulb:\u00a0<a href=\"https:\/\/randomnerdtutorials.com\/node-red-with-xiaomi-mijia-bedside-lamp\/\" target=\"_blank\" rel=\"noopener noreferrer\">Node-RED with Xiaomi Mijia Bedside Lamp<\/a><\/em><\/p>\n<p>If you like this project, you may also like:<\/p>\n<ul>\n<li><a href=\"https:\/\/makeradvisor.com\/xiaomi-yeelight-rgbw-smart-bulb-review\/\" target=\"_blank\" rel=\"noopener noreferrer\">Xiaomi Yeelight RGBW Smart Bulb Review<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/node-red-with-ws2812b-addressable-rgb-led-strip\/\">Node-RED with WS2812B Addressable RGB LED Strip<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/best-led-strip-for-your-project\/\" target=\"_blank\" rel=\"noopener noreferrer\">What\u2019s the Best LED Strip For Your Project?<\/a><\/li>\n<li><a href=\"https:\/\/randomnerdtutorials.com\/build-a-home-automation-system-for-100\/\" target=\"_blank\" rel=\"noopener noreferrer\">Build a Home Automation System with Node-RED<\/a><\/li>\n<\/ul>\n<p>Thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Xiaomi Yeelight is a Wi-Fi smart RGBW LED bulb that you can integrate with Node-RED. So, in this project we\u2019re going to show you how to build a web application &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Node-RED with Xiaomi Yeelight RGBW Smart Bulb\" class=\"read-more button\" href=\"https:\/\/randomnerdtutorials.com\/node-red-with-xiaomi-yeelight-rgbw-smart-bulb\/#more-46130\" aria-label=\"Read more about Node-RED with Xiaomi Yeelight RGBW Smart Bulb\">CONTINUE READING \u00bb<\/a><\/p>\n","protected":false},"author":1,"featured_media":46191,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[304,273,264,268,190,192],"tags":[],"class_list":["post-46130","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-0-home-automation","category-node-red","category-project","category-raspberry-pi-project","category-raspberry-pi","category-r-tutorials"],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/randomnerdtutorials.com\/wp-content\/uploads\/2017\/11\/Yeelight-with-Node-RED-thumbnail.jpg?fit=1280%2C720&quality=100&strip=all&ssl=1","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/46130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/comments?post=46130"}],"version-history":[{"count":0,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/posts\/46130\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media\/46191"}],"wp:attachment":[{"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/media?parent=46130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/categories?post=46130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/randomnerdtutorials.com\/wp-json\/wp\/v2\/tags?post=46130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}