diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 9f291cf5..2d9d27c1 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -55,6 +55,8 @@ //#define XENON_SM_PW702U //#define AUTHOMETION_LYT8266 //#define GENERIC_8CH +//#define ARILUX_AL_LC01 +//#define ARILUX_AL_LC11 //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/general.h b/code/espurna/config/general.h index 6eac75f3..b97117b8 100644 --- a/code/espurna/config/general.h +++ b/code/espurna/config/general.h @@ -664,6 +664,22 @@ PROGMEM const char* const custom_reset_string[] = { #if IR_SUPPORT #if IR_BUTTON_SET == 1 +/* + +------+------+------+------+ + | UP | Down | OFF | ON | + +------+------+------+------+ + | R | G | B | W | + +------+------+------+------+ + | 1 | 2 | 3 |FLASH | + +------+------+------+------+ + | 4 | 5 | 6 |STROBE| + +------+------+------+------+ + | 7 | 8 | 9 | FADE | + +------+------+------+------+ + | 10 | 11 | 12 |SMOOTH| + +------+------+------+------+ +*/ + #define IR_BUTTON_COUNT 24 const unsigned long IR_BUTTON[IR_BUTTON_COUNT][3] PROGMEM = { @@ -705,6 +721,22 @@ PROGMEM const char* const custom_reset_string[] = { //Remote Buttons SET 2 (another identical IR Remote shipped with another controller) #if IR_BUTTON_SET == 2 +/* + +------+------+------+------+ + | UP | Down | OFF | ON | + +------+------+------+------+ + | R | G | B | W | + +------+------+------+------+ + | 1 | 2 | 3 |FLASH | + +------+------+------+------+ + | 4 | 5 | 6 |STROBE| + +------+------+------+------+ + | 7 | 8 | 9 | FADE | + +------+------+------+------+ + | 10 | 11 | 12 |SMOOTH| + +------+------+------+------+ +*/ + #define IR_BUTTON_COUNT 24 const unsigned long IR_BUTTON[IR_BUTTON_COUNT][3] PROGMEM = { @@ -742,6 +774,7 @@ PROGMEM const char* const custom_reset_string[] = { }; #endif + #endif // IR_SUPPORT //-------------------------------------------------------------------------------- diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 5bb5035b..971740c8 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1165,6 +1165,27 @@ // Arilux AL-LC06 // ----------------------------------------------------------------------------- +#elif defined(ARILUX_AL_LC01) + + // Info + #define MANUFACTURER "ARILUX" + #define DEVICE "AL_LC01" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 4 + #define LIGHT_CH1_PIN 5 // RED + #define LIGHT_CH2_PIN 12 // GREEN + #define LIGHT_CH3_PIN 13 // BLUE + #define LIGHT_CH4_PIN 14 // WHITE1 + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + #define LIGHT_CH4_INVERSE 0 + + #elif defined(ARILUX_AL_LC06) // Info @@ -1188,6 +1209,29 @@ #define LIGHT_CH5_INVERSE 0 +#elif defined(ARILUX_AL_LC11) + + // Info + #define MANUFACTURER "ARILUX" + #define DEVICE "AL_LC11" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 5 + #define LIGHT_CH1_PIN 5 // RED + #define LIGHT_CH2_PIN 4 // GREEN + #define LIGHT_CH3_PIN 14 // BLUE + #define LIGHT_CH4_PIN 13 // WHITE1 + #define LIGHT_CH5_PIN 12 // WHITE1 + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + #define LIGHT_CH4_INVERSE 0 + #define LIGHT_CH5_INVERSE 0 + + #elif defined(ARILUX_E27) // Info diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index 21998e04..6e24a880 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -651,6 +651,38 @@ void migrate() { setSetting("relayType", 6, RELAY_TYPE_NORMAL); setSetting("relayType", 7, RELAY_TYPE_NORMAL); + #elif defined(ARILUX_AL_LC01) + + setSetting("board", 50); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); + setSetting("chGPIO", 0, 5); + setSetting("chGPIO", 1, 12); + setSetting("chGPIO", 2, 13); + setSetting("chGPIO", 3, 14); + setSetting("chLogic", 0, 0); + setSetting("chLogic", 1, 0); + setSetting("chLogic", 2, 0); + setSetting("chLogic", 3, 0); + setSetting("relays", 1); + + #elif defined(ARILUX_AL_LC11) + + setSetting("board", 51); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); + setSetting("chGPIO", 0, 5); + setSetting("chGPIO", 1, 4); + setSetting("chGPIO", 2, 14); + setSetting("chGPIO", 3, 13); + setSetting("chGPIO", 4, 12); + setSetting("chLogic", 0, 0); + setSetting("chLogic", 1, 0); + setSetting("chLogic", 2, 0); + setSetting("chLogic", 3, 0); + setSetting("chLogic", 4, 0); + setSetting("relays", 1); + #else #error "UNSUPPORTED HARDWARE!" diff --git a/code/platformio.ini b/code/platformio.ini index 671d7bb0..11f2a876 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -839,6 +839,29 @@ upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 monitor_baud = 115200 +[env:arilux-al-lc01] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC01 +monitor_baud = 115200 + +[env:arilux-al-lc01-ota] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC01 +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 + [env:arilux-al-lc06] platform = ${common.platform} framework = arduino @@ -862,6 +885,29 @@ upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 monitor_baud = 115200 +[env:arilux-al-lc11] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC11 +monitor_baud = 115200 + +[env:arilux-al-lc11-ota] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = -g -Wl,-Tesp8266.flash.1m0.ld -DARILUX_AL_LC11 +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 + [env:arilux-e27] platform = ${common.platform} framework = arduino