|
@ -1,35 +1,3 @@ |
|
|
//-------------------------------------------------------------------------------- |
|
|
|
|
|
// HARDWARE |
|
|
|
|
|
// This setting is normally provided by PlatformIO |
|
|
|
|
|
// Uncomment the appropiate line to build from the Arduino IDE |
|
|
|
|
|
//-------------------------------------------------------------------------------- |
|
|
|
|
|
|
|
|
|
|
|
//#define NODEMCUV2 |
|
|
|
|
|
//#define SONOFF |
|
|
|
|
|
//#define SONOFF_TH |
|
|
|
|
|
//#define SLAMPHER |
|
|
|
|
|
//#define S20 |
|
|
|
|
|
//#define SONOFF_SV |
|
|
|
|
|
//#define SONOFF_POW |
|
|
|
|
|
//#define SONOFF_DUAL |
|
|
|
|
|
//#define SONOFF_4CH |
|
|
|
|
|
//#define ESP_RELAY_BOARD |
|
|
|
|
|
//#define ECOPLUG |
|
|
|
|
|
//#define ESPURNA |
|
|
|
|
|
//#define MQTT_RELAY |
|
|
|
|
|
|
|
|
|
|
|
//#define ENABLE_DHT 1 |
|
|
|
|
|
//#define ENABLE_DS18B20 1 |
|
|
|
|
|
//#define ENABLE_EMON 1 |
|
|
|
|
|
//#define ENABLE_HLW8018 1 |
|
|
|
|
|
//#define ENABLE_RF 1 |
|
|
|
|
|
//#define ENABLE_FAUXMO 0 |
|
|
|
|
|
//#define ENABLE_NOFUSS 1 |
|
|
|
|
|
|
|
|
|
|
|
#ifndef ENABLE_FAUXMO |
|
|
|
|
|
#define ENABLE_FAUXMO 1 |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// Development boards |
|
|
// Development boards |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -39,7 +7,9 @@ |
|
|
#define MANUFACTURER "NODEMCU" |
|
|
#define MANUFACTURER "NODEMCU" |
|
|
#define DEVICE "LOLIN" |
|
|
#define DEVICE "LOLIN" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -48,6 +18,7 @@ |
|
|
#define MANUFACTURER "WEMOS" |
|
|
#define MANUFACTURER "WEMOS" |
|
|
#define DEVICE "D1_MINI" |
|
|
#define DEVICE "D1_MINI" |
|
|
#define RELAY1_PIN 5 |
|
|
#define RELAY1_PIN 5 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -60,7 +31,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SONOFF" |
|
|
#define DEVICE "SONOFF" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -69,7 +42,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SONOFF_TH" |
|
|
#define DEVICE "SONOFF_TH" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -78,7 +53,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SONOFF_SV" |
|
|
#define DEVICE "SONOFF_SV" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -87,7 +64,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SLAMPHER" |
|
|
#define DEVICE "SLAMPHER" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -96,7 +75,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "S20" |
|
|
#define DEVICE "S20" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -105,7 +86,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SONOFF_TOUCH" |
|
|
#define DEVICE "SONOFF_TOUCH" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
@ -114,7 +97,9 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SONOFF_POW" |
|
|
#define DEVICE "SONOFF_POW" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 15 |
|
|
#define LED1_PIN 15 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
#define ENABLE_POW 1 |
|
|
#define ENABLE_POW 1 |
|
@ -134,16 +119,42 @@ |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define MANUFACTURER "ITEAD" |
|
|
#define DEVICE "SONOFF_4CH" |
|
|
#define DEVICE "SONOFF_4CH" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON2_PIN 9 |
|
|
#define BUTTON2_PIN 9 |
|
|
|
|
|
#define BUTTON2_RELAY 2 |
|
|
#define BUTTON3_PIN 10 |
|
|
#define BUTTON3_PIN 10 |
|
|
|
|
|
#define BUTTON3_RELAY 3 |
|
|
#define BUTTON4_PIN 14 |
|
|
#define BUTTON4_PIN 14 |
|
|
|
|
|
#define BUTTON4_RELAY 4 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY2_PIN 5 |
|
|
#define RELAY2_PIN 5 |
|
|
|
|
|
#define RELAY2_PIN_INVERSE 0 |
|
|
#define RELAY3_PIN 4 |
|
|
#define RELAY3_PIN 4 |
|
|
|
|
|
#define RELAY3_PIN_INVERSE 0 |
|
|
#define RELAY4_PIN 15 |
|
|
#define RELAY4_PIN 15 |
|
|
|
|
|
#define RELAY4_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
#define LED1_PIN_INVERSE 1 |
|
|
|
|
|
|
|
|
|
|
|
#elif defined(ITEAD_1CH_INCHING) |
|
|
|
|
|
|
|
|
|
|
|
// Note: definitions for this board are based on third party data |
|
|
|
|
|
// and have not been fully tested yet. If you have the chance to |
|
|
|
|
|
// test them, please report back. Thank you. |
|
|
|
|
|
|
|
|
|
|
|
#define MANUFACTURER "ITEAD" |
|
|
|
|
|
#define DEVICE "1CH_INCHING" |
|
|
|
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON2_PIN 15 |
|
|
|
|
|
#define BUTTON2_RELAY 0 |
|
|
|
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
|
|
|
#define LED1_PIN 13 |
|
|
|
|
|
#define LED1_PIN_INVERSE 0 |
|
|
|
|
|
#define LED_PULSE 14 |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// Electrodragon boards |
|
|
// Electrodragon boards |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -153,9 +164,13 @@ |
|
|
#define MANUFACTURER "ELECTRODRAGON" |
|
|
#define MANUFACTURER "ELECTRODRAGON" |
|
|
#define DEVICE "ESP_RELAY_BOARD" |
|
|
#define DEVICE "ESP_RELAY_BOARD" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON2_PIN 2 |
|
|
#define BUTTON2_PIN 2 |
|
|
|
|
|
#define BUTTON2_RELAY 2 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY2_PIN 13 |
|
|
#define RELAY2_PIN 13 |
|
|
|
|
|
#define RELAY2_PIN_INVERSE 0 |
|
|
#define LED1_PIN 16 |
|
|
#define LED1_PIN 16 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
|
|
|
|
|
@ -168,10 +183,42 @@ |
|
|
#define MANUFACTURER "WORKCHOICE" |
|
|
#define MANUFACTURER "WORKCHOICE" |
|
|
#define DEVICE "ECOPLUG" |
|
|
#define DEVICE "ECOPLUG" |
|
|
#define BUTTON1_PIN 13 |
|
|
#define BUTTON1_PIN 13 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 15 |
|
|
#define RELAY1_PIN 15 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
#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) |
|
|
// ESPurna board (still beta) |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -181,7 +228,9 @@ |
|
|
#define MANUFACTURER "TINKERMAN" |
|
|
#define MANUFACTURER "TINKERMAN" |
|
|
#define DEVICE "ESPURNA" |
|
|
#define DEVICE "ESPURNA" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
|
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
|
|
|
|
|
@ -194,6 +243,7 @@ |
|
|
#define MANUFACTURER "OPENENERGYMONITOR" |
|
|
#define MANUFACTURER "OPENENERGYMONITOR" |
|
|
#define DEVICE "MQTT_RELAY" |
|
|
#define DEVICE "MQTT_RELAY" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
|
|
|
#define BUTTON1_RELAY 1 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 16 |
|
|
#define LED1_PIN 16 |
|
|