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

Newbie here, so please excuse my limited knowledge. I have homebridge installed without HA. Would I be able to control this in homebridge? Thank you.

I have no experience in using Homebridge without HA. Basically, I used this write up from Samual Mertenats: https://github.com/mertenats/Open-Home-Automation/tree/master/openhome

But that is a setup Homebridge / HAā€¦ However, I ditched it as I wasnā€™t happy with Appleā€™s Homekit way of working. The Ai-Thinker Lights worked fine with Homekit, but for some reason, Homekit ignores the previous brightness levels and sets it to 100% (Is reported by other users as well).

The neat thing is you can control the AiLight with Siri though :slight_smile:

Yes, ws connection failed. Here is the console from Chrome:

[WEBSOCKET] Connected to ws://ailight-ac2ac1.local/ws
(index):1 WebSocket connection to 'ws://ailight-ac2ac1.local/ws' failed: Could not decode a text frame as UTF-8.
wsConnect @ (index):1
(anonymous) @ (index):1
(index):1 [WEBSOCKET] Error: [object Event]
(index):1 [WEBSOCKET] Connection closed
(index):1 CloseEvent {wasClean: false, code: 1006, reason: "", type: "close", target: WebSocketā€¦}
(index):1 
(index):1 [EVENTSOURCE] Connected to http://ailight-ac2ac1.local/events

How do I ā€œentirely erase the deviceā€? Iā€™m assuming that the ā€œResetā€ button on the UI will not work since I donā€™t have a ws connection? Iā€™ve actually tried that previously to no avail. Do I need to upload some other firmware to erase the device? Something else?

I see from the ChangeLog that some fiddling around the WS stuff was done circa 0.4.1. So, I reverted to the v0.4.0 tag and SUCCESS! Works fine. Back to head on master and problem reappears. So some commit after v0.4.0 has caused this problem for me. Guess Iā€™ll see if I can nail it down to a specific commit later today.

OK, looks like commit [15ec068] (Support for Home Assistantā€™s MQTT Discovery) broke ws for me.

Thanks for the update! For the moment, if v0.4.0 works for you Iā€™d recommend stay with that one.

Iā€™ll do some testing what the issue with v0.4.1 is.

Cheers! Sacha

FYI, v0.4.1 is fine. Its the next commit that introduces the problem.

I see. I have a feeling it is related to the eeprom settings. When a new setting is added, this issue appears. Need to investigate furtherā€¦

Created an issue on your behalf: https://github.com/stelgenhof/AiLight/issues/13
Working on itā€¦

I believe I fixed it. Could you try flashing the latest master branch from Github? The issue was indeed when a new ā€˜charā€™ setting is introduced but not yet initialized properly. Basically, uninitialized it contains garbage bytes causing the WebSockets interface to trip over.

Yes! That appeared to have fixed the issue. ā€œAboutā€ reports Version 0.4.1-dev.

Thanks!

1 Like

Cool! Thanks for testing.

Iā€™ve got two bulbs from AliExpress for 15USD each. Anyone know any cheaper places to get these from?

I got mine from this store: https://www.aliexpress.com/store/906899 at about $11 each.
But I think they ran out of stock currently

1 Like

Bought mine at taobao selling for 7.24 usd, itā€™s the 7 watt bulb
If youā€™re using taobaoā€™s official forwarder option itā€™s 13 usd for first kg and 3 usd for the next 0.5kg for usa address.

Still way cheaper than other 3rd party taobao agents though.
Each bulb is around 250 grams btw
Youā€™re definitely getting it cheaper than 15 usd (including shipping) if you buy in bulk

1 Like

Thank you, will check out shipping to U.K.

Didnā€™t know there was a 7watt option, my two from AliExpress are 5W. Are there any other wattages?

Thanks

Yup! Mine are 9W

Good to know, have you had chance to compare brightness? Put one of my 5wā€™s outside, was thinking it could do with being brighter.

On another note, are there any that are shorter in length for lamps with short shades?

Thanks!

1 Like

I only have 9W ones so canā€™t compare.
Shorter ones I havenā€™t seen yet.

I did find a 6 watt, but this oneā€™s using ewelink app and not tuya.
Looks like another sonoff b1 clone

Got mine from ebay, also 6W according to the ad. Have been looking for a 9W version, but havenā€™t found it yet.

@stelgenhof your jig works perfectly btw. Thanks!

1 Like