Browse Source

Support for NEO Coolcam Power Plug Wifi (no power monitoring)

rfm69
Xose Pérez 6 years ago
parent
commit
20f932e380
4 changed files with 60 additions and 1 deletions
  1. +1
    -0
      code/espurna/config/arduino.h
  2. +24
    -0
      code/espurna/config/hardware.h
  3. +10
    -0
      code/espurna/migrate.ino
  4. +25
    -1
      code/platformio.ini

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

@ -82,6 +82,7 @@
//#define LUANI_HVIO //#define LUANI_HVIO
//#define ALLNET_4DUINO_IOT_WLAN_RELAIS //#define ALLNET_4DUINO_IOT_WLAN_RELAIS
//#define TONBUX_MOSQUITO_KILLER //#define TONBUX_MOSQUITO_KILLER
//#define NEO_COOLCAM_POWER_PLUG_WIFI
//-------------------------------------------------------------------------------- //--------------------------------------------------------------------------------
// Features (values below are non-default values) // Features (values below are non-default values)


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

@ -2108,6 +2108,30 @@
#define LED4_PIN_INVERSE 0 #define LED4_PIN_INVERSE 0
#define LED4_RELAY 1 #define LED4_RELAY 1
// -----------------------------------------------------------------------------
// NEO Coolcam Power Plug
// https://es.aliexpress.com/item/-/32854589733.html?spm=a219c.12010608.0.0.6d084e68xX0y5N
// -----------------------------------------------------------------------------
#elif defined(NEO_COOLCAM_POWER_PLUG_WIFI)
// Info
#define MANUFACTURER "NEO_COOLCAM"
#define DEVICE "POWER_PLUG_WIFI"
// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
// Relays
#define RELAY1_PIN 12
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 4
#define LED1_PIN_INVERSE 1
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// TEST boards (do not use!!) // TEST boards (do not use!!)
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------


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

@ -953,6 +953,16 @@ void migrate() {
setSetting("relayGPIO", 0, 5); setSetting("relayGPIO", 0, 5);
setSetting("relayType", 0, RELAY_TYPE_NORMAL); setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#elif defined(NEO_COOLCAM_POWER_PLUG_WIFI)
setSetting("board", 75);
setSetting("ledGPIO", 0, 4);
setSetting("ledLogic", 0, 1);
setSetting("btnGPIO", 0, 13);
setSetting("btnRelay", 0, 0);
setSetting("relayGPIO", 0, 12);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
#else #else
// Allow users to define new settings without migration config // Allow users to define new settings without migration config


+ 25
- 1
code/platformio.ini View File

@ -1981,6 +1981,30 @@ upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
monitor_baud = 115200 monitor_baud = 115200
extra_scripts = ${common.extra_scripts} extra_scripts = ${common.extra_scripts}
[env:neo-coolcam-power-plug-wifi]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DNEO_COOLCAM_POWER_PLUG_WIFI
monitor_baud = 115200
extra_scripts = ${common.extra_scripts}
[env:neo-coolcam-power-plug-wifi-ota]
platform = ${common.platform}
framework = arduino
board = esp01_1m
board_flash_mode = dout
lib_deps = ${common.lib_deps}
lib_ignore = ${common.lib_ignore}
build_flags = ${common.build_flags} -DNEO_COOLCAM_POWER_PLUG_WIFI
upload_speed = 115200
upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# GENERIC OTA ENVIRONMENTS # GENERIC OTA ENVIRONMENTS
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
@ -2151,4 +2175,4 @@ build_flags = ${common.build_flags_1m} -DTONBUX_MOSQUITO_KILLER
upload_speed = 115200 upload_speed = 115200
upload_port = "${env.ESPURNA_IP}" upload_port = "${env.ESPURNA_IP}"
upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266
extra_scripts = ${common.extra_scripts}
extra_scripts = ${common.extra_scripts}

Loading…
Cancel
Save