$12 AI Light ESP8266 based WiFi RGB Light Bulb Supports MQTT via ESPurna Open Source Firmware

AI-Thinker is famous in the maker world for their ESP8266 modules, but they’ve also recently launched a WiFi RGB light bulb that sells for about $12.5 and up on eBay and Aliexpress. Some people noticed, and bought samples online, including Xose Pérez (aka Tinkerman), ESPurna open-source firmware developer, who could confirm ESP8266 was used in the light bulb, did some investigations, and eventually added the light bulb into ESPurna, which means it can be managed using MQTT or a web interface.

AI Light looks very similar to Philips Hue, but comes with WiFi instead of Zigbee. AI Light “M1636” key features:

  • RGBW LED E27 bulb with 16.7M colors
  • Connectivity – 802.11 b/g/n WiFi
  • Encryption – AES
  • Voltage Range – 110-240V
  • LED Power – 5 watts
  • WiFi Power Consumption – ≤0.3W
  • Temperature Range – -5~45degree
  • Humidity – ≤80%
  • Certifications – FCC, CE, ROHS

If you’re going to use the stock firmware, you can control the LED with Tuyasmart Android app. You’ll find the user’s manual and more photos on the FCC page for the light bulb. But there are already plenty of Wifi light bulbs on the market,  and what makes this light bulb interesting is that it’s based on ESP8266, and you can have full control over it using open source firmware.

The bulb cap is allegedly very easy to pop out, as it’s not glued to the board.A close up on the board itself reveals it’s indeed powered by Espressif ESP8266EX WiSoC connected to a 1MB Winbond 25Q80BVSIG flash, and MY-Semi MY9291QD LED driver.

Click to Enlarge

If you look from the bottom left to middle left of the inner circle, you’ll see 3V3, GND, RX, TX and IOO pads, which we can use after soldering some wires, and connect a USB to TTL board in order to flash the firmware. Note that IOO must be connected the GND to enter flash mode, you can remove the wire after flashing, in order to check the serial output during a normal boot.

After further investigation, Xose found out that there’s already some software implementation for MY9291 driver in Noduino OpenLight project, made by the developers who designed Noduino ESP8266/ ESP32 boards, and are likely the developers of AI Light. All needed source code can be found in Noduino-SDK released under a GPLv3 license, and includes a driver written in C language for MY9291 LED driver chip. Xose wrote a wrapper to make the driver work with Arduino ESP8266, and released the code on Github.

The code sample below shows how to set the LEDs to RED color at 100% duty cycle:

Ai-Thinker Ai Light / Noduino OpenLight have now been added to ESPurna 1.6.8 firmware, and you can turn the light on and off, select the color from the web interface, and/or control it via MQTT.

ESPurna installed on AI Thinker Light Bulb – Click to Enlarge
Share this:
FacebookTwitterHacker NewsSlashdotRedditLinkedInPinterestFlipboardMeWeLineEmailShare

Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress

ROCK Pi 4C Plus

35 Replies to “$12 AI Light ESP8266 based WiFi RGB Light Bulb Supports MQTT via ESPurna Open Source Firmware”

  1. Let’s hope they/someone will ship these bulbs with ESPurna by default so no need to reflash a firmware prior to use.

  2. I got mine from a different seller

    https://www.aliexpress.com/item/E27-WiFi-RGB-Bulb-Light-Compatible-with-Alex-Echo-Remote-Control-by-app-Support-IOS-Android/32741634481.html?spm=2114.13010608.0.0.u2AX2K

    The flash on this one is 25Q32ASSIC a 32M-bit (4mb) chip. I dare say you will find various variations of spec when you look around.

    Speaking to the vendor, the Tuya app has an associated echo skill. I am waiting patiently for it to become available to Amazon UK customers so that I can try/review it. After that its flash time so that I can control it from OpenHab2

    JM No problem with the Antenna in my home, (Though I don’t live in a mansion) which is a traditionally built (brick) 3 bed house.

  3. Since today has so many posts on hidden back door found in China IOT devices, seems a article on good IOT security, might get interest?

    🙂

  4. @cnxsoft

    Speaking of power, any idea about the topology and driver ic’s for ac conversion?

    If anyone knows any good, ultra compact, low power (say 2w) ac/dc conversion modules I’d love to know. Hopefully something cheap and not a safety nightmare.

  5. Excellent news! I will try to find them on the market. Maybe I can transform one in a MQTT PIR sensor (fake bulb), hard to spot in a house.

  6. Xose mentions MP1470 and MP2359 step-down converters.

    Those are not the right type of chips to build this. It has to be some type of hot ground AC supply, then the MY9291 does the current control thing for the LEDs. It is that 6-pin chip at top of photo, I just don’t know what chip that is.

    The 3V3, GND, RX, TX and IOO pads are required to initially flash it. You power the PCB from an external isolated 3.3 supply during programming. Don’t use those pads while AC is flowing, you’ll likely destroy anything attached to them since this is a hot ground scheme.

  7. There are several sonoff light bulb and socket adaptors on Aliexpress also a sonoff TH temperature sensor.

  8. Got this today, very quick delivery from Aliexpress and nicely packaged in a sturdy box.

    The bulb looks far better than I expect, it’s just like the Philips Hues I have. Board is very good quality no shoddy manufacturing.

    Will give the programming pins a go. Thanks for the tip!

  9. anyone considered making a jig for programming a light quickly? I want to make 100 bulbs.. but don’t want to solder each bulb individually..

    1. It Looks like a good candidate for 3d printed part to pressure and hold pins in place.if usa I can try to make one and ship. Just need a picture and one dimension. Just to make sure no design changes..

    1. Thanks I’ve removed the links for now and asked the manufacturer if they were still available. But right now, if you’d like an ESP8266/ESP8285 based light bulb, I’d go with Sonoff or Yeelight, and maybe others. They can be adapted with Tasmota and/or ESPHome.

Leave a Reply

Your email address will not be published. Required fields are marked *

Khadas VIM4 SBC
Khadas VIM4 SBC