diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 05438529b..01a6c22bc 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -67,6 +67,7 @@ template_t g_templates [] = { { Setup_Device_BK7231N_CB2S_LSPA9_BL0942, "[BK7231N][CB2S] LSPA9 power metering plug BL0942 version"}, { Setup_Device_LSC_Smart_Connect_Plug_CB2S, "[BK7231N][CB2S] LSC Smart Connect Plug"}, { Setup_Device_BK7231T_Gosund_Switch_SW5_A_V2_1, "BK7231T Gosund Smart Switch SW5-A-V2.1"}, + { Setup_Device_13A_Socket_CB2S, "BK7231N CB3S 13A Aliexpress socket"}, }; 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 676138c13..355cdaf7f 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -653,5 +653,30 @@ void Setup_Device_DS_102_3Gang_WB3S(){ PIN_SetPinChannelForPinIndex(11, 3); + CFG_Save_SetupTimer(); +} + +// https://obrazki.elektroda.pl/8563462300_1652196315.jpg +// https://obrazki.elektroda.pl/8998188300_1652196330.jpg +// https://obrazki.elektroda.pl/2281136200_1652196339.jpg +// https://obrazki.elektroda.pl/1568452900_1652196348.jpg +// https://obrazki.elektroda.pl/4600787700_1652196323.jpg +void Setup_Device_13A_Socket_CB2S(){ + CFG_ClearPins(); + + PIN_SetPinRoleForPinIndex(6, IOR_LED); + PIN_SetPinChannelForPinIndex(6, 0); + PIN_SetPinRoleForPinIndex(7, IOR_LED); + PIN_SetPinChannelForPinIndex(7, 1); + + PIN_SetPinRoleForPinIndex(8, IOR_Button); + PIN_SetPinChannelForPinIndex(8, 0); + PIN_SetPinChannel2ForPinIndex(8, 1); + + PIN_SetPinRoleForPinIndex(24, IOR_Relay_n); + PIN_SetPinChannelForPinIndex(24, 0); + PIN_SetPinRoleForPinIndex(25, IOR_Relay_n); + PIN_SetPinChannelForPinIndex(25, 1); + CFG_Save_SetupTimer(); }