Browse Source

Added Wifi Stecker Shuko device (thanks to @Geitde)

rfm69
Xose Pérez 6 years ago
parent
commit
3fdedd5125
4 changed files with 69 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +32
    -0
      code/espurna/config/hardware.h
  3. +12
    -0
      code/espurna/migrate.ino
  4. +24
    -0
      code/platformio.ini

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

@ -61,6 +61,7 @@
//#define ARILUX_AL_LC02 //#define ARILUX_AL_LC02
//#define WEMOS_D1_TARPUNA_SHIELD //#define WEMOS_D1_TARPUNA_SHIELD
//#define GIZWITS_WITTY_CLOUD //#define GIZWITS_WITTY_CLOUD
//#define EUROMATE_WIFI_STECKER_SCHUKO
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


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

@ -1458,6 +1458,38 @@
#define HLW8012_CF1_PIN 5 #define HLW8012_CF1_PIN 5
#define HLW8012_CF_PIN 4 #define HLW8012_CF_PIN 4
// -----------------------------------------------------------------------------
// Euromate (?) Wifi Stecker Shuko
// https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706
// Thanks to @Geitde
// -----------------------------------------------------------------------------
#elif defined(EUROMATE_WIFI_STECKER_SCHUKO)
// Info
#define MANUFACTURER "EUROMATE"
#define DEVICE "WIFI_STECKER_SCHUKO"
// Buttons
#define BUTTON1_PIN 14
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
// Relays
// #define RELAY1_PIN 12
// #define RELAY1_TYPE RELAY_TYPE_LATCHED_INVERSE
// #define RELAY1_RESET_PIN 5
// Hack: drive GPIO12 low and use GPIO5 as normal relay pin:
#define RELAY1_PIN 5
#define RELAY1_TYPE RELAY_TYPE_NORMAL
#define LED2_PIN 12 /* DUMMY: exploit default off state for GPIO12=low */
#define LED2_PIN_INVERSE 0
// LEDs
#define LED1_PIN 4
#define LED1_PIN_INVERSE 0
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Generic 8CH // Generic 8CH
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


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

@ -727,6 +727,18 @@ void migrate() {
setSetting("chLogic", 2, 0); setSetting("chLogic", 2, 0);
setSetting("relays", 1); setSetting("relays", 1);
#elif defined(EUROMATE_WIFI_STECKER_SCHUKO)
setSetting("board", 55);
setSetting("ledGPIO", 0, 4);
setSetting("ledLogic", 0, 0);
setSetting("ledGPIO", 1, 12);
setSetting("ledLogic", 1, 0);
setSetting("btnGPIO", 0, 14);
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 5);
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


+ 24
- 0
code/platformio.ini View File

@ -1471,6 +1471,30 @@ upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
[env:euromate-wifi-stecker-shuko]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DEUROMATE_WIFI_STECKER_SCHUKO
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:euromate-wifi-stecker-shuko-ota]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DEUROMATE_WIFI_STECKER_SCHUKO
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
[env:stm-relay-ota] [env:stm-relay-ota]
platform = ${common.platform} platform = ${common.platform}
framework = arduino framework = arduino


Loading…
Cancel
Save