Browse Source

Merged in denisfrench/espurna/mqtt_relay (pull request #7)

Add support for WiFi MQTT Relay / Thermostat from OpenEnergyMonitor
fastled
Xose Pérez 7 years ago
parent
commit
9604385ae2
5 changed files with 38 additions and 1 deletions
  1. +1
    -1
      README.md
  2. +1
    -0
      code/espurna/config/arduino.h
  3. +15
    -0
      code/espurna/config/hardware.h
  4. +21
    -0
      code/platformio.ini
  5. BIN
      images/devices/mqtt-relay.jpg

+ 1
- 1
README.md View File

@ -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


+ 1
- 0
code/espurna/config/arduino.h View File

@ -28,6 +28,7 @@
//#define WIFI_RELAY_NC
//#define WIFI_RELAY_NO
//#define ESPURNA
//#define MQTT_RELAY
//--------------------------------------------------------------------------------
// Features (values below are non-default values)


+ 15
- 0
code/espurna/config/hardware.h View File

@ -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
// -----------------------------------------------------------------------------


+ 21
- 0
code/platformio.ini View File

@ -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

BIN
images/devices/mqtt-relay.jpg View File

Before After
Width: 300  |  Height: 257  |  Size: 6.9 KiB

Loading…
Cancel
Save