Skip to content

Commit

Permalink
Added configuration for the new WIFI device sold by Obi (xoseperez#1408)
Browse files Browse the repository at this point in the history
* Added the configuration for the second generation OBI devices.

* Added link to the OBI Wifi Schuko Plug V2 as well as included the device in the readme.

* Restored the default configuration accidentially changed by a previous commit.

* Renamed the OBI-V2 device to EUROMATE_WIFI_STECKER_SCHUKO_V2 as suggested by mcspr.

* Fixed spelling of comment to the proper wording Schuko.
  • Loading branch information
arthurf1969 authored and mcspr committed Dec 11, 2018
1 parent 8b84f89 commit 8cddd90
Show file tree
Hide file tree
Showing 6 changed files with 73 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)|
Expand Down
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 31 additions & 1 deletion code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
// -----------------------------------------------------------------------------
Expand Down Expand Up @@ -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
// -----------------------------------------------------------------------------
Expand Down
12 changes: 12 additions & 0 deletions code/espurna/migrate.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 25 additions & 1 deletion code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down Expand Up @@ -2953,4 +2978,3 @@ upload_port = ${common.upload_port}
upload_flags = ${common.upload_flags}
monitor_speed = ${common.monitor_speed}
extra_scripts = ${common.extra_scripts}

Binary file added images/devices/schuko-wifi-plug-v2.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8cddd90

Please sign in to comment.