diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 4607f890e..580f23427 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -111,7 +111,9 @@ template_t g_templates [] = { { Setup_Device_CasaLifeCCTDownlight, "CasaLife CCT LED Downlight SMART-AL2017-TGTS"}, { Setup_Device_Enbrighten_WFD4103, "Enbrighten WFD4103 WiFi Switch BK7231T WB2S"} , { Setup_Device_Zemismart_Light_Switch_KS_811_3, "Zemismart Light Switch (Neutral Optional) KS_811_3"} , - { Setup_Device_TeslaSmartPlus_TSL_SPL_1, "Tesla Smart Plug. Model: (TSL-SPL-1)"} + { Setup_Device_TeslaSmartPlus_TSL_SPL_1, "Tesla Smart Plug. Model: (TSL-SPL-1)"}, + { Setup_Device_Calex_900011_1_WB2S, "Calex Smart Power Plug 900011.1"} + }; 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 5065c7c78..3fc9ef3ff 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -912,3 +912,21 @@ void Setup_Device_TeslaSmartPlus_TSL_SPL_1() { CFG_Save_SetupTimer(); } + +void Setup_Device_Calex_900011_1_WB2S(){ + CFG_ClearPins(); + + PIN_SetPinRoleForPinIndex(6, IOR_Button); + PIN_SetPinChannelForPinIndex(6, 1); + + PIN_SetPinRoleForPinIndex(7, IOR_LED_n); + PIN_SetPinChannelForPinIndex(7, 1); + + PIN_SetPinRoleForPinIndex(24, IOR_Relay); + PIN_SetPinChannelForPinIndex(24, 1); + + PIN_SetPinRoleForPinIndex(8, IOR_LED_WIFI_n); + PIN_SetPinChannelForPinIndex(8, 2); + + CFG_Save_SetupTimer(); +} diff --git a/src/new_pins.h b/src/new_pins.h index d6ad0085c..596ff9081 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -270,5 +270,6 @@ void Setup_Device_Enbrighten_WFD4103(); void Setup_Device_Aubess_Mini_Smart_Switch_16A(); void Setup_Device_Zemismart_Light_Switch_KS_811_3(); void Setup_Device_TeslaSmartPlus_TSL_SPL_1(); +void Setup_Device_Calex_900011_1_WB2S(); #endif