Browse Source

Merge pull request #1128 from abmantis/shelly1

add support for shelly1 relay
ech1560
Xose Pérez 6 years ago
committed by GitHub
parent
commit
3f8f425b1b
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
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 ITEAD_SONOFF_IFAN02
//#define GENERIC_AG_L4
#define ALLTERCO_SHELLY1
//--------------------------------------------------------------------------------
// 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 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
// -----------------------------------------------------------------------------


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

@ -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


Loading…
Cancel
Save