diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 76c346c43..d04205c75 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -2,14 +2,14 @@ #include "http_fns.h" #include "../new_pins.h" #include "../new_cfg.h" -#include "../ota/ota.h" -// Commands register, execution API and cmd tokenizer +#include "../ota/ota.h" +// Commands register, execution API and cmd tokenizer #include "../cmnds/cmd_public.h" #include "../driver/drv_tuyaMCU.h" #include "../driver/drv_public.h" #include "../logging/logging.h" -#include "../hal/hal_wifi.h" -#include "../hal/hal_pins.h" +#include "../hal/hal_wifi.h" +#include "../hal/hal_pins.h" #include "../hal/hal_flashConfig.h" #include "../logging/logging.h" @@ -62,6 +62,7 @@ template_t g_templates [] = { { Setup_Device_WiFi_DIY_Switch_WB2S_ZN268131, "WB2S WiFi DIY Switch ZN268131"}, { Setup_Device_TuyaSmartWIFISwith_4Gang_CB3S, "[BK7231N][CB3S] Tuya Smart Wifi Switch 4 Gang"}, { 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"}, }; int g_total_templates = sizeof(g_templates)/sizeof(g_templates[0]); @@ -236,7 +237,7 @@ int http_fn_index(http_request_t *request) { hprintf128(request,"
Ping watchdog - %i lost, %i ok!
", PingWatchDog_GetTotalLost(),PingWatchDog_GetTotalReceived()); - + poststr(request,htmlReturnToMenu); HTTP_AddBuildFooter(request); @@ -1066,9 +1067,9 @@ int http_fn_cfg_ha(http_request_t *request) { } // https://tasmota.github.io/docs/Commands/#with-mqtt /* -http:///cm?cmnd=Power%20TOGGLE -http:///cm?cmnd=Power%20On -http:///cm?cmnd=Power%20off +http:///cm?cmnd=Power%20TOGGLE +http:///cm?cmnd=Power%20On +http:///cm?cmnd=Power%20off http:///cm?user=admin&password=joker&cmnd=Power%20Toggle */ // https://www.elektroda.com/rtvforum/viewtopic.php?p=19330027#19330027 diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index e7a733ff2..8550fc8ed 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -540,6 +540,21 @@ void Setup_Device_TuyaSmartWIFISwith_4Gang_CB3S(){ } +void Setup_Device_LSC_Smart_Connect_Plug_CB2S(){ + CFG_ClearPins(); + + PIN_SetPinRoleForPinIndex(6, IOR_LED); + PIN_SetPinChannelForPinIndex(6, 1); + + PIN_SetPinRoleForPinIndex(7, IOR_Button); + PIN_SetPinChannelForPinIndex(7, 1); + + PIN_SetPinRoleForPinIndex(26, IOR_Relay); + PIN_SetPinChannelForPinIndex(26, 1); + + CFG_Save_SetupTimer(); +} +