How To: Inexpensive ($10 US) WiFi RGB Bulb that works with Home Assistant

Happy to hear it worked! Thanks for the beer, you don’t need to give a donation. Happy to help others…

Since you have soldered the wires to the bulb, you may want to have a look at the a special adapter I made. It allows you to flash firmware without any soldering: https://www.sachatelgenhof.nl/blog/ailight-jig :slight_smile:

Cheers! Sacha

1 Like

I know I saw you answer this before, I’m sorry I can’t find it now. When I search ai light, on AliExpress I don’t find anything. What are good keywords to use to find the right light? Thanks!

You can try searching using the keywords “M1636” (Model number) or “MY9291” (The LED driver used in this light). Also using the keyword “Tuya” might help. There is an Home Automation App called “TuyaApp” / “TuyaSmart” that supports these ESP8266 based lights.

Not sure if you will find something. Seems to be hard to find lately…

Cheers! Sacha

Wow, you’re right. I don’t find anything on ebay or aliexpress. Thanks for taking the time to reply and your work on this regardless.

@stelgenhof for mqtt discovery do I need to set MQTT_HOMEASSISTANT_DISCOVERY_ENABLED and MQTT_HOMEASSISTANT_DISCOVERY_PREFIX in config.h or is it enough to set it in the web gui? In other words do I need to do both? Using 0.5.1-dev (git cloned yesterday).

EDIT: never mind, I figured out why discovery hadn’t worked. The bulb thought it had already been discovered, but something went wrong. After turning discovery off and on again in the web gui sorted it! Great work.

This link still seems to be alive, I got mine there

https://www.alibaba.com/product-detail/High-Standard-Colorful-Smartphone-Remote-Control_60576662953.html?spm=a2700.7724838.0.0.jahydM

1 Like

Thanks. How did you find those, particularly the brightness?

I have only got one installed so far. It is in a hallway and comes on automatically when I stumble to the bathroom in the middle of the night. It is more than bright enough for that. They claim 9W. I like them.

I can highly recommend these if you’re looking for a bright bulb

They are pretty much the same brightness as a standard 60w equivalent LED bulb you get from the supermarket here in the UK (806 lumens).

Here are some photos comparing standard supermarket LED bulbs with the above: https://imgur.com/a/B65Bf

I have ordered 5 more of these and will be replacing every ceiling light bulb with these as they are the same brightness and pretty much the same colour temperature for warm white. There is NO cool white channel, but you can get a cool white by doing 100% on white channel and blue and green. It uses 12w when all 3 channels are on. I run Tasmota on my test unit configured as an AiLight.

Highly recommended!

Nice! Perhaps I will also give these one a try.

twice the price though!

Yeah it’s still only £10-£11 though which is cheaper than any branded WiFi bulb.

By the way, I’ve found a way to push firmware .bin over the air using the stock Tuya firmware, but it doesn’t work with the Tasmota/AiLight/ESPurna .bin files. I don’t know enough about it, I assume they are different formatted files? Here is a stock firmware .bin file for the above Tuya bulb I linked:

Does anyone know how we could package Tasmota/AiLight/ESPurna into a compatible .bin file so we can push it OTA? I’m hoping there can be some collaboration here because I don’t know enough about the firmware files themselves but have figured out how to push the .bin files OTA.

1 Like

HI everyone!

I just found this discussion about AiLight and Home Assistant integration.
Let me start to thank Sasha for his amazing work on AiLight firmware and programming Jig ,-)
I just programmed two AiLight lamps with his jig and started to play with them in HA.

I have a question about changing the light color via HA homepage through the microphone.
I configured (not sure if completely right) two AiLights and I can ask HA through the microphone to turn them on and off. When trying to change their color to Red, Green or Blue, I just can make them effectively change to Red. If I try to change them to Green or blue, HA acknowledges the command but the light only change to a pale whitish.

This is the code I have:

# Allows you to issue voice commands from the frontend in enabled browsers
conversation:
  intents:
    ColorLight:
      - Change the light[s] to [the color] {color}

intent_script:
  ColorLight:
    speech:
      text: Changed the light to {{ color }}
    action:
      service: light.turn_on
      data_template:
        rgb_color:
          - "{% if color == 'red' %}255{% else %}0{% endif %}"
          - "{% if color == 'green' %}255{% else %}0{% endif %}"
          - "{% if color == 'blue' %}255{% else %}0{% endif  %}"

Can anyone spot/suggest what I am not doing right?
Thanks

Perhaps turn white to zero.

Could you perhaps explain a bit more what you like to achieve? OTA is basically a small UDP service that can be implemented differently in various firmwares.

Firmwares like Tasmota/AiLight/Espurna likely use the same OTA library and therefor it might be possible to flash firmware across these implementations. However, with proprietary firmwares like Tuya it is hard to tell how OTA is implemented.

Is 66.1 causing issues for anyone? The rgb values shown in the state change do not reflect the actual change in state made.

Notably the RGB values, I think they are being incorrectly scaled for brightness now? There was a change made to the platform around this. This seems similar as well: https://github.com/home-assistant/home-assistant/issues/13632

Considering the configuration.yaml I’ve posted above, only the first line - that changes the light color to red - is working. i.e.: when I ask to change the color to red.
Any other color, including white, does not work.

So, I am assuming that my code or syntax is not 100% correct even considering that the configuration checker does not complain about anything.
@stelgenhof would you be so kind to point me the right direction?

The syntax looks correct to me. Do you get the right values (i.e. “red”, “green”, “blue”) from the speech component?

Although the template looks fine, it may not behave as you want. For example, if you first set it to “red” and then ask to set it to “green”, the light bulb will not switch to green since previously the Red channel was set to 100%.

If you are looking to set the light bulb to only Red, Green, or Blue, then the other channels need to be set to zero. But that depends on how you like it to behave :slight_smile:

Cheers! Sacha

I haven’t upgraded yet, so can’t tell yet :slight_smile: