Skip to content

Commit

Permalink
Support for EXS WiFi Relay 5.0 (thanks to @cheise, xoseperez#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
xoseperez committed Sep 25, 2018
1 parent b666cfc commit 11bebb0
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 2 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)|
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 @@ -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)
Expand Down
30 changes: 30 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
// -----------------------------------------------------------------------------
Expand Down
19 changes: 19 additions & 0 deletions code/espurna/migrate.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
25 changes: 25 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Binary file added images/devices/exs-wifi-relay-v50.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 11bebb0

Please sign in to comment.