From 43af63b85d12815427ea24b52e2e1208a2747779 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Xose=20P=C3=A9rez?= Date: Sun, 8 Apr 2018 15:47:50 +0200 Subject: [PATCH 1/2] Fix deploy branch check --- README.md | 6 +++--- code/build.sh | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 7ed0c8b9..1cc28569 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,9 @@ ESPurna ("spark" in Catalan) is a custom firmware for ESP8285/ESP8266 based smar It uses the Arduino Core for ESP8266 framework and a number of 3rd party libraries. [![version](https://img.shields.io/badge/version-1.12.5-brightgreen.svg)](CHANGELOG.md) -![branch](https://img.shields.io/badge/branch-dev-orange.svg) -[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=dev)](https://travis-ci.org/xoseperez/espurna) -[![codacy](https://img.shields.io/codacy/grade/c9496e25cf07434cba786b462cb15f49/dev.svg)](https://www.codacy.com/app/xoseperez/espurna/dashboard) +![branch](https://img.shields.io/badge/branch-master-orange.svg) +[![travis](https://travis-ci.org/xoseperez/espurna.svg?branch=master)](https://travis-ci.org/xoseperez/espurna) +[![codacy](https://img.shields.io/codacy/grade/c9496e25cf07434cba786b462cb15f49/master.svg)](https://www.codacy.com/app/xoseperez/espurna/dashboard) [![license](https://img.shields.io/github/license/xoseperez/espurna.svg)](LICENSE)
[![donate](https://img.shields.io/badge/donate-PayPal-blue.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=xose%2eperez%40gmail%2ecom&lc=US&no_note=0¤cy_code=EUR&bn=PP%2dDonationsBF%3abtn_donate_LG%2egif%3aNonHostedGuest) diff --git a/code/build.sh b/code/build.sh index 6e6dcaf0..a6109d0b 100755 --- a/code/build.sh +++ b/code/build.sh @@ -26,7 +26,8 @@ if [ $# -eq 0 ]; then # Hook to build travis test envs if [[ "${TRAVIS_BRANCH}" != "" ]]; then - if [[ ${TRAVIS_BRANCH} != "master" ]]; then + re='^[0-9]+\.[0-9]+\.[0-9]+$' + if ! [[ ${TRAVIS_BRANCH} =~ $re ]]; then environments=$travis fi fi From 4bd75cd526c3c387376a1cf9dcba2371dcaeeb60 Mon Sep 17 00:00:00 2001 From: wildwiz Date: Sun, 22 Apr 2018 14:22:06 +0200 Subject: [PATCH 2/2] support for zhilde ZLD-EU44-W power strip --- code/espurna/config/hardware.h | 31 +++++++++++++++++++++++++++++++ code/platformio.ini | 27 +++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) diff --git a/code/espurna/config/hardware.h b/code/espurna/config/hardware.h index 0f202cc9..9cdc9cd1 100644 --- a/code/espurna/config/hardware.h +++ b/code/espurna/config/hardware.h @@ -1797,6 +1797,37 @@ #define LED1_PIN 12 // D6 #define LED1_PIN_INVERSE 1 +// ----------------------------------------------------------------------------- +// Zhilde ZLD-EU44-W +// http://www.zhilde.com/product/60705150109-805652505/EU_WiFi_Surge_Protector_Extension_Socket_4_Outlets_works_with_Amazon_Echo_Smart_Power_Strip.html +// ----------------------------------------------------------------------------- + +#elif defined(ZHILDE_EU44_W) + + // Info + #define MANUFACTURER "ZHILDE" + #define DEVICE "ZLD_EU44_W" + + // Buttons + #define BUTTON1_PIN 3 + #define BUTTON1_MODE BUTTON_PUSHBUTTON | BUTTON_DEFAULT_HIGH + + // Relays + #define RELAY1_PIN 5 + #define RELAY2_PIN 4 + #define RELAY3_PIN 12 + #define RELAY4_PIN 13 + #define RELAY5_PIN 14 + #define RELAY1_TYPE RELAY_TYPE_NORMAL + #define RELAY2_TYPE RELAY_TYPE_NORMAL + #define RELAY3_TYPE RELAY_TYPE_NORMAL + #define RELAY4_TYPE RELAY_TYPE_NORMAL + #define RELAY5_TYPE RELAY_TYPE_NORMAL + + // LEDs + #define LED1_PIN 1 + #define LED1_PIN_INVERSE 1 + // ----------------------------------------------------------------------------- // TEST boards (do not use!!) // ----------------------------------------------------------------------------- diff --git a/code/platformio.ini b/code/platformio.ini index 0d1dd602..9574728c 100644 --- a/code/platformio.ini +++ b/code/platformio.ini @@ -1747,6 +1747,33 @@ upload_port = "${env.ESPURNA_IP}" upload_flags = --auth=${env.ESPURNA_AUTH} --port 8266 extra_scripts = ${common.extra_scripts} +# ------------------------------------------------------------------------------ + +[env:zhilde-eu44-w] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m} -DZHILDE_EU44_W +monitor_baud = 115200 +extra_scripts = ${common.extra_scripts} + +[env:zhilde-eu44-w-ota] +platform = ${common.platform} +framework = arduino +board = esp01_1m +board_flash_mode = dout +lib_deps = ${common.lib_deps} +lib_ignore = ${common.lib_ignore} +build_flags = ${common.build_flags_1m} -DZHILDE_EU44_W +upload_speed = 115200 +upload_port = "192.168.4.1" +upload_flags = --auth=fibonacci --port 8266 +monitor_baud = 115200 +extra_scripts = ${common.extra_scripts} + # ------------------------------------------------------------------------------ # GENERIC OTA ENVIRONMENTS # ------------------------------------------------------------------------------