diff --git a/README.md b/README.md index 4b8b0bb6..e617f38c 100644 --- a/README.md +++ b/README.md @@ -51,7 +51,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)**||| +|![JanGoe Wifi Relay (NO/NC)](images/devices/jangoe-wifi-relay.png) **JanGoe Wifi Relay (NO/NC)**|![WiFi MQTT Relay / Thermostat](images/devices/mqtt-relay.jpg) **WiFi MQTT Relay / Thermostat**|| ## License diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 489c42b8..437148c3 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -28,6 +28,7 @@ //#define WIFI_RELAY_NC //#define WIFI_RELAY_NO //#define ESPURNA +//#define MQTT_RELAY //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 2d0dd5f2..04610f3d 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -234,6 +234,21 @@ #define LED1_PIN 13 #define LED1_PIN_INVERSE 0 +// ----------------------------------------------------------------------------- +// WiFi MQTT Relay / Thermostat +// ----------------------------------------------------------------------------- + +#elif defined(MQTT_RELAY) + + #define MANUFACTURER "OPENENERGYMONITOR" + #define DEVICE "MQTT_RELAY" + #define BUTTON1_PIN 0 + #define BUTTON1_RELAY 1 + #define RELAY1_PIN 12 + #define RELAY1_PIN_INVERSE 0 + #define LED1_PIN 16 + #define LED1_PIN_INVERSE 0 + // ----------------------------------------------------------------------------- // Unknown hardware // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index cb9ca7eb..843b95d4 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -284,3 +284,24 @@ build_flags = -g -DDEBUG_PORT=Serial -DWIFI_RELAY_NC upload_speed = 115200 upload_port = "192.168.4.1" upload_flags = --auth=fibonacci --port 8266 + +[env:mqtt-relay-debug] +platform = espressif8266 +framework = arduino +board = esp_wroom_02 +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +extra_script = pio_hooks.py +build_flags = -g -DDEBUG_PORT=Serial -DMQTT_RELAY -DENABLE_DS18B20=1 + +[env:mqtt-relay-debug-ota] +platform = espressif8266 +framework = arduino +board = esp_wroom_02 +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +extra_script = pio_hooks.py +build_flags = -g -DDEBUG_PORT=Serial -DMQTT_RELAY -DENABLE_DS18B20=1 +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 diff --git a/images/devices/mqtt-relay.jpg b/images/devices/mqtt-relay.jpg new file mode 100644 index 00000000..942bbc4d Binary files /dev/null and b/images/devices/mqtt-relay.jpg differ