diff --git a/README.md b/README.md index 54f156a23..78e1ed941 100644 --- a/README.md +++ b/README.md @@ -21,6 +21,7 @@ OpenBeken features: - Driver system for custom peripherals, including TuyaMCU, I2C bus and BL0942, BL0937 power metering chips - Supports multiple I2C devices, like TC74 temperature sensor, MCP23017 port expander, PCF8574T LCD 2x16 (or other?), etc - NTP time from network (can be used with TH06 and other TuyaMCU devices) +- basic support for TuyaMCU Battery Powered devices protocol (TuyaMCU enables WiFi module only to report the state, eg. for door sensors, water sensors) - RGBCW LED lighting control compatible with Home Assistant (both PWM LEDs, SM2135 LEDs and BP5758 LEDs) - LittleFS integration for large files (resides in OTA memory, so you have to backup it every time you OTA) - Command line system for starting and configuring drivers diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index 01032a8ee..1d6fb3d86 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -45,7 +45,8 @@ template_t g_templates [] = { { Setup_Device_Empty, "Empty"}, // BK7231N devices { Setup_Device_BK7231N_CB2S_QiachipSmartSwitch, "[BK7231N][CB2S] QiaChip Smart Switch"}, - {Setup_Device_BK7231N_KS_602_TOUCH, "[BK7231N] KS 602 Touch Switch US"}, + { Setup_Device_BK7231N_KS_602_TOUCH, "[BK7231N] KS 602 Touch Switch US"}, + { Setup_Device_Aubess_Mini_Smart_Switch_16A, "[BK7231N] Aubess Mini Smart Switch 16A"}, // BK7231T devices { Setup_Device_BK7231T_WB2S_QiachipSmartSwitch, "[BK7231T][WB2S] QiaChip Smart Switch"}, { Setup_Device_TuyaWL_SW01_16A, "WL SW01 16A"}, diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index b66dd4e8d..90e0869a3 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -805,5 +805,31 @@ void Setup_Device_Enbrighten_WFD4103(){ PIN_SetPinRoleForPinIndex(26, IOR_Button); PIN_SetPinChannelForPinIndex(26, 1); + CFG_Save_SetupTimer(); +} + +// Aubess Mini Smart Switch 16A +void Setup_Device_Aubess_Mini_Smart_Switch_16A() { + + // pins are: + // led - led_n = P6 + // embedded button - btn = P8 + // switch - btn = P14 + // relay - rel = P15 + + CFG_ClearPins(); + // Led + PIN_SetPinRoleForPinIndex(6, IOR_LED_n); + PIN_SetPinChannelForPinIndex(6, 1); + // Embedded Button + PIN_SetPinRoleForPinIndex(8, IOR_Button); + PIN_SetPinChannelForPinIndex(8, 1); + // Switch + PIN_SetPinRoleForPinIndex(14, IOR_Button); + PIN_SetPinChannelForPinIndex(14, 1); + // Relay + PIN_SetPinRoleForPinIndex(15, IOR_Relay); + PIN_SetPinChannelForPinIndex(15, 1); + CFG_Save_SetupTimer(); } \ No newline at end of file diff --git a/src/new_pins.h b/src/new_pins.h index 4aa59316d..9d2790ba5 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -242,6 +242,6 @@ void Setup_Device_13A_Socket_CB2S(); void Setup_Device_Deta_Smart_Double_Power_Point_6922HA_Series2(); void Setup_Device_BK7231N_KS_602_TOUCH(); void Setup_Device_Enbrighten_WFD4103(); - +void Setup_Device_Aubess_Mini_Smart_Switch_16A(); #endif