diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index feb0859b..e444d042 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -60,6 +60,7 @@ //#define ARILUX_AL_LC02 //#define WEMOS_D1_TARPUNA_SHIELD //#define MAGICHOME_LED_CONTROLLER_23 +//#define GIZWITS_WITTY_CLOUD //-------------------------------------------------------------------------------- // Features (values below are non-default values) @@ -96,6 +97,7 @@ //-------------------------------------------------------------------------------- //#define ANALOG_SUPPORT 1 +//#define GL55XX_SUPPORT 1 //#define BH1750_SUPPORT 1 //#define BMX280_SUPPORT 1 //#define DALLAS_SUPPORT 1 diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 7b950002..f1e8e929 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1393,6 +1393,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 + // ----------------------------------------------------------------------------- // Generic 8CH // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index 85bd8b94..b7a4cf5b 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1411,6 +1411,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} + # ------------------------------------------------------------------------------ # GENERIC OTA ENVIRONMENTS # ------------------------------------------------------------------------------