diff --git a/README.md b/README.md index 3983fc51..d60fb6d5 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,7 @@ For more information please refer to the [ESPurna Wiki](https://bitbucket.org/xo |![IteadStudio Sonoff Dual](images/devices/sonoff-dual.jpg) **IteadStudio Sonoff Dual**|![IteadStudio Sonoff POW](images/devices/sonoff-pow.jpg) **IteadStudio Sonoff POW**|![IteadStudio Sonoff TH10/TH16](images/devices/sonoff-th10-th16.jpg) **IteadStudio Sonoff TH10/TH16**| |![IteadStudio Sonoff RF](images/devices/sonoff-rf.jpg) **IteadStudio Sonoff RF**|![IteadStudio Sonoff SV](images/devices/sonoff-sv.jpg) **IteadStudio Sonoff SV**|![IteadStudio Sonoff Touch](images/devices/sonoff-touch.jpg) **IteadStudio Sonoff Touch**| |![Wemos D1 Mini Relay Shield](images/devices/d1mini.jpg) **Wemos D1 Mini Relay Shield**|![Electrodragon Relay Board](images/devices/electrodragon-relay-board.jpg) **Electrodragon Relay Board**|![WorkChoice EcoPlug](images/devices/workchoice-ecoplug.jpg) **WorkChoice EcoPlug**| +|![JanGoe Wifi Relay (NO/NC)](images/devices/jangoe-wifi-relay.png) **JanGoe Wifi Relay (NO/NC)**||| ## License diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index d8bb52d2..340029f6 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -25,6 +25,8 @@ //#define SONOFF_4CH //#define ESP_RELAY_BOARD //#define ECOPLUG +//#define WIFI_RELAY_NC +//#define WIFI_RELAY_NO //#define ESPURNA //-------------------------------------------------------------------------------- diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 35247368..5dead08f 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -171,6 +171,36 @@ #define LED1_PIN 2 #define LED1_PIN_INVERSE 0 +// ----------------------------------------------------------------------------- +// JanGoe Wifi Relay (https://github.com/JanGoe/esp8266-wifi-relay) +// ----------------------------------------------------------------------------- + +#elif defined(WIFI_RELAY_NC) + + #define MANUFACTURER "JANGOE" + #define DEVICE "WIFI_RELAY_NC" + #define BUTTON1_PIN 12 + #define BUTTON1_RELAY 1 + #define BUTTON2_PIN 13 + #define BUTTON2_RELAY 2 + #define RELAY1_PIN 2 + #define RELAY1_PIN_INVERSE 1 + #define RELAY2_PIN 14 + #define RELAY2_PIN_INVERSE 1 + +#elif defined(WIFI_RELAY_NO) + + #define MANUFACTURER "JANGOE" + #define DEVICE "WIFI_RELAY_NO" + #define BUTTON1_PIN 12 + #define BUTTON1_RELAY 1 + #define BUTTON2_PIN 13 + #define BUTTON2_RELAY 2 + #define RELAY1_PIN 2 + #define RELAY1_PIN_INVERSE 0 + #define RELAY2_PIN 14 + #define RELAY2_PIN_INVERSE 0 + // ----------------------------------------------------------------------------- // ESPurna board (still beta) // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index 97c03780..634b0a9d 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -254,3 +254,24 @@ build_flags = -g -Wl,-Tesp8266.flash.1m128.ld -DDEBUG_PORT=Serial -DECOPLUG upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 + +[env:jangoe-debug] +platform = espressif8266 +framework = arduino +board = esp01_1m +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +extra_script = pio_hooks.py +build_flags = -g -DDEBUG_PORT=Serial -DWIFI_RELAY_NC + +[env:jangoe-debug-ota] +platform = espressif8266 +framework = arduino +board = esp01_1m +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +extra_script = pio_hooks.py +build_flags = -g -DDEBUG_PORT=Serial -DWIFI_RELAY_NC +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 diff --git a/images/devices/jangoe-wifi-relay.png b/images/devices/jangoe-wifi-relay.png new file mode 100644 index 00000000..271b6c7d Binary files /dev/null and b/images/devices/jangoe-wifi-relay.png differ