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

Nice to hear you found a workaround. I stopped using HomeKit as it is changing the white levels back to 100%. Even if you have set it to a different level. Hopefully Apple will change that soon, because I like to use Siri for controlling the AiLights :slight_smile:

Wow! Awesome work. I assume you have an Amazon Echo / Dot? I would like to use/test Alexa as well but unfortunately the Echo/Dot are not being sold in Japan. Guess I have to go the Raspberry Pi/Alexa way.

1 Like

For me HomeKit wasn’t changing the white levels at all which is why I set to automation to change the white_value to 0

Yes I have a Dot and an Echo, yeah I believe there is a way of putting it on a Pi!

1 Like

I have 4 x 220V bulbs and they work fine on 110V. Ordered them in error and was surprised that they worked.

Yes using a lower voltage on a higher designed voltage can work. Very likely the power output is less than compared to when using 230V

How do you run the Xiaomi Yeelights on 110V?? Are you using the RGB ones as well?

I mean, yes tehy turn on - but I can’t configure WiFi? I bought a 220V converter and then they show up and I can configure WiFi. But without the converter I have no luck :frowning:
Plus: Yes they are not as bright and seem to flicker a little bit with 110V / 50Hz.

Mine seem to work fine. I find that on 110V they are very bright even a little to bright at the lowest setting. I am using the RGBW models.

@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