Custom Lightbulb Firmware

The Internet of Things is developing at a rapid pace, as hobbyists and companies rush to develop the latest and greatest home automation gear. One area of particular interest to some is lighting – yes, even the humble lightbulb now comes with a brain and is ripe for the hacking.

[Tinkerman] starts by doing a full disassembly of the Sonoff B1 lightbulb. It’s a popular device, and available for less than $20 on eBay. Rated at 6 watts, the bulb has a heatsink that is seemingly far larger than necessary. Inside is the usual AC/DC converter, LED driver and an ESP8285 running the show. While this is a slightly different part to the usual ESP8266, it can be programmed in the same way by selecting the correct programming mode.

This is where it gets interesting – [Tinkerman] flashes the device with a custom firmware known as ESPurna. This firmware enables greater control over the function of the bulb, from colour choice, to speaking to the bulb over MQTT.

[Tinkerman] does a great job of walking through the exact steps needed to disassemble and reprogram the bulb, and touches upon the added flexibility given by the custom firmware. We love to see projects like this one, that give greater control over IoT devices and enable users to better integrate them with other systems.

15 thoughts on “Custom Lightbulb Firmware

  1. Since you can talk to these. I was wondering if these could be used for optical data transmission. I remember years ago there was talk about grocery stores using optical data transmission for price changes on aisles. Instead of having to put stickers on everything and then change them when stuff was either out or moved they would have a receiver that had an LCD display powered by solar cells and would display the correct price. This would save thousands of man hours in work and waste. Also optical data transmission could be used for a local intranet with no wires.

    1. Perhaps, but these bulbs probably aren’t ideal since they are optimized for visible light. I’m not sure what the advantage would be nowadays though versus something like ISM band radio. The hardware for simple radio transceivers is so cheap nowadays that I doubt optical transmission is really worthwhile, at least for the application you mentioned (signs in a grocery store) and the bandwidth is comparable or better.

    2. My local electronics emporium uses smart e-ink displays that are remotely controlled and updated with current prices by head office. I’m sure they worked out that the considerable investment in such new-fangled technology would save them lots of labour costs

    3. Not just ‘talk’ – these are actively in use in higher-end grocery stores and convenience markets in the US and around the world (adoption has happened faster in ROTW.)

      They use IR because it’s easier to control and filter for IR – so the same optical power gets you more range. With visible light, SNR would drop from all sorts of sources, including any store lighting that wasn’t part of the system.

  2. The lighting would have to be visible the customers in the supermarket need to see what they’re buying, and not bump into things in the dark :) The idea is to modulate the light at a frequency above the threshold of perceiving flicker (by human customers), keeping the duty cycle constant (so no perceived change in brightness), and still send data.

    Here’s an article about it:

  3. IoT has its risks but as a consumer this is the first time I’ve been able to add a £10 lightbulb to a standard socket and gain dimmable, remote-controllable lighting. White light temperature and full RGB support are just nice extras. Never again will I have to leave the comforts of bed to hit a lightswitch on a cold winter’s morning and that is fantastic.

  4. September 29 Hackaday says

    October 1 Hackaday says
    “[Tinkerman] flashes the device with a custom firmware”


    But on topic, is there a possibility of using these ESP based lightbulb devices as wifi extenders? They tend to be located in convenient locations.


    I had a watch that worked in a similar manner in 1997. It would store contacts and appointments in the watch and you could program it from your computer. Data transfer was accomplished by flashing the CRT monitor alternating black and white to encode the bits. A photo voltaic in the watch converted the flashes back to a voltage input to the microcontroller.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.