Alternative firmware for Arilux AL-LC03 for use with MQTT and Home Assistant (RGB light strip controller)

I believe thats because you don’t have the ArduinoJSON library installed

I didnt have the library installed initially but then I installed it thought the library manager and I still seem to get the error.

I did see links to specific version of the dependencies at the top of the sketch so perhaps it requires a specific version?

I will double check when I get home later.

It shouldn’t require a specific version no.

I just realized this is my bad. Pushing a fix for this now.

Hi Again,

I am getting this error now:

Arduino: 1.8.1 (Linux), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 1M (64K SPIFFS), ck, Disabled, None"

/home/kiwinol/Downloads/Arilux_AL-LC0X/Arilux_AL-LC0X.ino: In function 'void callback(char*, byte*, unsigned int)':
Arilux_AL-LC0X:161: error: 'ARILUX_MQTT_WHITE_COMMAND_TOPIC' was not declared in this scope
   } else if (String(ARILUX_MQTT_WHITE_COMMAND_TOPIC).equals(p_topic)) {
                     ^
/home/kiwinol/Downloads/Arilux_AL-LC0X/Arilux_AL-LC0X.ino: In function 'void handleCMD()':
Arilux_AL-LC0X:522: error: 'ARILUX_MQTT_WHITE_STATE_TOPIC' was not declared in this scope
       publishToMQTT(ARILUX_MQTT_WHITE_STATE_TOPIC, msgBuffer);
                     ^
exit status 1
'ARILUX_MQTT_WHITE_COMMAND_TOPIC' was not declared in this scope

Argh sorry about that. Won’t be home for a few hours. Once I am I can get that fixed.

Hi Robbie,

No worries. I will try again later :slight_smile:

Fixed and tested! Let me know if you are still having problems.

Big new version out! Adds support for mqtt_json and Home Assistant MQTT discovery for easy auto-configuration of your devices. Using JSON means that now we have effects, transition and flashing lights support, as well as less round trip requests required to update the light! Download and install now!!

1 Like

Down to one error :slight_smile:

Arduino: 1.8.1 (Linux), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 115200, 1M (64K SPIFFS), ck, Disabled, None"

/home/kiwinol/Downloads/Arilux_AL-LC0X/Arilux_AL-LC0X.ino: In function 'void publishWhiteChange()':
Arilux_AL-LC0X:679: error: 'ARILUX_MQTT_WHITE_STATE_TOPIC' was not declared in this scope
     publishToMQTT(ARILUX_MQTT_WHITE_STATE_TOPIC, msgBuffer);
                   ^
exit status 1
'ARILUX_MQTT_WHITE_STATE_TOPIC' was not declared in this scope

Try this (don’t define the device in the top-section of the config:

// If you can't find your model above, you can use the defines below instead.
// #define RGB
#define RGBW
// #define RGBWW
// #define IR_REMOTE
// #define RF_REMOTE
#define DEVICE_MODEL                           "LC01"

That seems to have complied. Thanks :slight_smile: Now I just need to attempt the flash. I will get back to you on that (hopefully I dont fry my controller) I am going to attempt to do it without soldering

How do you get the device in flash mode using option 2 ? (the solderless method)

Unfortunately I might have the same question. My understanding is that you connect the TX RX and ground from the FTDI to their corresponding spots on the bottom of the board, but it doesnt seem to be working for me.

I have the brown and black wires connected to the ground on my FTDI. I then plug in the power to the controller and attempt to flash but get the following error:

Arduino: 1.8.1 (Linux), Board: "Generic ESP8266 Module, 80 MHz, 40MHz, DIO, 9600, 1M (64K SPIFFS), ck, Disabled, None"

Build options changed, rebuilding all
Sketch uses 251187 bytes (26%) of program storage space. Maximum is 958448 bytes.
Global variables use 34288 bytes (41%) of dynamic memory, leaving 47632 bytes for local variables. Maximum is 81920 bytes.
warning: espcomm_sync failed
error: espcomm_open failed
error: espcomm_upload_mem failed
error: espcomm_upload_mem failed

which as far as I can find seems to mean its not in program mode.

see option 2 here for what I am trying to do
https://github.com/mertenats/Arilux_AL-LC0X

thanks for the update, I’m stuck at the exact same point.

@robbiet480
First off want to say this looks awesome!

I just upgraded to latest hass .40, did everything that was needed, add discovery, flashed the latest firmware on airlux lc02, and after some but’s it got discovered automatically etc. BUT:

  • When I turn it on and change colors, brightness, and white, it all works as it should, however, when I turn it off it doesn’t really turn it off, the leds blink briefly but remain lit, on hass front end the light is off, when turning it on again it’s displayed with a black bulb icon, however I can change colors and everything, but it is not updated on the front end properly (bulb remains black) and I still can’t turn of the leds when turning the light off on hass.

Do you know what it is? Or how I should go about troubleshooting it?

Thanks again or all this! Looking forward to get it proplerly up and running so I can flash the remaining ones in the apartment!

Fixed once again. I added Travis CI tests to ensure that we won’t have this problem again too.

I’ll take a look at it tonight. No idea off the top of my head sadly and I won’t be home until very late tonight.

Your FTDI is plugged in before you connect power to the controller right? The two pins going to the GND on FTDI need to be grounded before power is applied.

Also if the board was already flashed once you can just flash it over the network with the ArduinoOTA support built into the firmware instead of plugging in pins.

firstly @robbiet480 this firmware looks great I am so exicted to get it working and thanks for all your and others in this theads help.

I have done a little bit more experimentation but keep having the same issues as piotr.

I have plugged the device in and found the wifi hotspot it creates. Connected to it to check funcionality and all ok.
I then reboot with the FTDI attached and the wifi hotspot does not appear (so I assume its in update mode) but I still get the error:

warning: espcomm_sync failed

I am using a computer with Linux mint to do the updates so my next step is to try from an old laptop I have with windows 8 to see if its a OS/Computer related issue.