Browse Source

Config for Teckin SP23 & Maxcio W-UK007S (#2157)

mcspr-patch-1
julianwb 4 years ago
committed by GitHub
parent
commit
8f7d77b2a1
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 100 additions and 0 deletions
  1. +2
    -0
      code/espurna/config/arduino.h
  2. +84
    -0
      code/espurna/config/hardware.h
  3. +8
    -0
      code/platformio.ini
  4. +6
    -0
      code/platformio_ota.ini

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

@ -124,6 +124,7 @@
//#define MANCAVEMADE_ESPLIVE //#define MANCAVEMADE_ESPLIVE
//#define MAXCIO_WDE004 //#define MAXCIO_WDE004
//#define MAXCIO_WUS002S //#define MAXCIO_WUS002S
//#define MAXCIO_WUK007S
//#define MUVIT_IO_MIOBULB001 //#define MUVIT_IO_MIOBULB001
//#define NEO_COOLCAM_NAS_WR01W //#define NEO_COOLCAM_NAS_WR01W
//#define NEXETE_A19 //#define NEXETE_A19
@ -143,6 +144,7 @@
//#define TECKIN_SP20 //#define TECKIN_SP20
//#define TECKIN_SP21 //#define TECKIN_SP21
//#define TECKIN_SP22_V14 //#define TECKIN_SP22_V14
//#define TECKIN_SP23_V13
//#define TFLAG_NX_SMX00 //#define TFLAG_NX_SMX00
//#define TINKERMAN_ESPURNA_H06 //#define TINKERMAN_ESPURNA_H06
//#define TINKERMAN_ESPURNA_H08 //#define TINKERMAN_ESPURNA_H08


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

@ -2297,6 +2297,46 @@
#define LED1_PIN 13 #define LED1_PIN 13
#define LED1_PIN_INVERSE 1 #define LED1_PIN_INVERSE 1
// -----------------------------------------------------------------------------
// Maxcio W-UK007S
// Like this: https://www.amazon.co.uk/Maxcio-Monitoring-Function-Compatible-Required/dp/B07BWFB55Q/ref=pd_rhf_se_p_img_2?_encoding=UTF8&psc=1&refRID=4H63A43SKHV8WV54XH19
// -----------------------------------------------------------------------------
#elif defined(MAXCIO_WUK007S)
// Info
#define MANUFACTURER "MAXCIO"
#define DEVICE "WUK007S"
// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
// Relays
#define RELAY1_PIN 15
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 0
#define LED1_PIN_INVERSE 0
#define LED1_RELAY 1
#define LED1_MODE LED_MODE_RELAY_WIFI
// HJL01 / BL0937
#ifndef HLW8012_SUPPORT
#define HLW8012_SUPPORT 1
#endif
#define HLW8012_SEL_PIN 12
#define HLW8012_CF1_PIN 14
#define HLW8012_CF_PIN 5
#define HLW8012_SEL_CURRENT LOW
#define HLW8012_CURRENT_RATIO 24380
#define HLW8012_VOLTAGE_RATIO 32048
#define HLW8012_POWER_RATIO 3509285
#define HLW8012_INTERRUPT_ON FALLING
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// Oukitel P1 Smart Plug // Oukitel P1 Smart Plug
// https://www.amazon.com/Docooler-OUKITEL-Control-Wireless-Adaptor/dp/B07J3BYFJX/ref=sr_1_fkmrnull_2?keywords=oukitel+p1+smart+switch&qid=1550424399&s=gateway&sr=8-2-fkmrnull // https://www.amazon.com/Docooler-OUKITEL-Control-Wireless-Adaptor/dp/B07J3BYFJX/ref=sr_1_fkmrnull_2?keywords=oukitel+p1+smart+switch&qid=1550424399&s=gateway&sr=8-2-fkmrnull
@ -3214,6 +3254,50 @@
// BUTTON1 and LED1 are using Serial pins // BUTTON1 and LED1 are using Serial pins
#define DEBUG_SERIAL_SUPPORT 0 #define DEBUG_SERIAL_SUPPORT 0
// -----------------------------------------------------------------------------
// Teckin SP22 v1.4 - v1.6
//
// NB Notes suggest that energy monitoring is removed from later versions
// -----------------------------------------------------------------------------
#elif defined(TECKIN_SP23_V13)
// Info .. NB Newer versions apparently lack energy monitor
// The board revision is not indicated externally
#define MANUFACTURER "TECKIN"
#define DEVICE "SP23_V13"
// Buttons
#define BUTTON1_PIN 13
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1
// Relays
#define RELAY1_PIN 15
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// LEDs
#define LED1_PIN 4
#define LED1_PIN_INVERSE 1
#define LED2_PIN 2
#define LED2_PIN_INVERSE 0
#define LED2_MODE LED_MODE_FINDME
#define LED2_RELAY 1
// HJL01 / BL0937
#ifndef HLW8012_SUPPORT
#define HLW8012_SUPPORT 1
#endif
#define HLW8012_SEL_PIN 12
#define HLW8012_CF1_PIN 14
#define HLW8012_CF_PIN 5
#define HLW8012_SEL_CURRENT LOW
#define HLW8012_CURRENT_RATIO 23324
#define HLW8012_VOLTAGE_RATIO 324305
#define HLW8012_POWER_RATIO 3580841
#define HLW8012_INTERRUPT_ON FALLING
// ----------------------------------------------------------------------------- // -----------------------------------------------------------------------------
// 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


+ 8
- 0
code/platformio.ini View File

@ -661,6 +661,10 @@ build_flags = ${common.build_flags_1m0m} -DMAXCIO_WUS002S
board = ${common.board_1m} board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DMAXCIO_WDE004 build_flags = ${common.build_flags_1m0m} -DMAXCIO_WDE004
[env:maxcio-wuk007s]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DMAXCIO_WUK007S
[env:yidian-xsssa05] [env:yidian-xsssa05]
board = ${common.board_1m} board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DYIDIAN_XSSSA05 build_flags = ${common.build_flags_1m0m} -DYIDIAN_XSSSA05
@ -801,6 +805,10 @@ build_flags = ${common.build_flags_1m0m} -DTECKIN_SP21
board = ${common.board_1m} board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DTECKIN_SP22_V14 build_flags = ${common.build_flags_1m0m} -DTECKIN_SP22_V14
[env:teckin-sp23-v13]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DTECKIN_SP23_V13
[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


+ 6
- 0
code/platformio_ota.ini View File

@ -246,6 +246,9 @@ extends = env:maxcio-wus002s
[env:maxcio-wde004-ota] [env:maxcio-wde004-ota]
extends = env:maxcio-wde004 extends = env:maxcio-wde004
[env:maxcio-wuk007s-ota]
extends = env:maxcio-wuk007s
[env:yidian-xsssa05-ota] [env:yidian-xsssa05-ota]
extends = env:yidian-xsssa05 extends = env:yidian-xsssa05
@ -348,6 +351,9 @@ extends = env:teckin-sp21
[env:teckin-sp22-v14-ota] [env:teckin-sp22-v14-ota]
extends = env:teckin-sp22-v14 extends = env:teckin-sp22-v14
[env:teckin-sp23-v13-ota]
extends = env:teckin-sp23-v13
[env:gosund-ws1-ota] [env:gosund-ws1-ota]
extends = env:gosund-ws1 extends = env:gosund-ws1


Loading…
Cancel
Save