diff --git a/README.md b/README.md index e794e602..43a94c7b 100644 --- a/README.md +++ b/README.md @@ -238,8 +238,10 @@ Here is the list of supported hardware. For more information please refer to the |**Electrodragon WiFi IOT**|**OpenEnergyMonitor WiFi MQTT Relay / Thermostat**|| |![Itead S20](images/devices/itead-s20.jpg)|![Itead S20](images/devices/itead-s26.jpg)|![Neo Coolcam NAS WR01W](images/devices/neo-coolcam-wifi.jpg)| |**Itead S20**|**Itead S26**|**Neo Coolcam NAS WR01W**| -|![Schuko Wifi Plug](images/devices/schuko-wifi-plug.jpg)|![KMC 70011](images/devices/kmc-70011.jpg)|![Xenon SM-PW702U](images/devices/xenon-sm-pw702u.jpg)| -|**Schuko Wifi Plug**|**KMC 70011**|**Xenon SM-PW702U**| +|![Schuko Wifi Plug](images/devices/schuko-wifi-plug.jpg)|![Schuko Wifi Plug V2](images/devices/schuko-wifi-plug-v2.jpg)| +|**Schuko Wifi Plug**|**Schuko Wifi Plug V2**| +|![KMC 70011](images/devices/kmc-70011.jpg)|![Xenon SM-PW702U](images/devices/xenon-sm-pw702u.jpg)|| +**KMC 70011**|**Xenon SM-PW702U**|| |![Maxcio W-US002S](images/devices/maxcio-w-us002s.jpg)|![HEYGO HY02](images/devices/heygo-hy02.jpg)|![YiDian XS-SSA05](images/devices/yidian-xs-ssa05.jpg)| |**Maxcio W-US002S**|**HEYGO HY02**|**YiDian XS-SSA05**| |![WiOn 50055](images/devices/wion-50055.jpg)|![LINGAN SWA1](images/devices/lingan-swa1.jpg)|![HomeCube 16A](images/devices/homecube-16a.jpg)| diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 274bec2b..e8b3e177 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -67,6 +67,7 @@ //#define WEMOS_D1_TARPUNA_SHIELD //#define GIZWITS_WITTY_CLOUD //#define EUROMATE_WIFI_STECKER_SCHUKO +//#define EUROMATE_WIFI_STECKER_SCHUKO_V2 //#define TONBUX_POWERSTRIP02 //#define LINGAN_SWA1 //#define HEYGO_HY02 diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index ba7a6bce..ddbd435c 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1817,7 +1817,7 @@ #define HLW8012_VOLTAGE_R_UP ( 2 * 1000000 ) // Upstream voltage resistor // ----------------------------------------------------------------------------- -// Euromate (?) Wifi Stecker Shuko +// Euromate (?) Wifi Stecker Schuko // https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko/p/2291706 // Thanks to @Geitde // ----------------------------------------------------------------------------- @@ -1847,6 +1847,36 @@ #define LED1_PIN 4 #define LED1_PIN_INVERSE 0 +// ----------------------------------------------------------------------------- +// Euromate (?) Wifi Stecker Schuko Version 2 +// This configuration is for the second generation of devices sold by OBI. +// https://www.obi.de/hausfunksteuerung/wifi-stecker-schuko-weiss/p/4077806 +// ----------------------------------------------------------------------------- +#elif defined(EUROMATE_WIFI_STECKER_SCHUKO_V2) + + // Info + #define MANUFACTURER "EUROMATE" + #define DEVICE "WIFI_STECKER_SCHUKO_V2" + + // Buttons + #define BUTTON1_PIN 5 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // Relays + #define RELAY1_PIN 4 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // Green + #define LED1_PIN 12 + #define LED1_MODE LED_MODE_WIFI + #define LED1_PIN_INVERSE 0 + + // Red + #define LED2_PIN 13 + #define LED2_MODE LED_MODE_RELAY + #define LED2_PIN_INVERSE 0 + // ----------------------------------------------------------------------------- // Generic 8CH // ----------------------------------------------------------------------------- diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index 008a943f..c12ed228 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -1233,6 +1233,18 @@ void migrate() { setSetting("relayGPIO", 0, 5); setSetting("relayType", 0, RELAY_TYPE_NORMAL); + #elif defined(EUROMATE_WIFI_STECKER_SCHUKO_V2) + + setSetting("board", 93); + setSetting("ledGPIO", 0, 13); // Red LED + setSetting("ledLogic", 0, 1); + setSetting("ledGPIO", 1, 12); // Green LED + setSetting("ledLogic", 1, 1); + 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 diff --git a/code/platformio.ini b/code/platformio.ini index df5c0e3e..ae99d9af 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1940,6 +1940,31 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} +[env:euromate-wifi-stecker-shuko-v2] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_2m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_2m1m} -DEUROMATE_WIFI_STECKER_SCHUKO_V2 +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:euromate-wifi-stecker-shuko-v2-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_2m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_2m1m} -DEUROMATE_WIFI_STECKER_SCHUKO_V2 +upload_speed = ${common.upload_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + [env:tonbux-powerstrip02] platform = ${common.platform} framework = ${common.framework} @@ -2953,4 +2978,3 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} - diff --git a/images/devices/schuko-wifi-plug-v2.jpg b/images/devices/schuko-wifi-plug-v2.jpg new file mode 100644 index 00000000..551d83a7 Binary files /dev/null and b/images/devices/schuko-wifi-plug-v2.jpg differ