From 4af4cc7fd0d6c90795d297de0686a2d038573de1 Mon Sep 17 00:00:00 2001 From: Casey Fitzpatrick Date: Fri, 7 Dec 2018 08:42:03 -0500 Subject: [PATCH] Add support for Lombex Lux Nova 2 Color and White smart bulb --- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 25 +++++++++++++++++++++++++ code/platformio.ini | 25 +++++++++++++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index e7405081..3d63ecfe 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -103,6 +103,7 @@ //#define EXS_WIFI_RELAY_V50 //#define TECKIN_SP22_V14 //#define LOMBEX_LUX_NOVA2_TUNABLE_WHITE +//#define LOMBEX_LUX_NOVA2_WHITE_COLOR //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index afb0bcc1..4c1c5f80 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -2980,6 +2980,31 @@ // No RGB on this bulb. Warm white on channel 0, cool white on channel 3 #define MY92XX_MAPPING 255, 255, 255, 3, 0 +// ----------------------------------------------------------------------------- +// Lombex Lux Nova 2 White and Color +// https://www.amazon.com/Lombex-Compatible-Equivalent-Dimmable-2700K-6500K/dp/B07B8K72PR +// ----------------------------------------------------------------------------- +#elif defined(LOMBEX_LUX_NOVA2_WHITE_COLOR) + + // Info + #define MANUFACTURER "LOMBEX" + #define DEVICE "LUX_NOVA2_WHITE_COLOR" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_MY92XX + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 5 + #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 + // RGB on channels 0/1/2, warm white on channel 3 + // The presence of warm leds on these bulbs may just be a common defect. + // If your bulb has cool leds, use 0, 1, 2, 3. Can also reduce LIGHT_CHANNELS. + #define MY92XX_MAPPING 0, 1, 2, 255, 3 + // ----------------------------------------------------------------------------- // Bestek Smart Plug with 2 USB ports // https://www.bestekcorp.com/bestek-smart-plug-works-with-amazon-alexa-google-assistant-and-ifttt-with-2-usb diff --git a/code/platformio.ini b/code/platformio.ini index 92f6964a..63263b43 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2329,6 +2329,31 @@ upload_flags = ${common.upload_flags} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} +[env:lombex-lux-nova2-white-color] +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} -DLOMBEX_LUX_NOVA2_WHITE_COLOR +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:lombex-lux-nova2-white-color-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} -DLOMBEX_LUX_NOVA2_WHITE_COLOR +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} + # ------------------------------------------------------------------------------ # GENERIC OTA ENVIRONMENTS # ------------------------------------------------------------------------------