Browse Source

hardware: Add support for HUGOAI smart socket plug. (#2243)

* hardware: Add support for HUGOAI smart socket plug.

* Update code/platformio.ini

Co-authored-by: pezinek <pezinek@gmail.com>

Co-authored-by: Max Prokhorov <prokhorov.max@outlook.com>
Co-authored-by: pezinek <pezinek@gmail.com>
mcspr-patch-1
Esteban Zapata Rojas 4 years ago
committed by GitHub
parent
commit
d60ff79eda
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 42 additions and 1 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +36
    -0
      code/espurna/config/hardware.h
  3. +5
    -1
      code/platformio.ini

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

@ -70,6 +70,7 @@
//#define HOMECUBE_16A
//#define HUACANXING_H801
//#define HUACANXING_H802
//#define HUGOAI_AWP02L_N
//#define HYKKER_SMART_HOME_POWER_PLUG
//#define IKE_ESPIKE
//#define INTERMITTECH_QUINLED


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

@ -1487,6 +1487,42 @@
#define LIGHT_CH3_PIN 13 // BLUE
#define LIGHT_CH4_PIN 15 // WHITE
// -----------------------------------------------------------------------------
// HUGOAI AWP02L-N
// Pin equivalence extracted from https://templates.blakadder.com/hugoai_awp02l-n.html
//
// It follows almost same structure as AOYCOCR X5P with only 1 LED on GPIO02
//
// -----------------------------------------------------------------------------
#elif defined(HUGOAI_AWP02L_N)
#define MANUFACTURER "HUGOAI"
#define DEVICE "AWP02L-N"
// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
// the defaults are reasonable, but you can change them as desired
//#define BUTTON1_PRESS BUTTON_ACTION_NONE
//#define BUTTON1_CLICK BUTTON_ACTION_TOGGLE
//#define BUTTON1_DBLCLICK BUTTON_ACTION_AP
//#define BUTTON1_LNGCLICK BUTTON_ACTION_RESET
//#define BUTTON1_LNGLNGCLICK BUTTON_ACTION_FACTORY
// Relays
#define RELAY1_PIN 15
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs
// LED1 (blue) indicates on/off state; you could use LED_MODE_FOLLOW_INVERSE
// so that the LED lights the button when 'off' so it can be found easily.
#define LED1_PIN 2
#define LED1_PIN_INVERSE 1
#define LED1_MODE LED_MODE_FOLLOW
#define LED1_RELAY 1
// -----------------------------------------------------------------------------
// Jan Goedeke Wifi Relay
// https://github.com/JanGoe/esp8266-wifi-relay


+ 5
- 1
code/platformio.ini View File

@ -353,7 +353,7 @@ src_build_flags = -DTINKERMAN_RFM69GW -DNOWSAUTH
[env:foxel-lightfox-dual]
extends = env:esp8266-1m-base
src_build_flags =
src_build_flags =
-DFOXEL_LIGHTFOX_DUAL
-DDISABLE_POSTMORTEM_STACKDUMP
@ -1006,3 +1006,7 @@ src_build_flags = -DKINGART_CURTAIN_SWITCH
[env:aoycocr-x5p]
extends = env:esp8266-1m-base
src_build_flags = -DAOYCOCR_X5P
[env:hugoai-awp02l-n]
extends = env:esp8266-1m-base
src_build_flags = -DHUGOAI_AWP02L_N

Loading…
Cancel
Save