diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 4d7fa57d..51264ecc 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1045,6 +1045,22 @@ #define LIGHT_CH4_INVERSE 0 #define LIGHT_CH5_INVERSE 0 + +#elif defined(ARILUX_E27) + + // Info + #define MANUFACTURER "ARILUX" + #define DEVICE "E27" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_MY9192 + #define DUMMY_RELAY_COUNT 1 + + // Channels + #define MY9291_CHANNELS 4 + #define MY9291_DI_PIN 13 + #define MY9291_DCKI_PIN 15 + #define MY9291_COMMAND MY9291_COMMAND_DEFAULT + // ----------------------------------------------------------------------------- // XENON SM-PW701U // ----------------------------------------------------------------------------- diff --git a/code/espurna/hardware.ino b/code/espurna/hardware.ino index 6b21090f..f9c1b04a 100644 --- a/code/espurna/hardware.ino +++ b/code/espurna/hardware.ino @@ -557,6 +557,15 @@ void hwUpwardsCompatibility() { setSetting("relays", 1); setSetting("enGPIO", 15); + #elif defined(ARILUX_E27) + + setSetting("board", 46); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_MY9192); + setSetting("myDIGPIO", 13); + setSetting("myDCKIGPIO", 15); + setSetting("relays", 1); + #else #error "UNSUPPORTED HARDWARE!" diff --git a/code/platformio.ini b/code/platformio.ini index 40f68586..1cf2fbd3 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -820,6 +820,29 @@ upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 monitor_baud = 115200 +[env:arilux-e27] +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_E27 +monitor_baud = 115200 + +[env:arilux-e27-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_E27 +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 + [env:itead-bnsz01] platform = ${common.platform} framework = arduino