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

@stelgenhof do you know of any way to get the state of the light after home assistant restarts?

Thanks!

Do you mean the state of the light within home assistant? BTW, do you use the MQTT Discovery option?

You could also try Alexa using Reverb app for a quick test.

1 Like

@stelgenhof yes in Home Assistant, If a bulb is on and I restart Home Assistant it shows the bulb is off.

No, I’m not using discovery:

  - platform: mqtt_json
    name: 'Big Lamp'
    state_topic: 'AiLight-biglamp'
    command_topic: 'AiLight-biglamp/set'
    color_temp: true
    brightness: true
    rgb: true
    white_value: true
    effect: false
    optimistic: false

@stelgenhof Also noticed this evening…

I have a lamp that turns on via an Automation at Sunset with a transition of 900 (15mins) to 254.

The automation works perfectly, as does the transition.

However, I noticed the brightness in Home Assistant shows as 0.

Should I use discovery to fix this?

That seems to be similar issue with this

Maybe you could apply the same fix?

In your config.h file there is a parameter this: MQTT_RETAIN. By default it is set to false, which explains what you are experiencing. Try setting it to true and then recompile the AiLight firmware.

1 Like

Setting the MQTT_RETAIN flag in your config.h file and add retain: true to your HA configuration will make HA to retain the state after a restart. I have tested it a couple of times and the brightness for example is also retained.

I’ve added a note to the Wiki page regarding this.

1 Like

Oh! That looks cool. Will give Reverb a try.

Excellent thank you!

I haven’t used OTA on the AiLight yet, can I use OTA to upload?

Cheers :slight_smile:

Absolutely! I use it all the time without any trouble. Once in a while it doesn’t immediately connect, but just do it again :slight_smile:

1 Like

Cool, will try that later :slight_smile: thanks!

Are these similar? https://banggood.app.link/6q1C90KbHF

@stelgenhof testing and working on one bulb, another 9 to go :slight_smile: Thank you!

1 Like

Hmmm, they look indeed similar. Hard to tell from the product description.

Just to let you know that firmwares like AiLight and Espurna support only the MY9291 LED driver. If this light bulb has this driver then pretty sure it will work :slight_smile:

2 Likes

Why don’t we create a list with “compatible” light bulbs. Like the Name / Description, link to online store and some more details (if available).

This way we can add new bulbs if someone else finds new / compatible bulbs?

3 Likes

Good idea, I’ll add links to the two I’ve ordered from later.

Great idea! I’ll share mine as well.

Where would you like to create/maintain this list?

Ordered one of these yesterday. Will report the chip used as soon as it arrives

1 Like

Thanks that would be very helpful. Tried to look up further info to report myself before pulling the trigger but I couldn’t find anything