diff --git a/src/httpserver/http_fns.c b/src/httpserver/http_fns.c index e101c89ee..647e3454b 100644 --- a/src/httpserver/http_fns.c +++ b/src/httpserver/http_fns.c @@ -63,6 +63,7 @@ template_t g_templates [] = { { Setup_Device_TuyaSmartPFW02G, "Tuya Smart PFW02-G"}, { Setup_Device_AvatarASL04, "Avatar ASL04 5v LED strip"}, { Setup_Device_BL602_MagicHome_IR_RGB_LedStrip, "BL602 Magic Home LED RGB IR Strip"}, + { Setup_Device_Sonoff_MiniR3, "Sonoff MiniR3"}, { Setup_Device_WiFi_DIY_Switch_WB2S_ZN268131, "WB2S WiFi DIY Switch ZN268131"}, { Setup_Device_DS_102_1Gang_WB3S, "DS-102 1 Gang Switch"}, { Setup_Device_DS_102_2Gang_WB3S, "DS-102 2 Gang Switch"}, diff --git a/src/new_builtin_devices.c b/src/new_builtin_devices.c index 2921b11f2..b66dd4e8d 100644 --- a/src/new_builtin_devices.c +++ b/src/new_builtin_devices.c @@ -80,6 +80,24 @@ void Setup_Device_BL602_MagicHome_IR_RGB_LedStrip() { CFG_Save_SetupTimer(); } +// DeviceName: Sonoff MiniR3 +// ShortDeviceName: minir3 +// https://sonoff.tech/product/minir3 +void Setup_Device_Sonoff_MiniR3() { + CFG_ClearPins(); + // P1 WIFI LED inverted + PIN_SetPinRoleForPinIndex(1, IOR_LED_WIFI_n); + PIN_SetPinChannelForPinIndex(1, 1); + // P5 Relay Button + PIN_SetPinRoleForPinIndex(5, IOR_Button); + PIN_SetPinChannelForPinIndex(5, 1); + // P22 Relay + PIN_SetPinRoleForPinIndex(22, IOR_Relay); + PIN_SetPinChannelForPinIndex(22, 1); + + CFG_Save_SetupTimer(); +} + // https://www.elektroda.pl/rtvforum/topic3804553.html // SmartSwitch Tuya WL-SW01_16 16A void Setup_Device_TuyaWL_SW01_16A() { diff --git a/src/new_pins.h b/src/new_pins.h index 6a0fb0fb6..38e519111 100644 --- a/src/new_pins.h +++ b/src/new_pins.h @@ -228,6 +228,7 @@ void Setup_Device_BK7231T_Raw_PrimeWiFiSmartOutletsOutdoor_CCWFIO232PK(); void Setup_Device_AvatarASL04(); void Setup_Device_TuyaSmartWIFISwith_4Gang_CB3S(); void Setup_Device_BL602_MagicHome_IR_RGB_LedStrip(); +void Setup_Device_Sonoff_MiniR3(); void Setup_Device_WiFi_DIY_Switch_WB2S_ZN268131(); void Setup_Device_BK7231N_CB2S_LSPA9_BL0942(); void Setup_Device_LSC_Smart_Connect_Plug_CB2S();