Browse Source

Board definition for the Gosund WP3 smart socket (#2191)

Co-authored-by: ziggurat29 <xxx@yyy.zzz>
mcspr-patch-1
ziggurat29 4 years ago
committed by GitHub
parent
commit
387d4cea58
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 39 additions and 0 deletions
  1. +2
    -0
      code/espurna/board.ino
  2. +1
    -0
      code/espurna/config/arduino.h
  3. +32
    -0
      code/espurna/config/hardware.h
  4. +4
    -0
      code/platformio.ini

+ 2
- 0
code/espurna/board.ino View File

@ -648,6 +648,8 @@ int getBoardId() {
return 155; return 155;
#elif defined(GENERIC_ESP01_512KB) #elif defined(GENERIC_ESP01_512KB)
return 156; return 156;
#elif defined(GOSUND_WP3)
return 157;
#else #else
return -1; // CUSTOM return -1; // CUSTOM
#endif #endif


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

@ -60,6 +60,7 @@
//#define GENERIC_GU10 //#define GENERIC_GU10
//#define GENERIC_V9261F //#define GENERIC_V9261F
//#define GIZWITS_WITTY_CLOUD //#define GIZWITS_WITTY_CLOUD
//#define GOSUND_WP3
//#define GOSUND_WS1 //#define GOSUND_WS1
//#define GREEN_ESP8266RELAY //#define GREEN_ESP8266RELAY
//#define HAMA_WIFI_STECKDOSE_00176533 //#define HAMA_WIFI_STECKDOSE_00176533


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

@ -3242,6 +3242,38 @@
#define HLW8012_POWER_RATIO 3580841 #define HLW8012_POWER_RATIO 3580841
#define HLW8012_INTERRUPT_ON FALLING #define HLW8012_INTERRUPT_ON FALLING
// -----------------------------------------------------------------------------
// The Gosund WP3 is based on ESP8285, so 1 MB internal flash (DOUT required)
// The module has no-connect: TX, RX, RST, AD, GPIO5, (and GPIO0,
// GPIO2 via test points on the back of the module)
// and these are wired to devices:
// GPIO4: /BTN
// GPIO12: /LED blue
// GPIO13: /LED red
// GPIO14: RELAY
// -----------------------------------------------------------------------------
#elif defined(GOSUND_WP3)
// Info
#define MANUFACTURER "GOSUND"
#define DEVICE "WP3"
// Buttons
#define BUTTON1_PIN 4
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
// Relays
#define RELAY1_PIN 14
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 12
#define LED1_PIN_INVERSE 1
#define LED2_PIN 13
#define LED2_PIN_INVERSE 1
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Several boards under different names uing a power chip labelled BL0937 or HJL-01 // Several boards under different names uing a power chip labelled BL0937 or HJL-01
// Also model number KS-602S // Also model number KS-602S


+ 4
- 0
code/platformio.ini View File

@ -809,6 +809,10 @@ build_flags = ${common.build_flags_1m0m} -DTECKIN_SP22_V14
board = ${common.board_1m} board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DTECKIN_SP23_V13 build_flags = ${common.build_flags_1m0m} -DTECKIN_SP23_V13
[env:gosund-wp3]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DGOSUND_WP3
[env:gosund-ws1] [env:gosund-ws1]
board = ${common.board_1m} board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DGOSUND_WS1 build_flags = ${common.build_flags_1m0m} -DGOSUND_WS1


Loading…
Cancel
Save