diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 12449895..8fbe3fba 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -60,6 +60,7 @@ //#define ARILUX_AL_LC11 //#define ARILUX_AL_LC02 //#define WEMOS_D1_TARPUNA_SHIELD +//#define GIZWITS_WITTY_CLOUD //-------------------------------------------------------------------------------- // Features (values below are non-default values) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 17986527..33b7e459 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1391,6 +1391,39 @@ #define LIGHT_ENABLE_PIN 15 +#elif defined(GIZWITS_WITTY_CLOUD) + + // Info + #define MANUFACTURER "GIZWITS" + #define DEVICE "WITTY_CLOUD" + #define RELAY_PROVIDER RELAY_PROVIDER_LIGHT + #define LIGHT_PROVIDER LIGHT_PROVIDER_DIMMER + #define DUMMY_RELAY_COUNT 1 + + // Buttons + #define BUTTON1_PIN 4 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_PRESS BUTTON_MODE_TOGGLE + #define BUTTON1_CLICK BUTTON_MODE_NONE + #define BUTTON1_DBLCLICK BUTTON_MODE_NONE + #define BUTTON1_LNGCLICK BUTTON_MODE_NONE + #define BUTTON1_LNGLNGCLICK BUTTON_MODE_RESET + + #define ANALOG_SUPPORT 1 + + // LEDs + #define LED1_PIN 2 // BLUE build-in + #define LED1_PIN_INVERSE 1 + + // Light + #define LIGHT_CHANNELS 3 + #define LIGHT_CH1_PIN 15 // RED + #define LIGHT_CH2_PIN 12 // GREEN + #define LIGHT_CH3_PIN 13 // BLUE + #define LIGHT_CH1_INVERSE 0 + #define LIGHT_CH2_INVERSE 0 + #define LIGHT_CH3_INVERSE 0 + // ----------------------------------------------------------------------------- // KMC 70011 // https://www.amazon.com/KMC-Monitoring-Required-Control-Compatible/dp/B07313TH7B diff --git a/code/platformio.ini b/code/platformio.ini index a8d2e7cc..0671444a 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1447,6 +1447,30 @@ upload_speed = 460800 monitor_baud = 115200 extra_scripts = ${common.extra_scripts} +[env:gizwits-witty-cloud] +platform = ${common.platform} +framework = arduino +board = esp12e +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags} -DGIZWITS_WITTY_CLOUD +monitor_baud = 115200 +extra_scripts = ${common.extra_scripts} + +[env:gizwits-witty-cloud-ota] +platform = ${common.platform} +framework = arduino +board = esp12e +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags} -DGIZWITS_WITTY_CLOUD +upload_speed = 115200 +upload_port = "${env.ESPURNA_IP}" +upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 +extra_scripts = ${common.extra_scripts} + [env:stm-relay-ota] platform = ${common.platform} framework = arduino