Browse Source

add support for shelly1 relay

ech1560
abmantis 6 years ago
parent
commit
cfc0f806b6
3 changed files with 24 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +14
    -0
      code/espurna/config/hardware.h
  3. +9
    -0
      code/espurna/migrate.ino

+ 1
- 0
code/espurna/config/arduino.h View File

@ -91,6 +91,7 @@
//#define BH_ONOFRE //#define BH_ONOFRE
//#define ITEAD_SONOFF_IFAN02 //#define ITEAD_SONOFF_IFAN02
//#define GENERIC_AG_L4 //#define GENERIC_AG_L4
#define ALLTERCO_SHELLY1
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


+ 14
- 0
code/espurna/config/hardware.h View File

@ -2728,6 +2728,20 @@
#define NETBIOS_SUPPORT 1 #define NETBIOS_SUPPORT 1
#define SSDP_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 #endif
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


+ 9
- 0
code/espurna/migrate.ino View File

@ -1087,6 +1087,15 @@ void migrate() {
setSetting("chLogic", 2, 0); setSetting("chLogic", 2, 0);
setSetting("relays", 1); 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 #else
// Allow users to define new settings without migration config // Allow users to define new settings without migration config


Loading…
Cancel
Save