Skip to content

Commit

Permalink
Add support for BW-SHP5 (xoseperez#2029)
Browse files Browse the repository at this point in the history
  • Loading branch information
aligator authored and mcspr committed Nov 29, 2019
1 parent 8dab123 commit 4cb8cd3
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -248,14 +248,14 @@ Here is the list of supported hardware. For more information please refer to the

||||
|---|---|---|
|![BlitzWolf BW-SHP6](images/devices/blitzwolf-bw-shp6.jpg)|![BlitzWolf BW-SHP2](images/devices/blitzwolf-bw-shp2.jpg)|![Power meters based on V9261F](images/devices/generic-v9261f.jpg)|
|**Blitzwolf BW-SHP6**|**Blitzwolf BW-SHP2<br />(also by Coosa, Gosund, HomeCube, Teckin)**|**Power meters based on V9261F**|
|![Itead Sonoff POW](images/devices/itead-sonoff-pow.jpg)|![Itead Sonoff POW](images/devices/itead-sonoff-pow-r2.jpg)|![Itead Sonoff S31](images/devices/itead-sonoff-s31.jpg)|
|**Itead Sonoff POW**|**Itead Sonoff POW R2**|**Itead Sonoff S31**|
|![Smartlife Mini Smart Socket](images/devices/smartlife-mini-smart-socket.jpg)|![Teckin SP20](images/devices/teckin-sp20.jpg)|![Digoo NX SP202](images/devices/digoo-nx-sp202.jpg)|
|**Smartlife (NETVIP) Mini Smart Socket**|**Teckin SP20**|**Digoo NX SP202**|
|![Vanzavanzu Smart WiFi Plug Mini](images/devices/vanzavanzu-smart-wifi-plug-mini.jpg)|||
|**Vanzavanzu Smart WiFi Plug Mini**|||
|![BlitzWolf BW-SHP6](images/devices/blitzwolf-bw-shp6.jpg)|![BlitzWolf BW-SHP2](images/devices/blitzwolf-bw-shp2.jpg)|![BlitzWolf BW-SHP5](images/devices/blitzwolf-bw-shp5.jpg)|
|**Blitzwolf BW-SHP6**|**Blitzwolf BW-SHP2<br />(also by Coosa, Gosund, HomeCube, Teckin)**|**Blitzwolf BW-SHP5**|
|![Power meters based on V9261F](images/devices/generic-v9261f.jpg)|![Itead Sonoff POW](images/devices/itead-sonoff-pow.jpg)|![Itead Sonoff POW](images/devices/itead-sonoff-pow-r2.jpg)|
|**Power meters based on V9261F**|**Itead Sonoff POW**|**Itead Sonoff POW R2**|
|![Itead Sonoff S31](images/devices/itead-sonoff-s31.jpg)|![Smartlife Mini Smart Socket](images/devices/smartlife-mini-smart-socket.jpg)|![Teckin SP20](images/devices/teckin-sp20.jpg)|
|**Itead Sonoff S31**|**Smartlife (NETVIP) Mini Smart Socket**|**Teckin SP20**|
|![Digoo NX SP202](images/devices/digoo-nx-sp202.jpg)|![Vanzavanzu Smart WiFi Plug Mini](images/devices/vanzavanzu-smart-wifi-plug-mini.jpg)||
|**Digoo NX SP202**|**Vanzavanzu Smart WiFi Plug Mini**||

### Embedded switches

Expand Down
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
//#define BH_ONOFRE
//#define BLITZWOLF_BWSHPX
//#define BLITZWOLF_BWSHPX_V23
//#define BLITZWOLF_BWSHP5
//#define DIGOO_NX_SP202
//#define ELECTRODRAGON_WIFI_IOT
//#define ESPURNA_BASE
Expand Down
42 changes: 42 additions & 0 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -2959,6 +2959,48 @@
// BUTTON1 and LED1 are using Serial pins
#define DEBUG_SERIAL_SUPPORT 0

// -----------------------------------------------------------------------------
// Similar to both devices above but also with switchable USB ports
// and other sensor (CSE7766).
// the pin layout is different to the above two versions
// BlitzWolf SHP5
// -----------------------------------------------------------------------------
#elif defined(BLITZWOLF_BWSHP5)

// Info
#define MANUFACTURER "BLITZWOLF"
#define DEVICE "BWSHP5"

// Buttons
#define BUTTON1_PIN 16
#define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH
#define BUTTON1_RELAY 1

// Relays
// Power plug
#define RELAY1_PIN 14
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// USB
#define RELAY2_PIN 5
#define RELAY2_TYPE RELAY_TYPE_NORMAL

// LEDs
#define LED1_PIN 2
#define LED1_PIN_INVERSE 1
#define LED2_PIN 0
#define LED2_PIN_INVERSE 1
#define LED2_MODE LED_MODE_FINDME
#define LED2_RELAY 1

// Disable UART noise
#define DEBUG_SERIAL_SUPPORT 0

// CSE7766
#ifndef CSE7766_SUPPORT
#define CSE7766_SUPPORT 1
#endif
#define CSE7766_PIN 1

// -----------------------------------------------------------------------------
// Teckin SP21
// -----------------------------------------------------------------------------
Expand Down
10 changes: 10 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -1363,6 +1363,16 @@ build_flags = ${common.build_flags_1m0m} -DBLITZWOLF_BWSHPX_V23
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}

[env:blitzwolf-bwshp5]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DBLITZWOLF_BWSHP5

[env:blitzwolf-bwshp5-ota]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DBLITZWOLF_BWSHP5
upload_port = ${common.ota_upload_port}
upload_flags = ${common.ota_upload_flags}

[env:teckin-sp21]
board = ${common.board_1m}
build_flags = ${common.build_flags_1m0m} -DTECKIN_SP21
Expand Down
Binary file added images/devices/blitzwolf-bw-shp5.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4cb8cd3

Please sign in to comment.