diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 742b9e215..94341059c 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -74,6 +74,7 @@ template_t g_templates [] = { { Setup_Device_13A_Socket_CB2S, "BK7231N CB2S 13A Aliexpress socket"}, { Setup_Device_Deta_Smart_Double_Power_Point_6922HA_Series2, "BK7231T DETA SMART Double Power Point 6922HA-Series 2"}, { Setup_Device_ArlecRGBCCTDownlight, "Arlec RGB+CCT LED Downlight ALD092RHA"}, + { Setup_Device_CasaLifeCCTDownlight, "CasaLife CCT LED Downlight SMART-AL2017-TGTS"}, }; int g_total_templates = sizeof(g_templates)/sizeof(g_templates[0]); diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index a5157581d..9e72bdf35 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -300,6 +300,30 @@ void Setup_Device_ArlecRGBCCTDownlight() { CFG_Save_SetupTimer(); } +// https://www.elektroda.com/rtvforum/viewtopic.php?p=20123466#20123466 +// CasaLife CCT Downlight SMART-AL2017-TGTS +// Sold by ALDI Australia +void Setup_Device_CasaLifeCCTDownlight() { + + // WB2L + // pins are: + // color temperature - PWM1 = P7 + // brightness - PWM2 = P8 + + CFG_ClearPins(); + + // color temperature + PIN_SetPinChannelForPinIndex(7, 0); + PIN_SetPinRoleForPinIndex(7, IOR_PWM); + // brightness + PIN_SetPinChannelForPinIndex(8, 1); + PIN_SetPinRoleForPinIndex(8, IOR_PWM); + // Raw PWM values already control temperature/brighness so enable "Flag 3 -[LED][Debug] Show raw PWM controller on WWW index instead of new LED RGB/CW/etc picker" + CFG_SetFlag(OBK_FLAG_LED_RAWCHANNELSMODE, true); + + CFG_Save_SetupTimer(); +} + // https://www.elektroda.pl/rtvforum/topic3804553.html // SmartSwitch Nedis WIFIPO120FWT void Setup_Device_NedisWIFIPO120FWT_16A() { diff --git a/src/new_pins.h b/src/new_pins.h index 0b0423e84..f85fedd34 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -217,6 +217,7 @@ void Setup_Device_CalexLEDDimmerFiveChannel(); void Setup_Device_CalexPowerStrip_900018_1v1_0UK(); void Setup_Device_ArlecCCTDownlight(); void Setup_Device_ArlecRGBCCTDownlight(); +void Setup_Device_CasaLifeCCTDownlight(); void Setup_Device_NedisWIFIPO120FWT_16A(); void Setup_Device_NedisWIFIP130FWT_10A(); void Setup_Device_EmaxHome_EDU8774();