diff --git a/src/httpserver/new_http.c b/src/httpserver/new_http.c index 0e16a0677..12f33b15c 100644 --- a/src/httpserver/new_http.c +++ b/src/httpserver/new_http.c @@ -300,6 +300,9 @@ typedef struct template_s { template_t g_templates [] = { { Setup_Device_Empty, "Empty"}, + // BK7231N devices + { Setup_Device_BK7231N_CB2S_QiachipSmartSwitch, "[BK7231N][CB2S] QiaChip Smart Switch"}, + // BK7231T devices { Setup_Device_TuyaWL_SW01_16A, "WL SW01 16A"}, { Setup_Device_TuyaSmartLife4CH10A, "Smart Life 4CH 10A"}, { Setup_Device_IntelligentLife_NF101A, "Intelligent Life NF101A"}, diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index 3fbe3dc80..1647344fd 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -250,6 +250,25 @@ void Setup_Device_EmaxHome_EDU8774() { PIN_SaveToFlash(); } +// TODO - ELEKTRODA LINK +// QiachipSmartSwitch +void Setup_Device_BK7231N_CB2S_QiachipSmartSwitch() { + + + + PIN_ClearPins(); + // Button + PIN_SetPinRoleForPinIndex(7, IOR_Button); + PIN_SetPinChannelForPinIndex(7, 1); + // Relay + PIN_SetPinRoleForPinIndex(8, IOR_Relay); + PIN_SetPinChannelForPinIndex(8, 1); + // Led + + PIN_SaveToFlash(); +} + + // https://www.tokmanni.fi/alypistorasia-home-connect-ip20-6419860720456 // Marked as Smart-PFW02-G // Relay (with npn-transistor) at PWM4 P24 diff --git a/src/new_pins.h b/src/new_pins.h index 690526b2d..1a6e8760f 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -65,6 +65,7 @@ void Setup_Device_NedisWIFIPO120FWT_16A(); void Setup_Device_NedisWIFIP130FWT_10A(); void Setup_Device_EmaxHome_EDU8774(); void Setup_Device_TuyaSmartPFW02G(); +void Setup_Device_BK7231N_CB2S_QiachipSmartSwitch(); #endif