From 4eeafd244a0609caaaac0fba9b35a12fccf1e136 Mon Sep 17 00:00:00 2001 From: Nick Vrana Date: Thu, 14 Feb 2019 16:39:21 -0600 Subject: [PATCH 1/3] added support for gosund ws1 aka gosund KS-602S --- code/espurna/config/arduino.h | 1 + code/espurna/config/hardware.h | 19 +++++++++++++++++++ code/platformio.ini | 6 ++++-- 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/code/espurna/config/arduino.h b/code/espurna/config/arduino.h index 6d9c30f9..d8fd5ab9 100644 --- a/code/espurna/config/arduino.h +++ b/code/espurna/config/arduino.h @@ -112,6 +112,7 @@ //#define GBLIFE_RGBW_SOCKET //#define SMARTLIFE_MINI_SMART_SOCKET //#define GOSUND_SP1_V23 +//#define GOSUND_WS1 //#define ARILUX_AL_LC02_V14 //#define BLITZWOLF_BWSHP2_V23 diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 85695ea9..bc1e4120 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -2820,6 +2820,25 @@ // Several boards under different names uing a power chip labelled BL0937 or HJL-01 // ----------------------------------------------------------------------------- +#elif defined(GOSUND_WS1) + + // Info + #define MANUFACTURER "GOSUND" + #define DEVICE "WS1" + + // Buttons + #define BUTTON1_PIN 0 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + #define BUTTON1_RELAY 1 + + // Relays + #define RELAY1_PIN 14 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + + // LEDs + #define LED1_PIN 1 + #define LED1_PIN_INVERSE 1 + #elif defined(GOSUND_SP1_V23) // Info diff --git a/code/platformio.ini b/code/platformio.ini index cf2bb3f3..d9a51f89 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2802,16 +2802,18 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} -[env:gosund-sp1-v23] +[env:gosund-ws1] 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} -DGOSUND_SP1_V23 +build_flags = ${common.build_flags_1m0m} -DGOSUND_WS1 upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} [env:gosund-sp1-v23-ota] From beb41113aa6a867d7a06676323c0f712dca747f6 Mon Sep 17 00:00:00 2001 From: Nick Vrana Date: Fri, 15 Feb 2019 17:19:05 -0600 Subject: [PATCH 2/3] fixed accidental deletion of SP1 and added ws1-ota --- code/platformio.ini | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/code/platformio.ini b/code/platformio.ini index d9a51f89..88028cbc 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2816,6 +2816,34 @@ upload_port = ${common.upload_port} upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} +[env:gosund-ws1-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} -DGOSUND_WS1 +upload_speed = ${common.upload_speed} +monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +extra_scripts = ${common.extra_scripts} + +[env:gosund-sp1-v23] +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} -DGOSUND_SP1_V23 +upload_speed = ${common.upload_speed} +monitor_speed = ${common.monitor_speed} +upload_port = ${common.upload_port} +upload_flags = ${common.upload_flags} +extra_scripts = ${common.extra_scripts} + [env:gosund-sp1-v23-ota] platform = ${common.platform} framework = ${common.framework} From 2c02b72565e86487b0c2c3b63f841c80af905169 Mon Sep 17 00:00:00 2001 From: Max Prokhorov Date: Sun, 17 Feb 2019 05:36:52 +0300 Subject: [PATCH 3/3] Fix upload_port and upload_args --- code/platformio.ini | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/code/platformio.ini b/code/platformio.ini index 88028cbc..da94f763 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -2812,8 +2812,6 @@ lib_ignore = ${common.lib_ignore} build_flags = ${common.build_flags_1m0m} -DGOSUND_WS1 upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} -upload_port = ${common.upload_port} -upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} [env:gosund-ws1-ota] @@ -2840,8 +2838,6 @@ lib_ignore = ${common.lib_ignore} build_flags = ${common.build_flags_1m0m} -DGOSUND_SP1_V23 upload_speed = ${common.upload_speed} monitor_speed = ${common.monitor_speed} -upload_port = ${common.upload_port} -upload_flags = ${common.upload_flags} extra_scripts = ${common.extra_scripts} [env:gosund-sp1-v23-ota] @@ -3133,4 +3129,4 @@ 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} \ No newline at end of file +extra_scripts = ${common.extra_scripts}