Buying the AL-LC03, some LED strips and using the build in Flux Led/MagicLight component (whitout mqtt) does work too.
@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.
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
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
Thank you. I updated the sketch on the dev branch. I assumed that the RF receiver is connected at the same pin as the IR receiver (#define ARILUX_RF_PIN 4
). When you’ve time, can you try it? Thx.
Sam
OK
RX pin is 4 for sure. RF receives OK but only ON & OFF is working. No other buttons do anything. Obviously mqtt is working fine. So positive from a RF receive point of view.
EDIT: Checked my codes again. Typo from my behalf. Will change them now and confirm
Also I notice when power is cut to the unit and it turns on for the first time, it actually comes on. This is good for some people but for places like mine where we get power interruptions daily it seems it’s an issue because you come home to lights on
All working Excellent
These are new codes
#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_PLUS 7808516
#define ARILUX_RF_CODE_KEY_MODE_PLUS 7808517
#define ARILUX_RF_CODE_KEY_BRIGHT_PLUS 7808518
#define ARILUX_RF_CODE_KEY_SPEED_MINUS 7808519
#define ARILUX_RF_CODE_KEY_MODE_MINUS 7808520
#define ARILUX_RF_CODE_KEY_BRIGHT_MINUS 7808521
#define ARILUX_RF_CODE_KEY_RED 7808522
#define ARILUX_RF_CODE_KEY_GREEN 7808523
#define ARILUX_RF_CODE_KEY_BLUE 7808524
#define ARILUX_RF_CODE_KEY_ORANGE 7808525
#define ARILUX_RF_CODE_KEY_LTGRN 7808526
#define ARILUX_RF_CODE_KEY_LTBLUE 7808527
#define ARILUX_RF_CODE_KEY_AMBER 7808528
#define ARILUX_RF_CODE_KEY_CYAN 7808529
#define ARILUX_RF_CODE_KEY_PURPLE 7808530
#define ARILUX_RF_CODE_KEY_YELLOW 7808531
#define ARILUX_RF_CODE_KEY_PINK 7808532
#define ARILUX_RF_CODE_KEY_WHITE 7808533
#endif
Oops
Edit again. I did notice it reset. Was on Telnet monitoring and telnet stopped, unit came back on full bright default color. I will leave it on and just keep checking. Wasn’t power issue.
I disabled the auto “turn on at startup”. The master branch is now updated. Thanks for your work; I mentioned your name in the README file.
My pleasure Also Sam there is a clearly defined model range for these units. After further investigation I now understand the model lineup. It is based on whether it is an IR or RF based controller, and secondly how many leds it supports. RGB, RGBW, or RGBWW. Maybe what you can do in your Github is tell people clearly what models you support because it caught me off guard basically because they all look almost identical.
AL-LC01 - No Controller, RGB, 5-28V
AL-LC02 - No Controller, RGBW, 9-12V
AL-LC03 - iR Controller, RGB, 5-28V
AL-LC04 - iR Controller, RGBW, 9-12V
AL-LC08 - No Controller, RGBWW, 5-28V
AL-LC09 - RF Controller, RGB, 5-28V
AL-LC10 - RF Controller, RGBW, 9-28V
AL-LC11 - RF Controller, RGBWW, 9-28V
EDIT: BTW the link you provided to AliExpress further up was great. When I clicked it the AL-LC03 was on special for $8USD so I bought 2 more. Great value.
Sam
I’m getting a lot of random resets with the 1 Arilux I have. Have you seen this problem with yours. Of course it comes back straight away but because I default the unit to OFF when I turn it on, I need to go back into HA and turn it back on again. It comes back at full brightness, but hasn’t updated HA with it’s brightness and HA thinks it’s the value before it crashed.
Just my observations.
EDIT: Looking at my comment above it was resetting even back a while ago.
Kman
Thank you for your feedback. It’s strange, I didn’t have problems when I was using it. I’m for 3 months in Australia and I didn’t take my stuffs with; I will look at it when I’ll be back.
OK no problems. Welcome to Australia, I live here
are the output pins the same across the different controller versions?
Lars
Does anyone know if there is a wallmounted rf/wifi Transmitter you could use as a compliment to the phone?
First i would like to thank you for the firmware, loaded and worked great on my ARILUX® AL-LC01, Great to see you included security for the MQTT connection.
As im sure you have seen the Arilux units all seem to be fully populated for RGBW use. Would it be possible for you to add in the option to use the white as well? It could have its own MQTT topic for the white.
I had a go but my Arduino skills are lacking way behind understanding some of your code. White is connected to pin 13.
I find you can never get a nice while from RGB on its own and RGBW led strip is not expensive at all these days.
Another nice feature would be for the new colour to fade in over about 50-100ms?
Thank you again for the firmware