diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index ee77a638..fddc2418 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -47,6 +47,7 @@ //#define GENERIC_ESP01S_RELAY_V40 //#define GENERIC_ESP01S_RGBLED_V10 //#define GENERIC_GU10 +//#define GENERIC_E14 //#define GENERIC_V9261F //#define GIZWITS_WITTY_CLOUD //#define GOSUND_WS1 diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 8fe84327..d0e1519c 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -3511,6 +3511,30 @@ #define LIGHT_CH3_INVERSE 0 #define LIGHT_CH4_INVERSE 0 +// ----------------------------------------------------------------------------- +// Generic E14 +// https://www.ebay.com/itm/LED-Bulb-Wifi-E14-4-5W-Candle-RGB-W-4in1-Dimmable-V-tac-Smart-VT-5114/163899840601 +// ----------------------------------------------------------------------------- + +#elif defined(GENERIC_E14) + + // Info + #define MANUFACTURER "GENERIC" + #define DEVICE "E14" + #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 4 // RED + #define LIGHT_CH2_PIN 12 // GREEN + #define LIGHT_CH3_PIN 14 // BLUE + #define LIGHT_CH4_PIN 5 // WHITE + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + #define LIGHT_CH4_INVERSE 0 // ----------------------------------------------------------------------------- // Nexete A19 diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index e1bb7884..bc0bb718 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -1387,6 +1387,21 @@ void migrate() { setSetting("chLogic", 3, 0); setSetting("relays", 1); + #elif defined(GENERIC_E14) + + setSetting("board", 103); + setSetting("relayProvider", RELAY_PROVIDER_LIGHT); + setSetting("lightProvider", LIGHT_PROVIDER_DIMMER); + setSetting("chGPIO", 0, 4); + setSetting("chGPIO", 1, 12); + setSetting("chGPIO", 2, 14); + setSetting("chGPIO", 3, 5); + setSetting("chLogic", 0, 0); + setSetting("chLogic", 1, 0); + setSetting("chLogic", 2, 0); + setSetting("chLogic", 3, 0); + setSetting("relays", 1); + #else // Allow users to define new settings without migration config diff --git a/code/platformio.ini b/code/platformio.ini index 9e5fbdc9..10214ae7 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1593,6 +1593,16 @@ build_flags = ${common.build_flags_1m0m} -DGENERIC_GU10 upload_port = ${common.ota_upload_port} upload_flags = ${common.ota_upload_flags} +[env:generic-e14] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DGENERIC_E14 + +[env:generic-e14-ota] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DGENERIC_E14 +upload_port = ${common.ota_upload_port} +upload_flags = ${common.ota_upload_flags} + [env:nexete-a19] board = ${common.board_1m} build_flags = ${common.build_flags_1m0m} -DNEXETE_A19