Browse Source

Merge branch 'master' into dev

rfm69
Xose Pérez 6 years ago
parent
commit
09052376f5
5 changed files with 85 additions and 1 deletions
  1. +2
    -1
      code/build.sh
  2. +1
    -0
      code/espurna/config/arduino.h
  3. +36
    -0
      code/espurna/config/hardware.h
  4. +17
    -0
      code/espurna/migrate.ino
  5. +29
    -0
      code/platformio.ini

+ 2
- 1
code/build.sh View File

@ -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


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

@ -77,6 +77,7 @@
//#define GENERIC_ESP01S_DHT11_V10
//#define GENERIC_ESP01S_DS18B20_V10
//#define HELTEC_TOUCHRELAY
//#define ZHILDE_EU44_W
//--------------------------------------------------------------------------------
// Features (values below are non-default values)


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

@ -1916,6 +1916,42 @@
#define RELAY1_PIN 12
#define RELAY1_TYPE RELAY_TYPE_NORMAL
// -----------------------------------------------------------------------------
// 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 "EU44_W"
// Based on the reporter, this product uses GPIO1 and 3 for the button
// and onboard LED, so hardware serial should be disabled...
#define DEBUG_SERIAL_SUPPORT 0
// 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!!)
// -----------------------------------------------------------------------------


+ 17
- 0
code/espurna/migrate.ino View File

@ -888,6 +888,23 @@ void migrate() {
setSetting("board", 69);
#elif defined(ZHILDE_EU44_W)
setSetting("board", 70);
setSetting("btnGPIO", 0, 3);
setSetting("ledGPIO", 0, 1);
setSetting("ledLogic", 0, 1);
setSetting("relayGPIO", 0, 5);
setSetting("relayGPIO", 1, 4);
setSetting("relayGPIO", 2, 12);
setSetting("relayGPIO", 3, 13);
setSetting("relayGPIO", 4, 14);
setSetting("relayType", 0, RELAY_TYPE_NORMAL);
setSetting("relayType", 1, RELAY_TYPE_NORMAL);
setSetting("relayType", 2, RELAY_TYPE_NORMAL);
setSetting("relayType", 3, RELAY_TYPE_NORMAL);
setSetting("relayType", 4, RELAY_TYPE_NORMAL);
#else
// Allow users to define new settings without migration config


+ 29
- 0
code/platformio.ini View File

@ -1874,6 +1874,35 @@ 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
# ------------------------------------------------------------------------------
[env:generic-esp01s-relay-40]
platform = ${common.platform}
framework = arduino


Loading…
Cancel
Save