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

If you use dnsmasq, this happens out of the box. dnsmasq is both a DHCP server and DNS server/forwarder.

1 Like

I’ve built a pogo-pin assembly already. Turned out to not need to be nearly as complicated as I thought. Since the connections only need to be made for a 20 or so seconds during initial programming, I just hold the jig on top of each bulb with a steady hand.

4 Likes

Cool! What type/size pogo pins are you using?

Cheap ones on eBay. Listing (now dead) said “P75-B1Dia 1.02mm Length 15.85mm 100g Spring Test Probe Pogo Pin.” These are sharp points - I think the rounded tip pins might work better.

I got some of each (sharp and rounded).

I see yours seem to be just in a piece of vero board, did that get them in exactly the right place, or is there a bit of “wiggling” to be done?

I used translucent tape on the bulb PCB to get spots for pins. Laid that on top of some plated perf. It wasn’t perfect, but I was able to angle the pins to get it close enough to work. I figured some trial and error with soldering iron and pliers was better than trying to etch a custom PCB with perfect alignment.

The different angle of the pins does mean that certain pins contact before others, but I have enough spring travel to get all to contact.

At the moment, there is no frame so I have to (very steadily) hold the board in place on the bulb. Flashing isn’t bad, but doing any serial debugging is a pain.

Stelgenhof you plan to add animations right :slight_smile: ? Would be extremly awesome if there was a way to sync the animations with music :D.

@marksev1Adding some effects I am planning to add, just need to decide what type of effects :). Syncing the lights with music would be some challenge I guess.

Thank you for your code! I flashed a bulb and it is responding great

I am seeing an issue with color though. I am not getting a slider for white or color temperature in the Hass UI (I copied the YAML you provided). When I pick colors in either the bulb’s control page or HASS, they don’t match up with what I expect, everything trends very blue (I can’t get a warm white at all).

I’m on HASS 0.38.3, any tips for me?

Thanks! @ekim had reported the same when he used HA 0.39. After he upgraded to the latest version, it all worked well. Perhaps something was not working properly in that version or your version.

Opps (commit e40dd7a)

Compiling .pioenvs/dev-ota/src/main.ino.o
/Users/brian_anderson/local/projects/embedded/uC/AILight/AiLight_git/src/_mqtt.ino: In function 'void mqttConnect(
)':
/Users/brian_anderson/local/projects/embedded/uC/AILight/AiLight_git/src/_mqtt.ino:158:47: error: 'MQTT_STATUS_OFF
LINE' was not declared in this scope
mqtt.setWill(cfg.mqtt_lwt_topic, 2, true, MQTT_STATUS_OFFLINE);
^
/Users/brian_anderson/local/projects/embedded/uC/AILight/AiLight_git/src/light.ino: In function 'void lightMQTTCal
lback(uint8_t, const char*, const char*)':
/Users/brian_anderson/local/projects/embedded/uC/AILight/AiLight_git/src/light.ino:43:37: error: 'MQTT_STATUS_ONLI
NE' was not declared in this scope

mqttPublish(cfg.mqtt_lwt_topic, MQTT_STATUS_ONLINE);
^
*** [.pioenvs/dev-ota/src/main.ino.o] Error 1

Ah! Indeed oops. Forgot something… Hold on

:slight_smile:

Evening in western US, morning in Japan?

Suggestion:

  • Display colo(u)r temperature and possibly other parameters (brightness, etc.) in the UI along side the sliders

Yes, living in Japan :slight_smile:
Compilation errors should be gone now. Please check the config.example.h file as two new constants have been added. You may need to add it to your own config.h file.

Thanks for the suggestion. That is something I had on my mind, but did not get around to do it. I will add it to the list!

Works now! Thanks! And yes, needed to update my config.h.

The gamma correction is “interesting”. Can’t seem to get my nice ~2700K soft white colo(u)r w/gamma enabled. Not sure what the implications of gamma correction is on the set of colors that can be selected. Not really a color expert…I know enough to know its really complicated. I guess the question ultimately is, what makes the most intuitive sense from a user’s point of view as far as controlling the color of the bulb. This is the first color bulb I’ve used, so I don’t have any preconceived notions or experience with how others solve this problem.

Thanks again for the quick response.

Generally speaking it is quite hard to make LED’s reflect incandescent light level / colors accurately. The algorithm’s used in this firmware for color temperature and Gamma Correction are not perfect and only approximate the intended colors.

There is this MSGEQ7 chip which is used for this purpose of syncing, see here - https://blog.adafruit.com/2015/11/16/graphic-equalizer-display-using-esp8266-12-msgeq7-and-ws2812/

But instead of outputting directly to the LED strip some protocol could maybe be sent back to the lights (would mqtt be too slow)?

Oh that is indeed a nice project! In that project all the audio processing is done directly with the MSGEQ7 chip and ESP8266. What you are suggesting would mean transmitting some output via MQTT, right?

I am not an expert on this, but I think indeed that the latency would be too much. You could create an experiment if you like :wink: It’s not that hard to have the firmware receive commands…

Hi everybody!

Released a new version of the AiLight firmware: v0.3.0

The OTA issue has been fixed now with the help of @brahmafear. Also Gamma Correction has been added, MQTT Last Will and Testament support, and the UI sliders now have a value bubble showing the actual value (@bhaonvashon your wish has been granted :slight_smile: ).

Unfortunately you have to flash this version of the firmware via Serial again since of course the OTA updates isn’t working properly in the previous release. Also there are some (minor) changes to be made to your config.h and platformio.ini files.

Please check out the full release notes for more details here: https://github.com/stelgenhof/AiLight/releases/tag/v0.3.0

Appreciate if you could try out this new version! Happy to hear your feedback and comments.

@stelgenhof I did upgrade to the latest release this weekend, and it appears that the color picker is much more accurate. However the color temperature still seems way off to me. I work in the photo industry so I spend a lot of time moving color temperature sliders back and forth :).

With the color temp set all the way warm, I still see a cool blue on my light. What should be a cool white is… very very blue. I am not really able to get a ‘warm white’ at all.

It appears the bulb is working fine with the flux component (changing color temp throughout the day), it’s just very blue.