diff --git a/README.md b/README.md index 2112fb62..c8725cd9 100644 --- a/README.md +++ b/README.md @@ -261,8 +261,8 @@ Here is the list of supported hardware. For more information please refer to the |**Itead Sonoff SV**|**Itead 1CH Inching**|**Itead Motor Clockwise/Anticlockwise**| |![Jan Goedeke Wifi Relay (NO/NC)](images/devices/jangoe-wifi-relay.jpg)|![Jorge García Wifi + Relays Board Kit](images/devices/jorgegarcia-wifi-relays.jpg)|![EXS Wifi Relay v3.1](images/devices/exs-wifi-relay-v31.jpg)| |**Jan Goedeke Wifi Relay (NO/NC)**|**Jorge García Wifi + Relays Board Kit**|**EXS Wifi Relay v3.1**| -|![Allterco Shelly1](images/devices/allterco-shelly1.jpg)||| -|**Alterco Shelly1**||| +|![EXS Wifi Relay v5.0](images/devices/exs-wifi-relay-v50.jpg)|![Allterco Shelly1](images/devices/allterco-shelly1.jpg)|| +|**EXS Wifi Relay v5.0**|**Alterco Shelly1**|| |![ManCaveMade ESP-Live](images/devices/mancavemade-esp-live.jpg)|![Wemos D1 Mini Relay Shield](images/devices/wemos-d1-mini-relayshield.jpg)|![Witty Cloud](images/devices/witty-cloud.jpg)| |**ManCaveMade ESP-Live**|**Wemos D1 Mini Relay Shield**|**Witty Cloud**| |![IKE ESPike](images/devices/ike-espike.jpg)|![Pilotak ESP DIN](images/devices/pilotak-esp-din.jpg)|![Arniex Swifitch](images/devices/arniex-swifitch.jpg)| diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 0d0c4de8..0a40d5fb 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -99,6 +99,7 @@ //#define ALLTERCO_SHELLY2 //#define PHYX_ESP12_RGB //#define IWOOLE_LED_TABLE_LAMP +//#define EXS_WIFI_RELAY_V50 //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index e8f6d315..b837fce9 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1385,6 +1385,36 @@ #define RELAY1_TYPE RELAY_TYPE_LATCHED #define RELAY1_RESET_PIN 12 +// ----------------------------------------------------------------------------- +// EX-Store Wifi Relay v5.0 +// ----------------------------------------------------------------------------- + +#elif defined(EXS_WIFI_RELAY_V50) + + // Info + #define MANUFACTURER "EXS" + #define DEVICE "WIFI_RELAY_V50" + + // Buttons + #define BUTTON1_PIN 5 + #define BUTTON2_PIN 4 + #define BUTTON1_RELAY 1 + #define BUTTON2_RELAY 2 + #define BUTTON1_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP + #define BUTTON2_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH | BUTTON_SET_PULLUP + + // Relays + #define RELAY1_PIN 14 + #define RELAY1_TYPE RELAY_TYPE_LATCHED + #define RELAY1_RESET_PIN 16 + #define RELAY2_PIN 13 + #define RELAY2_TYPE RELAY_TYPE_LATCHED + #define RELAY2_RESET_PIN 12 + + // LEDs + #define LED1_PIN 15 + #define LED1_PIN_INVERSE 0 + // ----------------------------------------------------------------------------- // V9261F // ----------------------------------------------------------------------------- diff --git a/code/espurna/migrate.ino b/code/espurna/migrate.ino index 806a82e5..4e45cfec 100644 --- a/code/espurna/migrate.ino +++ b/code/espurna/migrate.ino @@ -1204,6 +1204,25 @@ void migrate() { setSetting("chLogic", 3, 0); setSetting("relays", 1); + #elif defined(EXS_WIFI_RELAY_V50) + + setSetting("board", 91); + + setSetting("btnGPIO", 0, 5); + setSetting("btnGPIO", 1, 4); + setSetting("btnRelay", 0, 0); + setSetting("btnRelay", 1, 1); + + setSetting("relayGPIO", 0, 14); + setSetting("relayGPIO", 1, 13); + setSetting("relayResetGPIO", 0, 16); + setSetting("relayResetGPIO", 1, 12); + setSetting("relayType", 0, RELAY_TYPE_LATCHED); + setSetting("relayType", 0, RELAY_TYPE_LATCHED); + + setSetting("ledGPIO", 1, 15); + setSetting("ledLogic", 1, 0); + #else // Allow users to define new settings without migration config diff --git a/code/platformio.ini b/code/platformio.ini index e6ab1152..9d81cf13 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1501,6 +1501,31 @@ upload_flags = ${common.upload_flags} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} +[env:exs-wifi-relay-v50] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_4m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_4m1m} -DEXS_WIFI_RELAY_V50 +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:exs-wifi-relay-v50-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_4m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_4m1m} -DEXS_WIFI_RELAY_V50 +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:wemos-v9261f] platform = ${common.platform} framework = ${common.framework} diff --git a/images/devices/exs-wifi-relay-v50.jpg b/images/devices/exs-wifi-relay-v50.jpg new file mode 100644 index 00000000..a259d7e4 Binary files /dev/null and b/images/devices/exs-wifi-relay-v50.jpg differ