Browse Source

Device: add GENERIC_E14, e14 rgb+w 4,5w (#2039)

master
orrpan 5 years ago
committed by Max Prokhorov
parent
commit
e64ec2a9e3
4 changed files with 50 additions and 0 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +24
    -0
      code/espurna/config/hardware.h
  3. +15
    -0
      code/espurna/migrate.ino
  4. +10
    -0
      code/platformio.ini

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

@ -47,6 +47,7 @@
//#define GENERIC_ESP01S_RELAY_V40
//#define GENERIC_ESP01S_RGBLED_V10
//#define GENERIC_GU10
//#define GENERIC_E14
//#define GENERIC_V9261F
//#define GIZWITS_WITTY_CLOUD
//#define GOSUND_WS1


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

@ -3511,6 +3511,30 @@
#define LIGHT_CH3_INVERSE 0
#define LIGHT_CH4_INVERSE 0
// -----------------------------------------------------------------------------
// Generic E14
// https://www.ebay.com/itm/LED-Bulb-Wifi-E14-4-5W-Candle-RGB-W-4in1-Dimmable-V-tac-Smart-VT-5114/163899840601
// -----------------------------------------------------------------------------
#elif defined(GENERIC_E14)
// Info
#define MANUFACTURER "GENERIC"
#define DEVICE "E14"
#define RELAY_PROVIDER RELAY_PROVIDER_LIGHT
#define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER
#define DUMMY_RELAY_COUNT 1
// Light
#define LIGHT_CHANNELS 4
#define LIGHT_CH1_PIN 4 // RED
#define LIGHT_CH2_PIN 12 // GREEN
#define LIGHT_CH3_PIN 14 // BLUE
#define LIGHT_CH4_PIN 5 // WHITE
#define LIGHT_CH1_INVERSE 0
#define LIGHT_CH2_INVERSE 0
#define LIGHT_CH3_INVERSE 0
#define LIGHT_CH4_INVERSE 0
// -----------------------------------------------------------------------------
// Nexete A19


+ 15
- 0
code/espurna/migrate.ino View File

@ -1387,6 +1387,21 @@ void migrate() {
setSetting("chLogic", 3, 0);
setSetting("relays", 1);
#elif defined(GENERIC_E14)
setSetting("board", 103);
setSetting("relayProvider", RELAY_PROVIDER_LIGHT);
setSetting("lightProvider", LIGHT_PROVIDER_DIMMER);
setSetting("chGPIO", 0, 4);
setSetting("chGPIO", 1, 12);
setSetting("chGPIO", 2, 14);
setSetting("chGPIO", 3, 5);
setSetting("chLogic", 0, 0);
setSetting("chLogic", 1, 0);
setSetting("chLogic", 2, 0);
setSetting("chLogic", 3, 0);
setSetting("relays", 1);
#else
// Allow users to define new settings without migration config


+ 10
- 0
code/platformio.ini View File

@ -1593,6 +1593,16 @@ build_flags = ${common.build_flags_1m0m} -DGENERIC_GU10
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}
[env:generic-e14]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DGENERIC_E14
[env:generic-e14-ota]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DGENERIC_E14
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}
[env:nexete-a19]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DNEXETE_A19


Loading…
Cancel
Save