Skip to content

Commit

Permalink
hw: add support for the Zhilde ZLD-64EU-W (xoseperez#2342)
Browse files Browse the repository at this point in the history
* Add support for the Zhilde ZLD-64EU-W

This is a power outlet with 6 power sockets and 4 USB ports.

* fixup based on the zld-44eu hw and tasmota template info

Co-authored-by: Maxim Prokhorov <prokhorov.max@outlook.com>
  • Loading branch information
biot and mcspr authored Sep 4, 2020
1 parent e1b643f commit f6ec242
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
1 change: 1 addition & 0 deletions code/espurna/config/arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
//#define YJZK_SWITCH_2CH
//#define YJZK_SWITCH_3CH
//#define ZHILDE_EU44_W
//#define ZHILDE_EU64_W

//--------------------------------------------------------------------------------
// Features (values below are non-default values)
Expand Down
28 changes: 26 additions & 2 deletions code/espurna/config/hardware.h
Original file line number Diff line number Diff line change
Expand Up @@ -2757,6 +2757,32 @@
#define LED1_PIN 1
#define LED1_PIN_INVERSE 1

// -----------------------------------------------------------------------------
// Zhilde ZLD-64EU-W
// -----------------------------------------------------------------------------

#elif defined(ZHILDE_64EU_W)

// Info
#define MANUFACTURER "ZHILDE"
#define DEVICE "64EU_W"

// Based on https://templates.blakadder.com/ZLD64-EU-W.html ,
// This product uses GPIO1 for LED and 3 for the button, so hardware serial should be disabled...
#define DEBUG_SERIAL_SUPPORT 0

#define BUTTON1_PIN 3
#define BUTTON1_CONFIG BUTTON_PUSHBUTTON | BUTTON_SET_PULLUP | BUTTON_DEFAULT_HIGH
#define BUTTON1_PRESS BUTTON_ACTION_NONE
#define BUTTON1_RELAY 3

#define RELAY1_PIN 5
#define RELAY2_PIN 4
#define RELAY3_PIN 14

#define LED1_PIN 1
#define LED1_PIN_INVERSE 1

// -----------------------------------------------------------------------------
// Allnet 4duino ESP8266-UP-Relais
// http://www.allnet.de/de/allnet-brand/produkte/neuheiten/p/allnet-4duino-iot-wlan-relais-unterputz-esp8266-up-relais/
Expand Down Expand Up @@ -4866,8 +4892,6 @@
#define LED1_PIN 2
#define LED1_PIN_INVERSE 1

// -----------------------------------------------------------------------------

#else

#error "UNSUPPORTED HARDWARE!!"
Expand Down
4 changes: 4 additions & 0 deletions code/platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -769,6 +769,10 @@ src_build_flags = -DARNIEX_SWIFITCH
extends = env:esp8266-1m-base
src_build_flags = -DZHILDE_EU44_W

[env:zhilde-64eu-w]
extends = env:esp8266-1m-base
src_build_flags = -DZHILDE_64EU_W

[env:luani-hvio]
extends = env:esp8266-1m-base
src_build_flags = -DLUANI_HVIO
Expand Down
3 changes: 3 additions & 0 deletions code/platformio_ota.ini
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ extends = env:arniex-swifitch
[env:zhilde-eu44-w-ota]
extends = env:zhilde-eu44-w

[env:zhilde-64eu-w-ota]
extends = env:zhilde-64eu-w

[env:luani-hvio-ota]
extends = env:luani-hvio

Expand Down

0 comments on commit f6ec242

Please sign in to comment.