{"id":24,"date":"2015-09-19T22:07:14","date_gmt":"2015-09-19T20:07:14","guid":{"rendered":"http:\/\/itay.mobi\/blog\/?p=24"},"modified":"2016-10-09T09:51:59","modified_gmt":"2016-10-09T07:51:59","slug":"hacking-mi-light-pairing-with-esp8266","status":"publish","type":"post","link":"https:\/\/itay.cc\/?p=24","title":{"rendered":"Hacking the Mi Light &#8211; Adding wifi with ESP8266"},"content":{"rendered":"<p>After Philips came out\u00a0with their <a href=\"http:\/\/www2.meethue.com\/en-us\/what-is-hue\/the-system\/\" target=\"_blank\">Hue<\/a>\u00a0few years ago, we started to see many<br \/>\n<span style=\"line-height: 1.5;\">Chinese bulbs with the same capabilities.<\/span><\/p>\n<p>Usually those bulbs connect to some kind of Hub at 2.4Ghz (not wifi), and from there<br \/>\n<span style=\"line-height: 1.5;\">the Hub is connected to the home network\u00a0and we can control those bubs from the smartphone,<br \/>\n<\/span><span style=\"line-height: 1.5;\">or you can buy a remote control that connects to the hub\/directly to the bulb.<\/span><\/p>\n<p>Those new Chinese bulbs are very cheap (about $10).<\/p>\n<p>Another thing that came out not long ago is the the ESP8266 &#8211; \u00a0a little SOC (system on a chip) that<br \/>\n<span style=\"line-height: 1.5;\">includes WiFi and a micro controller on the same chip, and it costs about 2-3$.<\/span><\/p>\n<p>A while ago I bought some modules back never got the time to play with them very much.<\/p>\n<p><a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_0361.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-44 size-large\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_0361-1024x768.jpg\" alt=\"\" width=\"700\" height=\"525\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_0361-1024x768.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_0361-300x225.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_0361.jpg 1200w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>So I&#8217;ve been thinking- why not taking\u00a0one of those cheap bulbs that has the capability to change colors,<br \/>\n<span style=\"line-height: 1.5;\">and replace its brain with an ESP8266 and control it from the web\/smartphone!<\/span><\/p>\n<p>Then, I bought a <a href=\"http:\/\/www.banggood.com\/E27-6W-RGBW-14-LED-450LM-LED-Spotlight-Dimmable-Bulb-lamp-85-265V-p-971552.html\" target=\"_blank\">Mi Light<\/a> light bulb from Banggood, and started exploring it.<br \/>\n<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/MI-LIIGHT_SMALL1.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-61 size-large\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/MI-LIIGHT_SMALL1-1024x768.jpg\" alt=\"\" width=\"700\" height=\"525\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/MI-LIIGHT_SMALL1-1024x768.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/MI-LIIGHT_SMALL1-300x225.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/MI-LIIGHT_SMALL1.jpg 1200w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>After a little playing and checking, \u00a0you can see in the photo above my findings.<br \/>\nThe Mi Light use a micro controller from STM to control the bulb,<br \/>\na Low Power 2.4Ghz Transceiver to communicate with the hub\/remote, a 3.3V voltage regulator,<br \/>\nand some transistors that controls the RGB and the WHITE leds (My guess: the white is MOS and the colors are BJT).<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Update 10\/9\/2016:<\/strong><\/p>\n<p>There is a mix between the Green and Red colors in the picture.<br \/>\nAlso, I made measurements for\u00a0the currents\u00a0of\u00a0each color:<\/p>\n<p>Blue: 87.6 [mA]<br \/>\nRed: 99.2 [mA]<br \/>\nGreen: 71.3 [mA]<br \/>\nWhite: 158.3 [mA]<\/p>\n<p>&nbsp;<br \/>\n(I don&#8217;t have the hub or the remote so it was a little tricky to find which transistor controls which led,<br \/>\nI assumed that the first one control the white one because it different type of transistor)<\/p>\n<p>After studying the Mi Light, I moved to the ESP8266.<\/p>\n<p>I chose the ESP-03 module because it was small and has many GPIOs from the chop that are available.<\/p>\n<p>The ESP-03 module header\u00a0are not standard, and I wanted to use the 1&#8243; header so I could pull<br \/>\nit form the Mi Light if I wand to update the firmware.<br \/>\n<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_2.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-26 size-medium aligncenter\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_2-300x222.jpg\" alt=\"IMG_2\" width=\"300\" height=\"222\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_2-300x222.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_2.jpg 979w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><br \/>\nSo apparently someone already found some nice way solder a 1&#8243; header to this module<br \/>\n<iframe loading=\"lazy\" width=\"700\" height=\"394\" src=\"https:\/\/www.youtube.com\/embed\/wBfCPHXtSSY?feature=oembed\" frameborder=\"0\" allowfullscreen><\/iframe><\/p>\n<p>&nbsp;<\/p>\n<p>And this is what came out<br \/>\n<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_3.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-27 size-medium aligncenter\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_3-300x298.jpg\" alt=\"IMG_3\" width=\"300\" height=\"298\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_3-300x298.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_3-150x150.jpg 150w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_3-1024x1015.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_3.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>&nbsp;<\/p>\n<p>Now I had to put it on a breadboard and start coding.<br \/>\nI connected some of the ESP GPIOs thru 200\u03a9 resistors to Red, Green, Blue and White LEDs,<br \/>\nand used a breadboard power supply to supply 3.3V to the ESP.<\/p>\n<p><a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_4.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-28 size-large\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_4-1024x539.jpg\" alt=\"IMG_4\" width=\"700\" height=\"368\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_4-1024x539.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_4-300x158.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_4.jpg 1200w\" sizes=\"auto, (max-width: 700px) 100vw, 700px\" \/><\/a><\/p>\n<p>I installed the &#8220;Unofficial Development Kit for Espressif ESP8266 &#8220;from here:<br \/>\nhttp:\/\/www.esp8266.com\/viewtopic.php?f=9&#038;t=820<br \/>\nAnd connected the ESP according to this (no RST in ESP-03)<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/github.com\/esp8266\/Arduino\/raw\/master\/doc\/ESP_to_serial.png\" alt=\"\" width=\"703\" height=\"345\" \/><br \/>\n<img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"http:\/\/fabacademy.org\/archives\/2015\/doc\/images\/esp-03.jpg\" alt=\"\" width=\"326\" height=\"230\" \/><br \/>\n(I took it schematic from <a href=\"https:\/\/github.com\/esp8266\/Arduino\/blob\/esp8266\/hardware\/esp8266com\/esp8266\/doc\/boards.md\" target=\"_blank\">here<\/a>\u00a0and ESP-03 image from <a href=\"http:\/\/fabacademy.org\/archives\/2015\/doc\/networking-esp8266.html\" target=\"_blank\">here<\/a>)<\/p>\n<p>And.. after few days of struggle with the code, I managed to something that was unstable and I was not happy with.<\/p>\n<p>So I tried the Arduino core for the ESP8266: \u00a0https:\/\/github.com\/esp8266\/Arduino<br \/>\nThis is very easy to work with, and in a few hours of learning I had something I was happy with.<\/p>\n<pre class=\"theme:arduino-ide toolbar:2 striped:false marking:false ranges:false nums:false nums-toggle:false lang:arduino decode:true\">#include &lt;ESP8266WiFi.h&gt;\r\n#include &lt;WiFiClient.h&gt;\r\n#include &lt;ESP8266WebServer.h&gt;\r\n#include &lt;ESP8266mDNS.h&gt;\r\n\r\nconst char *ssid = \"YOUR SSID\";\r\nconst char *password = \"YOUR PASSWORD\";\r\n\r\nESP8266WebServer server(80);\r\n\r\n\/\/Assign color to gpio\r\n#define rgbRED 12\r\n#define rgbGREEN 13\r\n#define rgbBLUE 2\r\n#define rgbWHITE 14\r\n\r\n\/\/RGB Struct\r\nstruct RGB {\r\n  byte r;\r\n  byte g;\r\n  byte b;\r\n  byte w;\r\n};\r\n\r\nRGB miColor;\r\n\r\n\/\/Update PWM according to the new values\r\nvoid updateLights()\r\n{\r\n  analogWrite(rgbRED, miColor.r);\r\n  analogWrite(rgbGREEN, miColor.g);\r\n  analogWrite(rgbBLUE, miColor.b);\r\n  analogWrite(rgbWHITE, miColor.w);\r\n}\r\n\r\n\/\/Handle main page\r\nvoid handleRoot() {\r\n  server.send(200, \"text\/plain\", \"Hello from Mi Light!\");\r\n}\r\n\r\n\/\/Handle color change\r\nvoid handleColorChange(){ \r\n  for (uint8_t i=0; i&lt;server.args(); i++){\r\n    switch (server.argName(i)[0])\r\n    {\r\n      case 'r':\r\n        miColor.r = server.arg(i).toInt();\r\n      break;\r\n      case 'g':\r\n        miColor.g = server.arg(i).toInt();\r\n      break;\r\n      case 'b':\r\n        miColor.b = server.arg(i).toInt();\r\n      break;\r\n      case 'w':\r\n        miColor.w = server.arg(i).toInt();\r\n      break;\r\n    }\r\n  }\r\n  \/\/Update the light with to the received data\r\n  updateLights();\r\n  \r\n  String message=\"Colors: \\r\\n\";\r\n  message += \"Red: \" + (String)miColor.r + \"\\r\\n\";\r\n  message += \"Green: \" + (String)miColor.g + \"\\r\\n\";\r\n  message += \"Blue: \" + (String)miColor.b + \"\\r\\n\";\r\n  message += \"White: \" + (String)miColor.w + \"\\r\\n\";\r\n  server.send(200, \"text\/plain\", message);\r\n  \r\n}\r\n\r\nvoid handleNotFound(){\r\n  String message = \"File Not Found\\n\\n\"; \r\n  server.send(404, \"text\/plain\", message);\r\n}\r\n\r\nvoid setup(void){\r\n\/\/Initialize starting color (only white on full power)  \r\n  miColor = (RGB){0,0,0,255};\r\n\r\n\/\/Initialize GPIO's as OUTPUT\r\n  pinMode(rgbRED, OUTPUT);\r\n  pinMode(rgbGREEN, OUTPUT);\r\n  pinMode(rgbBLUE, OUTPUT);\r\n  pinMode(rgbWHITE, OUTPUT);\r\n\r\n\/\/I use 8bit RGB color space, so we will limit the PWM to 255 (2^8)\r\n  analogWriteRange(255);\r\n\r\n\/\/Set the output to their initialized state (only white is on)\r\n  updateLights();\r\n\r\n \/\/Start the serial and connect to network\r\n  Serial.begin(115200);\r\n  WiFi.begin(ssid, password);\r\n  Serial.println(\"\");\r\n\r\n  \/\/ Wait for connection\r\n  while (WiFi.status() != WL_CONNECTED) {\r\n    delay(500);\r\n    Serial.print(\".\");\r\n  }\r\n  Serial.println(\"\");\r\n  Serial.print(\"Connected to \");\r\n  Serial.println(ssid);\r\n  Serial.print(\"IP address: \");\r\n  Serial.println(WiFi.localIP());\r\n\r\n  if (MDNS.begin(\"ESP_MiLight\")) {\r\n    Serial.println(\"MDNS responder started\");\r\n  }\r\n\r\n\/\/handle root page\r\n  server.on(\"\/\", handleRoot);\r\n\r\n\/\/To change the colors the esp will listen to data at http:\/\/host\/rgb\r\n  server.on(\"\/rgb\", handleColorChange);\r\n\r\n\/\/Handle path not found\r\n server.onNotFound(handleNotFound);\r\n\r\n  server.begin();\r\n  Serial.println(\"HTTP server started\");\r\n}\r\n\r\nvoid loop(void){\r\n  server.handleClient();\r\n}<\/pre>\n<p>How it works:<br \/>\nWhen the micro controller is booting &#8211; first it turns the white color by default, and then I&#8217;m starting a web sever.<br \/>\nThen, to change color &#8211; I&#8217;m\u00a0sending HTTP POST\/GET request to the ESP with all the values I want.<br \/>\nI&#8217;m using 8-bit color space, that means that each R-G-B color can have 255 values.<br \/>\nThis value represents the amount of that color: 0 &#8211; no color at all, 255 &#8211; maximum of that color.<br \/>\nIf you want to generate a pink color you will have:<br \/>\n<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/PINK.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-medium wp-image-30\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/PINK-300x124.png\" alt=\"PINK\" width=\"300\" height=\"124\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/PINK-300x124.png 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/PINK.png 315w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>For the White color, I used 255 options too that represents the lighting level.<\/p>\n<p>To control the amount of light of each led, the ESP generates <a href=\"https:\/\/en.wikipedia.org\/wiki\/Pulse-width_modulation\">PWM<\/a> signal<br \/>\nthat turn the light on and off very fast, and the average voltage that the LED gets is\u00a0decreased<br \/>\naccording the width of the pulse.<\/p>\n<p>So If I want only pink color, I will have to send the ESP this:<br \/>\n<strong>http:\/\/10.0.0.44\/rgb?r=255&amp;g=204&amp;b=229&amp;w=0<\/strong><br \/>\n(let&#8217;s say that for this example\u00a0ESP&#8217;s\u00a0IP address \u00a0is 10.0.0.44)<\/p>\n<p>&nbsp;<\/p>\n<p>Now that I have a working ESP, I need to take what I found about the Mi-Light and connect the ESP instead of the MCU.<\/p>\n<p>So first, I cut the voltage traces that goes to the STM MCU, and to the RF transitive (at the blue lines)<br \/>\n<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_5.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_5-1024x1018.jpg\" alt=\"\" width=\"309\" height=\"285\" \/><\/a><\/p>\n<p>Then I used 3.3V Voltage regulator that was on the board already, because the ESP takes 3.3V.<br \/>\nLater I found that this voltage regulator can deliver only 30mA and the ESP needs about 200-250mA max,<br \/>\nso I had to add one of my own, so basically you can just remove the old voltage regulator and then you don&#8217;t have to<br \/>\ncut the traces.<br \/>\nIt will also help you to connect to the board power supply (16V DC) and GND \u00a0from the top of the PCB (marked as VIN and GND),<br \/>\nand it will be neater\u00a0than the way\u00a0I did it (I made my connection from the back)<br \/>\n* You can connect to 16V power supply from the bottom-right connector (marked as 16V) too.<\/p>\n<p>To run the ESP it needs less connections than before (when I programmed it):<\/p>\n<p><a href=\"https:\/\/raw.githubusercontent.com\/esp8266\/Arduino\/master\/doc\/ESP_min.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" src=\"https:\/\/raw.githubusercontent.com\/esp8266\/Arduino\/master\/doc\/ESP_min.png\" width=\"464\" height=\"330\" \/><\/a><\/p>\n<p>(schematics from <a href=\"https:\/\/github.com\/esp8266\/Arduino\/blob\/master\/doc\/boards.md\">here<\/a>)<\/p>\n<p>And of course a 100uF capacitor from GND to 3V3.<br \/>\nI used\u00a0lm1117 voltage regulator because it&#8217;s small and what I had available.<\/p>\n<p>I built a little board\u00a0with a 100uF capacitor, 10k resistors and the lm1117\u00a0voltage regulator (not in the photo)<br \/>\n<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_81.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-49 size-medium\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_81-300x225.jpg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_81-300x225.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_81-1024x768.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_81.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_9.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-50\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_9-300x272.jpg\" alt=\"\" width=\"249\" height=\"226\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_9-300x272.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_9-1024x929.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_9.jpg 1200w\" sizes=\"auto, (max-width: 249px) 100vw, 249px\" \/><\/a><\/p>\n<p>This PCB gets from a regulator that inside the bulb 16V DC and this regulator should handle\u00a0this.<\/p>\n<p>Before connecting the new board &#8211; \u00a0desolder the old Antenna, we have no use<br \/>\nfor it now and we will have no room for the new board we made.<\/p>\n<p>Then, I connected the GPIO to the transistors:<br \/>\n12 &#8211; RED<br \/>\n13 &#8211; GREEN<br \/>\n2 \u00a0 &#8211; Blue<br \/>\n14 &#8211; White<\/p>\n<p>The red, green and blue are were connected before the 2.2k resistor (refer to the first image),<br \/>\nthe white was connected after the 100k resistor and was connected the the gate of the transistor.<\/p>\n<p><a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_8.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-32 size-medium\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_8-300x219.jpg\" alt=\"IMG_8\" width=\"300\" height=\"219\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_8-300x219.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_8-1024x748.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_8.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> \u00a0<a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_6.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-34 size-medium\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_6-300x225.jpg\" alt=\"IMG_6\" width=\"300\" height=\"225\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_6-300x225.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_6-1024x768.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_6.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a> <a href=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_7.jpg\" target=\"_blank\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-33 size-medium\" src=\"http:\/\/itay.mobi\/blog\/wp-content\/uploads\/2015\/09\/IMG_7-300x223.jpg\" alt=\"IMG_7\" width=\"300\" height=\"223\" srcset=\"https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_7-300x223.jpg 300w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_7-1024x762.jpg 1024w, https:\/\/itay.cc\/wp-content\/uploads\/2015\/09\/IMG_7.jpg 1200w\" sizes=\"auto, (max-width: 300px) 100vw, 300px\" \/><\/a><\/p>\n<p>Well.. it worked and then I fried\u00a0the ESP \ud83d\ude41<br \/>\nI need to work on my soldering and practice a little more, because I had a short somewhere.<br \/>\nWhen\u00a0I moved it while it was working &#8211; I created a short somewhere &#8211; and this is the end.<br \/>\nNow I&#8217;m waiting for a new ESP-03.<br \/>\nI will update when it arrives.<\/p>\n<p>Next on this project:<br \/>\nBuild a phone app to control the lights, and connect it the the phone notifications &#8211;<br \/>\nwhen I get a whatsApp message &#8211; the light will turn green etc..<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After Philips came out\u00a0with their Hue\u00a0few years ago, we started to see many Chinese bulbs with the same capabilities. Usually those bulbs connect to some kind of Hub at 2.4Ghz (not wifi), and from there the Hub is connected to the home network\u00a0and we can control those bubs from the smartphone, or you can buy &#8230;<br \/><a class=\"btn btn-primary btn-sm read-more\" href=\"https:\/\/itay.cc\/?p=24\" role=\"button\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":33,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[12,20,19,15,13,16,14,18,17],"class_list":{"0":"post-24","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","6":"hentry","7":"category-uncategorized","8":"tag-esp826","9":"tag-hacking","10":"tag-light-bulb","11":"tag-light-hack","12":"tag-mi-light","13":"tag-rgb-light","14":"tag-wifi","15":"tag-wifi-bulb","16":"tag-wifi-lamp","18":"row panel panel-primary"},"_links":{"self":[{"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/posts\/24","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/itay.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=24"}],"version-history":[{"count":34,"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions"}],"predecessor-version":[{"id":78,"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/posts\/24\/revisions\/78"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itay.cc\/index.php?rest_route=\/wp\/v2\/media\/33"}],"wp:attachment":[{"href":"https:\/\/itay.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itay.cc\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itay.cc\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}