From c25d6509bf93ee6b5a64b2da66f6912e344c4df3 Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Mon, 13 Jan 2020 05:29:25 -0600 Subject: [PATCH] Add MagicHome ZJ_LB_RGBWW_L support (#2100) --- code/espurna/config/hardware.h | 22 ++++++++++++++++++++++ code/platformio.ini | 10 ++++++++++ 2 files changed, 32 insertions(+) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index dc969d1f..3f6695e1 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1433,6 +1433,28 @@ #define LIGHT_CH4_INVERSE 0 #define LIGHT_CH5_INVERSE 0 +#elif defined(MAGICHOME_ZJ_LB_RGBWW_L) + + // Info + #define MANUFACTURER "MAGICHOME" + #define DEVICE "ZJ_LB_RGBWW_L" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Light + #define LIGHT_CHANNELS 5 + #define LIGHT_CH1_PIN 5 // RED + #define LIGHT_CH2_PIN 4 // GREEN + #define LIGHT_CH3_PIN 14 // BLUE + #define LIGHT_CH4_PIN 12 // COLD WHITE + #define LIGHT_CH5_PIN 13 // WARM WHITE + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + #define LIGHT_CH4_INVERSE 0 + #define LIGHT_CH5_INVERSE 0 + // ----------------------------------------------------------------------------- // HUACANXING H801 & H802 // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index e52ea639..58e641e9 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -758,6 +758,16 @@ build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_ESPM_5CH_B_13 upload_port = ${common.ota_upload_port} upload_flags = ${common.ota_upload_flags} +[env:magichome-zj-lb-rgbww-l] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_LB_RGBWW_L + +[env:magichome-zj-lb-rgbww-l-ota] +board = ${common.board_1m} +build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_LB_RGBWW_L +upload_port = ${common.ota_upload_port} +upload_flags = ${common.ota_upload_flags} + [env:magichome-zj-wfmn-c-11] board = ${common.board_1m} build_flags = ${common.build_flags_1m0m} -DMAGICHOME_ZJ_WFMN_C_11