|
@ -1,3 +1,21 @@ |
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
// Configuration HELP |
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
// |
|
|
|
|
|
// MANUFACTURER: Name of the manufacturer of the board ("string") |
|
|
|
|
|
// DEVICE: Name of the device ("string") |
|
|
|
|
|
// BUTTON#_PIN: GPIO for the n-th button (1-based, up to 4 buttons) |
|
|
|
|
|
// BUTTON#_RELAY: Relay number that will be bind to the n-th button (1-based) |
|
|
|
|
|
// BUTTON#_MODE: A mask of options (BUTTON_PUSHBUTTON and BUTTON_SWITCH cannot be together) |
|
|
|
|
|
// - BUTTON_PUSHBUTTON: button event is fired when released |
|
|
|
|
|
// - BUTTON_SWITCH: button event is fired when pressed or released |
|
|
|
|
|
// - BUTTON_DEFAULT_HIGH: there is a pull up in place |
|
|
|
|
|
// - BUTTON_SET_PULLUP: set pullup by software |
|
|
|
|
|
// RELAY#_PIN: GPIO for the n-th relay (1-based, up to 4 relays) |
|
|
|
|
|
// RELAY#_PIN_INVERSE: Relay has inversed logic (closed or ON when pulled down) |
|
|
|
|
|
// LED#_PIN: GPIO for the n-th LED (1-based, up to 4 LEDs) |
|
|
|
|
|
// LED#_PIN_INVERSE: LED has inversed logic (lit when pulled down) |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
|
// Development boards |
|
|
// Development boards |
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -8,6 +26,7 @@ |
|
|
#define DEVICE "LOLIN" |
|
|
#define DEVICE "LOLIN" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_SWITCH | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN 2 |
|
@ -32,6 +51,7 @@ |
|
|
#define DEVICE "SONOFF" |
|
|
#define DEVICE "SONOFF" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
@ -43,6 +63,7 @@ |
|
|
#define DEVICE "SONOFF_TH" |
|
|
#define DEVICE "SONOFF_TH" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
@ -54,6 +75,7 @@ |
|
|
#define DEVICE "SONOFF_SV" |
|
|
#define DEVICE "SONOFF_SV" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
@ -65,6 +87,7 @@ |
|
|
#define DEVICE "SLAMPHER" |
|
|
#define DEVICE "SLAMPHER" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
@ -76,6 +99,7 @@ |
|
|
#define DEVICE "S20" |
|
|
#define DEVICE "S20" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
@ -87,6 +111,7 @@ |
|
|
#define DEVICE "SONOFF_TOUCH" |
|
|
#define DEVICE "SONOFF_TOUCH" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
@ -98,6 +123,7 @@ |
|
|
#define DEVICE "SONOFF_POW" |
|
|
#define DEVICE "SONOFF_POW" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 15 |
|
|
#define LED1_PIN 15 |
|
@ -120,12 +146,16 @@ |
|
|
#define DEVICE "SONOFF_4CH" |
|
|
#define DEVICE "SONOFF_4CH" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON2_PIN 9 |
|
|
#define BUTTON2_PIN 9 |
|
|
#define BUTTON2_RELAY 2 |
|
|
#define BUTTON2_RELAY 2 |
|
|
|
|
|
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON3_PIN 10 |
|
|
#define BUTTON3_PIN 10 |
|
|
#define BUTTON3_RELAY 3 |
|
|
#define BUTTON3_RELAY 3 |
|
|
|
|
|
#define BUTTON3_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON4_PIN 14 |
|
|
#define BUTTON4_PIN 14 |
|
|
#define BUTTON4_RELAY 4 |
|
|
#define BUTTON4_RELAY 4 |
|
|
|
|
|
#define BUTTON4_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY2_PIN 5 |
|
|
#define RELAY2_PIN 5 |
|
@ -147,12 +177,16 @@ |
|
|
#define DEVICE "1CH_INCHING" |
|
|
#define DEVICE "1CH_INCHING" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON2_PIN 15 |
|
|
#define BUTTON2_PIN 15 |
|
|
#define BUTTON2_RELAY 0 |
|
|
#define BUTTON2_RELAY 0 |
|
|
|
|
|
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
#define LED1_PIN_INVERSE 0 |
|
|
|
|
|
|
|
|
|
|
|
// Special LED that shows pulse mode status |
|
|
#define LED_PULSE 14 |
|
|
#define LED_PULSE 14 |
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
// ----------------------------------------------------------------------------- |
|
@ -165,8 +199,10 @@ |
|
|
#define DEVICE "ESP_RELAY_BOARD" |
|
|
#define DEVICE "ESP_RELAY_BOARD" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON2_PIN 2 |
|
|
#define BUTTON2_PIN 2 |
|
|
#define BUTTON2_RELAY 2 |
|
|
#define BUTTON2_RELAY 2 |
|
|
|
|
|
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY2_PIN 13 |
|
|
#define RELAY2_PIN 13 |
|
@ -184,6 +220,7 @@ |
|
|
#define DEVICE "ECOPLUG" |
|
|
#define DEVICE "ECOPLUG" |
|
|
#define BUTTON1_PIN 13 |
|
|
#define BUTTON1_PIN 13 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 15 |
|
|
#define RELAY1_PIN 15 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 2 |
|
|
#define LED1_PIN 2 |
|
@ -199,8 +236,10 @@ |
|
|
#define DEVICE "WIFI_RELAY_NC" |
|
|
#define DEVICE "WIFI_RELAY_NC" |
|
|
#define BUTTON1_PIN 12 |
|
|
#define BUTTON1_PIN 12 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON2_PIN 13 |
|
|
#define BUTTON2_PIN 13 |
|
|
#define BUTTON2_RELAY 2 |
|
|
#define BUTTON2_RELAY 2 |
|
|
|
|
|
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 2 |
|
|
#define RELAY1_PIN 2 |
|
|
#define RELAY1_PIN_INVERSE 1 |
|
|
#define RELAY1_PIN_INVERSE 1 |
|
|
#define RELAY2_PIN 14 |
|
|
#define RELAY2_PIN 14 |
|
@ -212,8 +251,10 @@ |
|
|
#define DEVICE "WIFI_RELAY_NO" |
|
|
#define DEVICE "WIFI_RELAY_NO" |
|
|
#define BUTTON1_PIN 12 |
|
|
#define BUTTON1_PIN 12 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define BUTTON2_PIN 13 |
|
|
#define BUTTON2_PIN 13 |
|
|
#define BUTTON2_RELAY 2 |
|
|
#define BUTTON2_RELAY 2 |
|
|
|
|
|
#define BUTTON2_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 2 |
|
|
#define RELAY1_PIN 2 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY2_PIN 14 |
|
|
#define RELAY2_PIN 14 |
|
@ -229,6 +270,7 @@ |
|
|
#define DEVICE "ESPURNA" |
|
|
#define DEVICE "ESPURNA" |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_PIN 0 |
|
|
#define BUTTON1_RELAY 1 |
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN 12 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define RELAY1_PIN_INVERSE 0 |
|
|
#define LED1_PIN 13 |
|
|
#define LED1_PIN 13 |
|
|