|
|
@ -3741,6 +3741,51 @@ |
|
|
|
#define LED2_RELAY 1 |
|
|
|
#define LED2_MODE LED_MODE_FINDME_WIFI |
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
// Etekcity ESW01-USA |
|
|
|
// https://www.amazon.com/Etekcity-Voltson-Outlet-Monitoring-Required/dp/B01M3MYIFS |
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
|
|
|
|
#elif defined(ETEKCITY_ESW01_USA) |
|
|
|
|
|
|
|
// Info |
|
|
|
#define MANUFACTURER "ETEKCITY" |
|
|
|
#define DEVICE "ESW01-USA" |
|
|
|
|
|
|
|
// Buttons |
|
|
|
#define BUTTON1_PIN 14 |
|
|
|
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH |
|
|
|
#define BUTTON1_RELAY 1 |
|
|
|
|
|
|
|
// Relays |
|
|
|
#define RELAY1_PIN 4 |
|
|
|
#define RELAY1_TYPE RELAY_TYPE_NORMAL |
|
|
|
|
|
|
|
// LEDs |
|
|
|
// Blue |
|
|
|
#define LED1_PIN 5 |
|
|
|
#define LED1_PIN_INVERSE 0 |
|
|
|
#define LED1_MODE LED_MODE_WIFI |
|
|
|
// Yellow |
|
|
|
#define LED2_PIN 16 |
|
|
|
#define LED2_PIN_INVERSE 0 |
|
|
|
#define LED2_MODE LED_MODE_FOLLOW |
|
|
|
#define LED2_RELAY 1 |
|
|
|
|
|
|
|
// HLW8012 |
|
|
|
#ifndef HLW8012_SUPPORT |
|
|
|
#define HLW8012_SUPPORT 1 |
|
|
|
#endif |
|
|
|
#define HLW8012_SEL_PIN 15 |
|
|
|
#define HLW8012_CF1_PIN 12 |
|
|
|
#define HLW8012_CF_PIN 13 |
|
|
|
|
|
|
|
#define HLW8012_SEL_CURRENT HIGH // SEL pin to HIGH to measure current |
|
|
|
#define HLW8012_CURRENT_R 0.001 // Current resistor |
|
|
|
#define HLW8012_VOLTAGE_R_UP ( 4 * 470000 ) // Upstream voltage resistor |
|
|
|
#define HLW8012_VOLTAGE_R_DOWN ( 1000 ) // Downstream voltage resistor |
|
|
|
#define HLW8012_INTERRUPT_ON CHANGE |
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|
// TEST boards (do not use!!) |
|
|
|
// ----------------------------------------------------------------------------- |
|
|
|