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

Hey guys,
A while ago I started playing with Arilux RGB LED controllers for use with Home Assistant and an IR remote. The product is relatively cheap and it’s CE compliant.

Arilux AL-LC03: http://www.banggood.com/ARILUX-AL-LC03-Super-Mini-LED-WIFI-APP-Controller-Remote-Control-For-RGB-LED-Strip-DC-9-12V-p-1060223.html

Features

  • IR remote support
  • RF remote support
  • MQTT support
  • TLS support

Supported devices

  • Arilux AL-LC03 (RGB, IR)
  • Arilux AL-LC09 (RGB, RF)

I created a Github repository for anyone who wants to get going fast with them: https://github.com/mertenats/Arilux_AL-LC03

Demo: https://www.youtube.com/watch?v=IKh0inaLvAU

Any questions or suggestions I would be happy to answer.

Sam

9 Likes

Nice work!

I’ve got a similar one without IR.
I never opened it up, but maybe I’m able to add an IR diode to gain the same functionality?
Maybe we could use this to forward other/custom IR codes to hass as an universal receiver…

You didn’t include flash, strobe, fade, smooth functions yet, did you?
I like the ones (smooth strobe green etc.) you find in the MagicHome app…

Is there a way to restore the default firmware?

Thank you!

  1. I think it’s possible to add an IR receiver to the controller, but it will not be well integrated. You probably have the AL-LC01 and it has a free pin (Arilux AL-LC01). To work with this firmware, you need to buy the same IR remote.
  2. Flash, strobe, fade and smooth functions are not yet implemented. I don’t use them, but if I have time these days, I’ll take a look at it.
  3. It’s possible to restore the default firmware only if you possess it. I haven’t found a link to download the original one.

Sam

Looks great, Thanks for sharing.

One question (I have to say, I’m completle new to such Stuff). How do i flash the alternative Firmware?

BR

LUkas

As explained in the README file, it’s a little bit complicated.

  1. Open the module with a cutter and solder wires to RX, TX, VCC, GND and GPIO (or use crocodile clips).
  2. Connect GND, RX to TX (FTDI), TX to RX (FTDI), GPIO0 to a pushbutton, connected to GND.
  3. Connect GND and VCC to a stabilised powering source (if you use the same FTDI as before, the computer could crash). The two GND are connected together.
  4. Download the Arduino IDE, install the support for ESP8266 modules and select Tools, Board, Generic ESP8266 Module.
  5. Download the sketch form the GitHub and upload it.

Sam

1 Like

Hi Sam,

Hmm, ok should be possible to do. Only one Question for this. What Board should i use for this?

Is this one possilbe?

It’s easier to acquire a commercialized LED controller, like

It’s possible with the board you mentioned, but you will need to buy MOSFETs, a box, etc. https://learn.adafruit.com/rgb-led-strips/usage

Sam

Hi Sam,

what i mean, is it possilbe with this Board to reflash the Arilux. I don’t know exactly what you mean with FTDI

I use this one. I don’t know if it’s possible with an ESP.

Newb here.

Buying the AL-LC03, some LED strips, and using your software in HA, and there is nothing else to do to make them work, correct?

Buying the AL-LC03, some LED strips and using the build in Flux Led/MagicLight component (whitout mqtt) does work too.

3 Likes

@vehsen Do have a AL-LC03 with the Flux LED component running? I have some troubles with the Flux LED component regarding Brithness Slider and changeing Colors. Details here:

Good news! I didn’t think about an existing HA component. It’s definitely the easiest and the fastest way to use the Arilux LED controller. Thank you! I waste 1-2 days for nothing […].

Sam

@mertenats
Haha!
It is not a waste of time - I like your solution with MQTT - work on!

@outrun
Yes, I guess i’ve got the same fault(s), but I don’t care ^^

I think you should continue your development. Their protocol is crappy to say the least. mqtt is a far better way to control these little devices. I have one and have experienced issues with HA. Without delving into it any deeper I’m not sure where the issue is but you’re half way there. Keep going.

The way it works with HA it’s next to useless.

1 Like

It seems I have a different handheld controller supplied with my unit.

When I pulled the Arilux apart to add your firmware I realized there was only 1 wire connecting the iR receiver to the Airlux and thought how can this possibly work. Then I quickly discovered that it wasn’t an iR receiver but rather an antenna.

A quick sniff around using my RF Gateway and it’s using the Chinese Protocol 1 to send commands. They must of thought what if the Arilux is mounted in a position where iR cannot get to it and made improvements.

Anyway, just an observation. Obviously your software can still work but would have to be re-written for an RF version of the remote if people still want to use the little controller. I may do that. I have never checked if libraries like RCSwitch work on ESP’s. Was so close to implementing but I want control from the handheld as well cause sometimes it’s a pain to get to HA just to change a colour.

EDIT: The remote sends both iR and RF but only RF is received on my controller.

Kman

1 Like

Did you buy the AL-LC03 model? My model comes from AliExpress and it does probably not have a RF antenna. Thank you for the info.

LOL

Who would have thought there are so many models of something that essentially looks the same. I just checked with Bang Good. Mine is a AL-LC09. When I ordered it, I just saw a picture and it looked the same so I bought it hahaha. Anyway, do you think you will support RF version with your firmware as well? I can give you all the codes from the controller to save you some time. Let me know.

I can try to support RF before the end of December. I would appreciate if you can give me the codes (following if possible the schematic used below) and the name of the library you’re using. Thx.

Sam

/*
 * IR Remote
 * Encoding: NEC
 * +------+------+------+------+
 * |  UP  | Down | OFF  |  ON  |
 * +------+------+------+------+
 * |  R   |  G   |  B   |  W   |
 * +------+------+------+------+
 * |  1   |  2   |  3   |FLASH |
 * +------+------+------+------+
 * |  4   |  5   |  6   |STROBE|
 * +------+------+------+------+
 * |  7   |  8   |  9   | FADE |
 * +------+------+------+------+
 * |  10  |  11  |  12  |SMOOTH|
 * +------+------+------+------+
 */

#ifdef IR_REMOTE
#define ARILUX_IR_CODE_KEY_UP     0xFF906F
#define ARILUX_IR_CODE_KEY_DOWN   0xFFB847
#define ARILUX_IR_CODE_KEY_OFF    0xFFF807
#define ARILUX_IR_CODE_KEY_ON     0xFFB04F
#define ARILUX_IR_CODE_KEY_R      0xFF9867
#define ARILUX_IR_CODE_KEY_G      0xFFD827
#define ARILUX_IR_CODE_KEY_B      0xFF8877
#define ARILUX_IR_CODE_KEY_W      0xFFA857
#define ARILUX_IR_CODE_KEY_1      0xFFE817
#define ARILUX_IR_CODE_KEY_2      0xFF48B7
#define ARILUX_IR_CODE_KEY_3      0xFF6897
#define ARILUX_IR_CODE_KEY_FLASH  0xFFB24D
#define ARILUX_IR_CODE_KEY_4      0xFF02FD
#define ARILUX_IR_CODE_KEY_5      0xFF32CD
#define ARILUX_IR_CODE_KEY_6      0xFF20DF
#define ARILUX_IR_CODE_KEY_STROBE 0xFF00FF
#define ARILUX_IR_CODE_KEY_7      0xFF50AF
#define ARILUX_IR_CODE_KEY_8      0xFF7887
#define ARILUX_IR_CODE_KEY_9      0xFF708F
#define ARILUX_IR_CODE_KEY_FADE   0xFF58A7
#define ARILUX_IR_CODE_KEY_10     0xFF38C7
#define ARILUX_IR_CODE_KEY_11     0xFF28D7
#define ARILUX_IR_CODE_KEY_12     0xFFF00F
#define ARILUX_IR_CODE_KEY_SMOOTH 0xFF30CF
#endif

Here’s the info. All numbers are DEC.

Library is https://github.com/sui77/rc-switch

Codes all come in as Protocol 1, which seems to be the default Chinese standard that a lot of manufacturers use. I have PIR’s, Door Switches, Door Bells etc that all use Protocol 1. Now whether that’s the name for it officially I dont know, but the library that I have attached calls it Protocol 1.

Also the TOGGLE key just seems to rotate through all the colours. The other keys are self explanatory.

/*
 * RF Remote
 * Encoding: Chinese Protocol 1
 * +--------+--------+--------+
 * |   ON   | Toggle |   OFF  |
 * +--------+--------+--------+
 * | Speed+ | Mode+  | Bright+|
 * +--------+--------+--------+
 * | Speed- | Mode-  | Bright-|
 * +--------+--------+--------+
 * |  RED   | GREEN  |  BLUE  |
 * +--------+--------+--------+
 * | ORANGE | LT GRN | LT BLUE|
 * +--------+--------+--------+
 * | AMBER  |  CYAN  | PURPLE |
 * +--------+--------+--------+
 * | YELLOW |  PINK  | WHITE  |
 * +--------+--------+--------+
 */

#ifdef RF_REMOTE
#define ARILUX_RF_CODE_KEY_ON       7808513
#define ARILUX_RF_CODE_KEY_TOGGLE   7808514
#define ARILUX_RF_CODE_KEY_OFF      7808515
#define ARILUX_RF_CODE_KEY_SPEED+   7808616
#define ARILUX_RF_CODE_KEY_MODE+    7808617
#define ARILUX_RF_CODE_KEY_BRIGHT+  7808618
#define ARILUX_RF_CODE_KEY_SPEED-   7808619
#define ARILUX_RF_CODE_KEY_MODE-    7808620
#define ARILUX_RF_CODE_KEY_BRIGHT-  7808621
#define ARILUX_RF_CODE_KEY_RED      7808622
#define ARILUX_RF_CODE_KEY_GREEN    7808623
#define ARILUX_RF_CODE_KEY_BLUE     7808624
#define ARILUX_RF_CODE_KEY_ORANGE   7808625
#define ARILUX_RF_CODE_KEY_LTGRN    7808626
#define ARILUX_RF_CODE_KEY_LTBLUE   7808627
#define ARILUX_RF_CODE_KEY_AMBER    7808628
#define ARILUX_RF_CODE_KEY_CYAN     7808629
#define ARILUX_RF_CODE_KEY_PURPLE   7808630
#define ARILUX_RF_CODE_KEY_YELLOW   7808631
#define ARILUX_RF_CODE_KEY_PINK     7808632
#define ARILUX_RF_CODE_KEY_WHITE    7808633
#endif