From e445cf8c7003827680d63f33b391bc95faec5de3 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Mon, 24 Jun 2019 00:30:41 +0300 Subject: [PATCH] Update arduino.h and platformio.ini (#1774) (#1790) --- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 60 +++++++++++++++++----------------- code/platformio.ini | 25 ++++++++++++++ 3 files changed, 56 insertions(+), 30 deletions(-) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 9a432d5b..71450a8a 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -81,6 +81,7 @@ //#define IWOOLE_LED_TABLE_LAMP //#define JANGOE_WIFI_RELAY_NC //#define JANGOE_WIFI_RELAY_NO +//#define JINVOO_VALVE_SM_AW713 //#define JORGEGARCIA_WIFI_RELAYS //#define KMC_70011 //#define LINGAN_SWA1 diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 14c8e5c6..d37c8ace 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -3577,6 +3577,36 @@ #define LDR_ON_GROUND false #define LDR_RESISTOR 10000 +#elif defined(JINVOO_VALVE_SM_AW713) + + // Reflashing from original Tuya firmware + // to thirdparty firmware like espurna by: + // https://github.com/ct-Open-Source/tuya-convert + + // Info + #define MANUFACTURER "JINVOO" + #define DEVICE "VALVE_SM_AW713" + + // 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 + + // LED + #define LED1_PIN 5 // 5 red led + #define LED1_PIN_INVERSE 0 + #define LED1_RELAY 1 + #define LED1_MODE LED_MODE_RELAY + + #define LED2_PIN 4 // 4 blue led + #define LED2_PIN_INVERSE 0 + #define LED2_RELAY 1 + #define LED2_MODE LED_MODE_FINDME_WIFI + // ----------------------------------------------------------------------------- // TEST boards (do not use!!) // ----------------------------------------------------------------------------- @@ -3781,36 +3811,6 @@ #define SSDP_SUPPORT 1 #define RF_SUPPORT 1 -#elif defined(JINVOO_VALVE_SM_AW713) - - // Reflashing from original Tuya firmware - // to thirdparty firmware like espurna by: - // https://github.com/ct-Open-Source/tuya-convert - - // Info - #define MANUFACTURER "JINVOO" - #define DEVICE "VALVE_SM_AW713" - - // 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 - - // LED - #define LED1_PIN 5 // 5 red led - #define LED1_PIN_INVERSE 0 - #define LED1_RELAY 1 - #define LED1_MODE LED_MODE_RELAY - - #define LED2_PIN 4 // 4 blue led - #define LED2_PIN_INVERSE 0 - #define LED2_RELAY 1 - #define LED2_MODE LED_MODE_FINDME_WIFI - #endif // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index 38e0780e..de5a562d 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -3399,3 +3399,28 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} monitor_speed = ${common.monitor_speed} extra_scripts = ${common.extra_scripts} + +[env:jinvoo-valve-sm-aw713] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DJINVOO_VALVE_SM_AW713 +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts} + +[env:jinvoo-valve-sm-aw713-ota] +platform = ${common.platform} +framework = ${common.framework} +board = ${common.board_1m} +board_build.flash_mode = ${common.flash_mode} +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m0m} -DJINVOO_VALVE_SM_AW713 +upload_speed = ${common.upload_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +monitor_speed = ${common.monitor_speed} +extra_scripts = ${common.extra_scripts}