Browse Source

Add support for AG-L4 v3 (#2276)

mcspr-patch-1
Andrej Peterka 4 years ago
committed by GitHub
parent
commit
3e28ebf24f
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 54 additions and 0 deletions
  1. +2
    -0
      code/espurna/board.cpp
  2. +1
    -0
      code/espurna/config/arduino.h
  3. +44
    -0
      code/espurna/config/hardware.h
  4. +4
    -0
      code/platformio.ini
  5. +3
    -0
      code/platformio_ota.ini
  6. BIN
      images/devices/generic-ag-l4-v3-1.jpg
  7. BIN
      images/devices/generic-ag-l4-v3-2.jpg
  8. BIN
      images/devices/generic-ag-l4-v3-3.jpg
  9. BIN
      images/devices/generic-ag-l4-v3-4.jpg
  10. BIN
      images/devices/generic-ag-l4-v3-5.jpg

+ 2
- 0
code/espurna/board.cpp View File

@ -679,6 +679,8 @@ int getBoardId() {
return 156; return 156;
#elif defined(GOSUND_WP3) #elif defined(GOSUND_WP3)
return 157; return 157;
#elif defined(GENERIC_AG_L4_V3)
return 158;
#else #else
return -1; // CUSTOM return -1; // CUSTOM
#endif #endif


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

@ -51,6 +51,7 @@
//#define GBLIFE_RGBW_SOCKET //#define GBLIFE_RGBW_SOCKET
//#define GENERIC_8CH //#define GENERIC_8CH
//#define GENERIC_AG_L4 //#define GENERIC_AG_L4
//#define GENERIC_AG_L4_V3
//#define GENERIC_E14 //#define GENERIC_E14
//#define GENERIC_ECH1560 //#define GENERIC_ECH1560
//#define GENERIC_ESP01S_DHT11_V10 //#define GENERIC_ESP01S_DHT11_V10


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

@ -3533,6 +3533,50 @@
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
#elif defined(GENERIC_AG_L4_V3)
// Info
#define MANUFACTURER "GENERIC"
#define DEVICE "AG_L4_V3"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
// button 1: "power" button
#define BUTTON1_PIN 13
#define BUTTON1_RELAY 1
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
#define BUTTON1_PRESS BUTTON_ACTION_TOGGLE
#define BUTTON1_CLICK BUTTON_ACTION_NONE
#define BUTTON1_DBLCLICK BUTTON_ACTION_NONE
#define BUTTON1_LNGCLICK BUTTON_ACTION_NONE
#define BUTTON1_LNGLNGCLICK BUTTON_ACTION_RESET
// button 2: "wifi" button
#define BUTTON2_PIN 2
#define BUTTON2_CONFIG BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON2_PRESS BUTTON_ACTION_TOGGLE
#define BUTTON2_CLICK BUTTON_ACTION_NONE
#define BUTTON2_DBLCLICK BUTTON_ACTION_NONE
#define BUTTON2_LNGCLICK BUTTON_ACTION_NONE
#define BUTTON2_LNGLNGCLICK BUTTON_ACTION_NONE
// LEDs
#define LED1_PIN 5 // red status led
#define LED1_PIN_INVERSE 0
#define LED2_PIN 16 // master light power
#define LED2_PIN_INVERSE 1
#define LED2_MODE LED_MODE_RELAY
// Light
#define LIGHT_CHANNELS 3
#define LIGHT_CH1_PIN 4 // RED
#define LIGHT_CH2_PIN 12 // GREEN
#define LIGHT_CH3_PIN 14 // BLUE
// -----------------------------------------------------------------------------
#elif defined(ALLTERCO_SHELLY1) #elif defined(ALLTERCO_SHELLY1)
// Info // Info


+ 4
- 0
code/platformio.ini View File

@ -876,6 +876,10 @@ src_build_flags = -DBH_ONOFRE
extends = env:esp8266-1m-base extends = env:esp8266-1m-base
src_build_flags = -DGENERIC_AG_L4 src_build_flags = -DGENERIC_AG_L4
[env:generic-ag-l4-v3]
extends = env:esp8266-1m-base
src_build_flags = -DGENERIC_AG_L4_V3
[env:lohas-e27-9w] [env:lohas-e27-9w]
extends = env:esp8266-1m-base extends = env:esp8266-1m-base
src_build_flags = -DLOHAS_E27_9W src_build_flags = -DLOHAS_E27_9W


+ 3
- 0
code/platformio_ota.ini View File

@ -372,6 +372,9 @@ extends = env:bh-onofre
[env:generic-ag-l4-ota] [env:generic-ag-l4-ota]
extends = env:generic-ag-l4 extends = env:generic-ag-l4
[env:generic-ag-l4-v3-ota]
extends = env:generic-ag-l4-v3
[env:lohas-e27-9w-ota] [env:lohas-e27-9w-ota]
extends = env:lohas-e27-9w extends = env:lohas-e27-9w


BIN
images/devices/generic-ag-l4-v3-1.jpg View File

Before After
Width: 1920  |  Height: 1440  |  Size: 100 KiB

BIN
images/devices/generic-ag-l4-v3-2.jpg View File

Before After
Width: 1920  |  Height: 1440  |  Size: 182 KiB

BIN
images/devices/generic-ag-l4-v3-3.jpg View File

Before After
Width: 1440  |  Height: 1920  |  Size: 205 KiB

BIN
images/devices/generic-ag-l4-v3-4.jpg View File

Before After
Width: 1440  |  Height: 1920  |  Size: 186 KiB

BIN
images/devices/generic-ag-l4-v3-5.jpg View File

Before After
Width: 1440  |  Height: 1920  |  Size: 111 KiB

Loading…
Cancel
Save