diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 2838182c..6d9c30f9 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -41,6 +41,7 @@ //#define ELECTRODRAGON_WIFI_IOT //#define WORKCHOICE_ECOPLUG //#define AITHINKER_AI_LIGHT +//#define LYASI_LIGHT //#define MAGICHOME_LED_CONTROLLER //#define MAGICHOME_LED_CONTROLLER_20 //#define HUACANXING_H801 diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index b30c09cd..85695ea9 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1151,6 +1151,28 @@ #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT #define MY92XX_MAPPING 0, 1, 2, 3 +// ----------------------------------------------------------------------------- +// Lyasi LED +// ----------------------------------------------------------------------------- + +#elif defined(LYASI_LIGHT) + + // Info + #define MANUFACTURER "LYASI" + #define DEVICE "RGB-LED" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 4 + #define MY92XX_MODEL MY92XX_MODEL_MY9291 + #define MY92XX_CHIPS 1 + #define MY92XX_DI_PIN 4 + #define MY92XX_DCKI_PIN 5 + #define MY92XX_COMMAND MY92XX_COMMAND_DEFAULT + #define MY92XX_MAPPING 0, 1, 2, 3 + // ----------------------------------------------------------------------------- // LED Controller // ----------------------------------------------------------------------------- diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index c12ed228..f1e7eafe 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -257,6 +257,17 @@ void migrate() { setSetting("myDCKIGPIO", 15); setSetting("relays", 1); + #elif defined(LYASI_LIGHT) + + setSetting("board", 20); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_MY92XX); + setSetting("myModel", MY92XX_MODEL_MY9291); + setSetting("myChips", 1); + setSetting("myDIGPIO", 4); + setSetting("myDCKIGPIO", 5); + setSetting("relays", 1); + #elif defined(MAGICHOME_LED_CONTROLLER) setSetting("board", 21); diff --git a/code/platformio.ini b/code/platformio.ini index 67be54c6..b3bced25 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1207,6 +1207,31 @@ upload_flags = ${common.upload_flags} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} +[env:lyasi-rgb-light] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DLYASI_LIGHT +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:lyasi-rgb-light-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DLYASI_LIGHT +upload_speed = ${common.upload_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + [env:magichome-led-controller] platform = ${common.platform} framework = ${common.framework}