diff --git a/sonoff/user_config.h b/sonoff/user_config.h
index 63aa88e6f..6d80fff83 100644
--- a/sonoff/user_config.h
+++ b/sonoff/user_config.h
@@ -288,8 +288,6 @@
#define USE_LM75AD // Enable LM75AD sensor (I2C addresses 0x48 - 0x4F) (+0k5 code)
// #define USE_APDS9960 // Enable APDS9960 Proximity Sensor (I2C address 0x39). Disables SHT and VEML6070 (+4k7 code)
// #define USE_MCP230xx // Enable MCP23008/MCP23017 for GP INPUT ONLY (I2C addresses 0x20 - 0x27) providing command Sensor29 for configuration (+2k2 code)
-// #define USE_MCP230xx_displaymain // Display pin status on Tasmota main page (+0k2 code)
-// #define USE_MCP230xx_webconfig // Enable web config button and form to Tasmota web interface (+2k1 code)
// #define USE_MPR121 // Enable MPR121 controller (I2C addresses 0x5A, 0x5B, 0x5C and 0x5D) in input mode for touch buttons (+1k3 code)
#endif // USE_I2C
diff --git a/sonoff/xdrv_02_webserver.ino b/sonoff/xdrv_02_webserver.ino
index 3f6a7b628..12ed741ac 100644
--- a/sonoff/xdrv_02_webserver.ino
+++ b/sonoff/xdrv_02_webserver.ino
@@ -190,10 +190,6 @@ const char HTTP_BTN_RSTRT[] PROGMEM =
"
";
const char HTTP_BTN_MENU_MODULE[] PROGMEM =
"
";
-#if defined(USE_I2C) && defined(USE_MCP230xx) && defined(USE_MCP230xx_webconfig)
-const char HTTP_BTN_MCP230XX[] PROGMEM =
- "
";
-#endif // USE_I2C and USE_MCP230xx and USE_MCP230xx_webconfig
#if defined(USE_TIMERS) && defined(USE_TIMERS_WEB)
const char HTTP_BTN_MENU_TIMER[] PROGMEM =
"
";
@@ -383,9 +379,6 @@ void StartWebserver(int type, IPAddress ipweb)
#ifndef BE_MINIMAL
WebServer->on("/cn", HandleConfiguration);
WebServer->on("/md", HandleModuleConfiguration);
-#if defined(USE_I2C) && defined(USE_MCP230xx) && defined(USE_MCP230xx_webconfig)
- WebServer->on("/mc", HandleMCP230xxConfiguration);
-#endif // USE_I2C and USE_MCP230xx and USE_MCP230xx_webconfig
#if defined(USE_TIMERS) && defined(USE_TIMERS_WEB)
WebServer->on("/tm", HandleTimerConfiguration);
#endif // USE_TIMERS and USE_TIMERS_WEB
@@ -693,11 +686,6 @@ void HandleConfiguration()
page.replace(F("{v}"), FPSTR(S_CONFIGURATION));
page += FPSTR(HTTP_HEAD_STYLE);
page += FPSTR(HTTP_BTN_MENU_MODULE);
-#if defined(USE_I2C) && defined(USE_MCP230xx) && defined(USE_MCP230xx_webconfig)
- if (MCP230xx_Type()) { // Configuration button will only show if MCP23008/MCP23017 was detected on I2C
- page += FPSTR(HTTP_BTN_MCP230XX);
- }
-#endif // USE_I2C and USE_MCP230xx and USE_MCP230xx_webconfig
#if defined(USE_TIMERS) && defined(USE_TIMERS_WEB)
#ifdef USE_RULES
page += FPSTR(HTTP_BTN_MENU_TIMER);
@@ -1136,11 +1124,6 @@ void HandleSaveSettings()
}
AddLog(LOG_LEVEL_INFO);
break;
-#if defined(USE_I2C) && defined(USE_MCP230xx) && defined(USE_MCP230xx_webconfig)
- case 8:
- MCP230xx_SaveSettings();
- break;
-#endif // USE_I2C and USE_MCP230xx and USE_MCP230xx_webconfig
case 6:
WebGetArg("g99", tmp, sizeof(tmp));
byte new_module = (!strlen(tmp)) ? MODULE : atoi(tmp);
diff --git a/sonoff/xsns_29_mcp230xx.ino b/sonoff/xsns_29_mcp230xx.ino
index 2df5f80da..5d1667abe 100644
--- a/sonoff/xsns_29_mcp230xx.ino
+++ b/sonoff/xsns_29_mcp230xx.ino
@@ -55,154 +55,10 @@ uint8_t MCP230xx_GPIO = 0x09;
uint8_t mcp230xx_type = 0;
uint8_t mcp230xx_address;
uint8_t mcp230xx_addresses[] = { MCP230xx_ADDRESS1, MCP230xx_ADDRESS2, MCP230xx_ADDRESS3, MCP230xx_ADDRESS4, MCP230xx_ADDRESS5, MCP230xx_ADDRESS6, MCP230xx_ADDRESS7, MCP230xx_ADDRESS8 };
-uint8_t mcp280xx_pincount = 0;
+uint8_t mcp230xx_pincount = 0;
const char MCP230XX_SENSOR_RESPONSE[] PROGMEM = "{\"Sensor29\":{\"D\":%i,\"MODE\":%i,\"PULL-UP\":%i}}";
-#ifdef USE_WEBSERVER
-#ifdef USE_MCP230xx_displaymain
-const char HTTP_SNS_MCP230xx_GPIO[] PROGMEM = "%s{s}MCP230XX D%d{m}%d{e}"; // {s} = , {m} = | , {e} = |
-#endif // USE_MCP230xx_displaymain
-#ifdef USE_MCP230xx_webconfig
-const char MCP230XX_OPTION_SELECTED[] PROGMEM = " selected";
-const char MCP230XX_OPTION_BLANK[] PROGMEM = "";
-const char MCP230XX_OPTION_CHECKED[] PROGMEM = " checked";
-const char HTTP_FORM_I2C_MCP230XX_T[] PROGMEM = "";
-const char HTTP_FORM_I2C_MCP230XX_TE[] PROGMEM = "
";
-
-const char HTTP_FORM_MCP230XX[] PROGMEM =
- "