From 801e22a03465274f1578d1ad423faa6928aacfbe Mon Sep 17 00:00:00 2001 From: tom-kaltofen <57728660+tom-kaltofen@users.noreply.github.com> Date: Thu, 15 Oct 2020 18:56:39 +0200 Subject: [PATCH] hardware: add support for LSC E27 10W white bulb (#2375) * Add support for LSC E27 10W white bulb * Add OTA config for LSC E27 10W white bulb Add LSC E27 10W white bulb to arduino.h --- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 21 +++++++++++++++++++++ code/platformio.ini | 4 ++++ code/platformio_ota.ini | 3 +++ 4 files changed, 29 insertions(+) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 7c8b6655..ebd88fbb 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -181,6 +181,7 @@ //#define ZHILDE_44EU_W //#define ZHILDE_64EU_W //#define FCMILA_E27_7W_RGBW +//#define LSC_E27_10W_WHITE //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 082db49e..68b90aff 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -4971,6 +4971,27 @@ #define LIGHT_CH3_PIN 14 // BLUE #define LIGHT_CH4_PIN 5 // WHITE +// ----------------------------------------------------------------------------- +// LSC E27 10W White Bulb with TYLC6E ESP8266 module +// https://www.action.com/de-at/p/lsc-smart-connect-intelligente-led-lampe/ +// ----------------------------------------------------------------------------- + +#elif defined(LSC_E27_10W_WHITE) + + // Info + #define MANUFACTURER "LSC" + #define DEVICE "E27_10W_WHITE" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 2 + #define LIGHT_CH1_PIN 5 // WARM WHITE LED PWM PIN + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_PIN 4 // COLD WHITE LED PWM PIN + #define LIGHT_CH2_INVERSE 0 + #else #error "UNSUPPORTED HARDWARE!!" diff --git a/code/platformio.ini b/code/platformio.ini index 9e1ca4a1..783b02ec 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1056,3 +1056,7 @@ src_build_flags = -DPRODINO_WIFI -DNOWSAUTH [env:fcmila-e27-7w-rgbw] extends = env:esp8266-1m-base src_build_flags = -DFCMILA_E27_7W_RGBW + +[env:lsc-e27-10w-white] +extends = env:esp8266-1m-base +src_build_flags = -DLSC_E27_10W_WHITE diff --git a/code/platformio_ota.ini b/code/platformio_ota.ini index c10685cd..2c615041 100644 --- a/code/platformio_ota.ini +++ b/code/platformio_ota.ini @@ -473,3 +473,6 @@ extends = env:ehomediy-wt03 [env:fcmila-e27-7w-rgbw-ota] extends = env:fcmila-e27-7w-rgbw + +[env:lsc-e27-10w-white-ota] +extends = env:lsc-e27-10w-white