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

Yes, if you are compiling the firmware yourself, Git is needed as some dependent libraries are being pulled via Github. If you don’t like to compile the firmware, a prebuilt version is also available (on the Releases Page on Github).

Here the full output. Sorry there seems to be some gibberish in there I can’t filter out.

So with GIT - am I to run anything in it? I downloaded GIT on my PC, but that’s about it.

Project
AiLight-master 2
html
lib
src
_mqtt.ino
_ota.ino
_web.ino
_wifi.ino
config.h
html.gz.h
light.ino
main.h
main.ino
.gitignore
.travis.yml
AiLight_Rainbow.ino
bs-config.json
build.py
CHANGELOG.md
gulpfile.js
LICENSE
package.json
platformio.ini
README.md


1
   •
   •
2
   •
   •
� ��@�@hP�@K@�$@���?��@�@���_���?�@J@LJ@a`��+@�0@�/@��`�|`�� ����)O8O!��*#K?D����R�a!��)(()/(()?8�/�������0
��� ����)�(�"�)2�(B�����BF.(�"))%)o)2�(�����2"�#(�")(o)?"O(?1��'3"O(?1��'�(?1��'3"O(?1��'�"�"O2 #0  t��(8*#)�8?H(����B2F (8*#)(e")"8'������(_=�����@
���a�a�a�a���)�9�I�-�(�  �b(�  B�/!��)?(?")O(?� �-%���� 
��(?ma`-%з�� Ц(?�" $A�" �--)_8�(?*#2(?  ` #)(�)(�)/(/8?������B"8_(H?q���B2
8_(/H?v���BB8(?*#)8/(?*#)/8(? #�)(V�!�!�!�!���P
������a'�a&� "�  )"�E��K/��҅&L^���|�)/"o"�~Y��(/fR"�cU��"�pS��<�Q��P��(?8OB/���)M��("�0H���F��(̂|�)/"/"o(/fD"�l?��"�d=���;��(?��)"�e7��<�5��("�02���0��(�b!,�1+�� B#1*�04 � 2b�������)O9_Io�(_e29_""O"��)�8O!� 
C@#�"O2( #��B@#� 0t #0  t"O"  "O(O�")O"��8O!� #0)O( !A)(V�(o29oV"�(O���0
���  q�a�)|�8B�|E��q�a� 
��� ����)O,)(O)/)�a(�"8/*#8�C1��:4� 89(e")8('3�(O���)?(O(  ̒(O2""/'F����0
���  ����)O(O1��9"/���=(O2b,)(O)/)�a(�2!��*#8�3H/:48� 9(e")8('3�����0
����1�!��� 9!��� 9�1�
�v%08x
h�@h�@-������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������
��������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������������

3.8 s
platformio run
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:318:18: error:   initializing argument 2 of 'void tcp_recv(tcp_pcb*, tcp_recv_fn)' [-fpermissive]
void             tcp_recv    (struct tcp_pcb *pcb, tcp_recv_fn recv) ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:169:28: error: invalid conversion from 'long int (*)(void*, tcp_pcb*, uint16_t) {aka long int (*)(void*, tcp_pcb*, short unsigned int)}' to 'tcp_sent_fn {aka signed char (*)(
void*, tcp_pcb*, short unsigned int)}' [-fpermissive]
tcp_sent(_pcb, &_s_sent);

^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:319:18: error:   initializing argument 2 of 'void tcp_sent(tcp_pcb*, tcp_sent_fn)' [-fpermissive]
void             tcp_sent    (struct tcp_pcb *pcb, tcp_sent_fn sent)ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:170:28: error: invalid conversion from 'void (*)(void*, long int)' to 'tcp_err_fn {aka void (*)(void*, signed char)}' [-fpermissive]
tcp_err(_pcb, &_s_error);
^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:321:18: error:   initializing argument 2 of 'void tcp_err(tcp_pcb*, tcp_err_fn)' [-fpermissive]
void             tcp_err     (struct tcp_pcb *pcb, tcp_err_fn err)ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:171:31: error: invalid conversion from 'long int (*)(void*, tcp_pcb*)' to 'tcp_poll_fn {aka signed char (*)(void*, tcp_pcb*)}' [-fpermissive]
tcp_poll(_pcb, &_s_poll, 1);
^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:320:18: error:   initializing argument 2 of 'void tcp_poll(tcp_pcb*, tcp_poll_fn, u8_t)' [-fpermissive]
void             tcp_poll    (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp: In member function 'long int AsyncClient::_connected(void*, long int)':
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:292:28: error: invalid conversion from 'long int (*)(void*, tcp_pcb*, pbuf*, long int)' to 'tcp_recv_fn {aka signed char (*)(void*, tcp_pcb*, pbuf*, signed char)}' [-fpermiss
ive]
tcp_recv(_pcb, &_s_recv);
^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:318:18: error:   initializing argument 2 of 'void tcp_recv(tcp_pcb*, tcp_recv_fn)' [-fpermissive]
void             tcp_recv    (struct tcp_pcb *pcb, tcp_recv_fn recv) ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:293:28: error: invalid conversion from 'long int (*)(void*, tcp_pcb*, uint16_t) {aka long int (*)(void*, tcp_pcb*, short unsigned int)}' to 'tcp_sent_fn {aka signed char (*)(
void*, tcp_pcb*, short unsigned int)}' [-fpermissive]
tcp_sent(_pcb, &_s_sent);
^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:319:18: error:   initializing argument 2 of 'void tcp_sent(tcp_pcb*, tcp_sent_fn)' [-fpermissive]
void             tcp_sent    (struct tcp_pcb *pcb, tcp_sent_fn sent)ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:294:31: error: invalid conversion from 'long int (*)(void*, tcp_pcb*)' to 'tcp_poll_fn {aka signed char (*)(void*, tcp_pcb*)}' [-fpermissive]
tcp_poll(_pcb, &_s_poll, 1);
^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:320:18: error:   initializing argument 2 of 'void tcp_poll(tcp_pcb*, tcp_poll_fn, u8_t)' [-fpermissive]
void             tcp_poll    (struct tcp_pcb *pcb, tcp_poll_fn poll, u8_t interval)ICACHE_FLASH_ATTR;
^
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp: In member function 'void AsyncServer::begin()':
.piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:848:30: error: invalid conversion from 'long int (*)(void*, tcp_pcb*, long int)' to 'tcp_accept_fn {aka signed char (*)(void*, tcp_pcb*, signed char)}' [-fpermissive]
tcp_accept(_pcb, &_s_accept);
^
In file included from .piolibdeps/ESPAsyncTCP_ID305/src/ESPAsyncTCP.cpp:27:0:
/Users/nimeshpanchal/.platformio/packages/framework-arduinoespressif8266/tools/sdk/lwip/include/lwip/tcp.h:317:18: error:   initializing argument 2 of 'void tcp_accept(tcp_pcb*, tcp_accept_fn)' [-fpermissive]
void             tcp_accept  (struct tcp_pcb *pcb, tcp_accept_fn accept) ICACHE_FLASH_ATTR;
^
*** [.pioenvs/dev/lib/ESPAsyncTCP_ID305/ESPAsyncTCP.o] Error 1
========================== [ERROR] Took 3.34 seconds ==========================
 
================================== [SUMMARY] ==================================
Environment dev-ota     [SKIP]
Environment prod        [SKIP]
Environment prod-ota    [SKIP]
Environment dev         [ERROR]
========================== [ERROR] Took 3.34 seconds ==========================
 
Linter
Severity 	Provider 	Description	Line

Oh, I haven’t seen this before… How did you compile? Can you show me what command you issued or steps you took?

So I “believe” I followed the WIKI exactly as described.

Downloaded the ZIP, extracted and made changes to the config and platform files.

Withing PlatformIO, I clicked the “Build” option, and this is what I get. I tried on both a MAC and PC with same results.

I see. Never seen this before so let me try and see if I can replicate.

I can replicate the issue. Unfortunately there seems to be an issue with the ESPAsyncTCP library in combination with the new PlatformIO SDK version (2.1). Need to check what the proper fix for this is.

Ok. I hope we can find a fix. Let me know if you need me to do any further testing.

Any word on similar 9W bulbs? As a side note, how is the brightness on the Sonoff B1? Considering adding another 3 lights to my setup but need them to be bright.

Have a look at http://tinkerman.cat/yet-another-wifi-light-bulb/. Xose Pérez wrote another blog post about these WiFi lights and did some brightness comparison. Might be of some interest :slight_smile:

There is a solution to use the development version of the ESPAsyncTCP library which includes the fixes you’ve encountered. In your platform.ini file change:

lib_deps =
ESPAsyncTCP

to this:

lib_deps =
GitHub - me-no-dev/ESPAsyncTCP: Async TCP Library for ESP8266

(Leave the other libraries untouched)

I can confirm this solves the issue. Keep in mind though that this is still an temporary fix until they have put the fixes in an official release.

1 Like

EDIT: Just found your reply right above and felt like an idiot. This is what i initially wrote:

No problem! :slight_smile:

@stelgenhof How do you connect the wires to the pogo pins? The jig you sent me some time ago is sitting on my desk unused.

Not too difficult :slight_smile: Just solder the wires to the end of the pogo pin. I then use a piece of heat shrink (about 1.5mm in diameter) to cover/protect the soldered part. Then the other end of each wire can be soldered to the appropriate connections of your Serial adapter.

Do you insert the pin into the jig before soldering?

I wouldn’t recommended that. First solder the pins and then insert them.

I bought the same from banggod, but the light doesnt seem to be 7w

dear, can you please guide me

  1. can i use this bulb with homeassistant without flashing custom firmware
  2. what firmware hae you flash
  3. guide me to flash custom firmwarae on this bulb.
  4. lastly what bulb do you recommend me in lie of this bulb at budget rate.

thanks in adv.

Hi,

Does the light you bought have an indication of the wattage? As for your questions:

Without any custom firmware it’s unlikely you can use Home Assistant. The built-in firmware probably has no option to setup any communication using MQTT or HTTP/REST for example.
I use my own firmware: https://github.com/stelgenhof/AiLight
If it has the ESP8266 chip and MY9291 LED driver, then you can use my firmware: https://github.com/stelgenhof/AiLight or another good alternative is ESPURNA: https://bitbucket.org/xoseperez/espurna. Check these websites for the documentation how to flash.
As for AiLight, this is the WikiPage with all known working bulbs: https://github.com/stelgenhof/AiLight/wiki/Compatible-Light-Bulbs
Let me know if you have any further questions.

Cheers! Sacha

Dear,
What firmware have you flash on Arilux e27 RGBW 7w?
Please recommend me.

Hi,

I am getting an error when trying to flash Ailight through platformIO.

error: espcomm_upload_mem failed

I’ve also tried the esp2tool.py and get a timeout while connecting.

I am using a CP2104 I bought through amazon. I installed the driver and platformio lists the device on COM6.

I saw a suggestion somewhere that the error typically means the ESP8266 is not entering flash mode. The CP2104 has a single GND so I have wired the GND pad and IO0 to the GND of the CP2104. Would this be correct and could it cause an issue?