diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 9cd55e2d..bb1763c0 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -91,6 +91,7 @@ //#define BH_ONOFRE //#define ITEAD_SONOFF_IFAN02 //#define GENERIC_AG_L4 +#define ALLTERCO_SHELLY1 //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 17727ee7..b319713c 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -2728,6 +2728,20 @@ #define NETBIOS_SUPPORT 1 #define SSDP_SUPPORT 1 +#elif defined(ALLTERCO_SHELLY1) + + // Info + #define MANUFACTURER "ALLTERCO" + #define DEVICE "SHELLY1" + + // Buttons + #define BUTTON1_PIN 5 + #define BUTTON1_MODE BUTTON_SWITCH + #define BUTTON1_RELAY 1 + + // Relays + #define RELAY1_PIN 4 + #define RELAY1_TYPE RELAY_TYPE_NORMAL #endif // ----------------------------------------------------------------------------- diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index 005c7a19..7d2789c5 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -1087,6 +1087,15 @@ void migrate() { setSetting("chLogic", 2, 0); setSetting("relays", 1); + #elif defined(ALLTERCO_SHELLY1) + + setSetting("board", 83); + setSetting("btnGPIO", 0, 5); + setSetting("btnRelay", 0, 0); + setSetting("relayGPIO", 0, 4); + setSetting("relayType", 0, RELAY_TYPE_NORMAL); + + #else // Allow users to define new settings without migration config