Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b71b14cd06 | ||
|
|
145e7b00ee | ||
|
|
07c80dfcda | ||
|
|
0e52c9a778 | ||
|
|
94bd179256 | ||
|
|
11c38ca4e8 | ||
|
|
dc71d11a21 | ||
|
|
e385c8435b |
@@ -2,11 +2,11 @@
|
||||
; platforms
|
||||
|
||||
[env:espressif8266]
|
||||
platform = espressif8266
|
||||
platform = espressif8266@1.8.0
|
||||
board = nodemcuv2
|
||||
framework = arduino
|
||||
|
||||
[env:espressif32]
|
||||
platform = espressif32
|
||||
platform = espressif32@1.5.0
|
||||
board = nodemcu-32s
|
||||
framework = arduino
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "esphomeyaml-beta",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.1",
|
||||
"slug": "esphomeyaml-beta",
|
||||
"description": "Beta version of esphomeyaml Hass.io add-on.",
|
||||
"url": "https://beta.esphomelib.com/esphomeyaml/index.html",
|
||||
@@ -17,6 +17,7 @@
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"boot": "auto",
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"ssl",
|
||||
"config:rw"
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"boot": "auto",
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"ssl",
|
||||
"config:rw"
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
; This file allows the docker build file to install the required platformio
|
||||
; platforms
|
||||
|
||||
[env:espressif8266]
|
||||
platform = espressif8266
|
||||
board = nodemcuv2
|
||||
framework = arduino
|
||||
|
||||
[env:espressif32]
|
||||
platform = espressif32
|
||||
board = nodemcu-32s
|
||||
framework = arduino
|
||||
@@ -2,11 +2,11 @@
|
||||
; platforms
|
||||
|
||||
[env:espressif8266]
|
||||
platform = espressif8266
|
||||
platform = espressif8266@1.8.0
|
||||
board = nodemcuv2
|
||||
framework = arduino
|
||||
|
||||
[env:espressif32]
|
||||
platform = espressif32
|
||||
platform = espressif32@1.5.0
|
||||
board = nodemcu-32s
|
||||
framework = arduino
|
||||
|
||||
@@ -211,12 +211,14 @@ def upload_program(config, args, host):
|
||||
|
||||
|
||||
def show_logs(config, args, port):
|
||||
if 'logger' not in config:
|
||||
raise EsphomeyamlError("Logger is not configured!")
|
||||
if get_port_type(port) == 'SERIAL':
|
||||
run_miniterm(config, port)
|
||||
return 0
|
||||
if get_port_type(port) == 'NETWORK':
|
||||
if get_port_type(port) == 'NETWORK' and 'api' in config:
|
||||
return run_logs(config, port)
|
||||
if get_port_type(port) == 'MQTT':
|
||||
if get_port_type(port) == 'MQTT' and 'mqtt' in config:
|
||||
return mqtt.show_logs(config, args.topic, args.username, args.password, args.client_id)
|
||||
|
||||
raise ValueError
|
||||
|
||||
@@ -3,7 +3,8 @@ import voluptuous as vol
|
||||
import esphomeyaml.config_validation as cv
|
||||
from esphomeyaml.const import CONF_AP, CONF_CHANNEL, CONF_DNS1, CONF_DNS2, CONF_DOMAIN, \
|
||||
CONF_GATEWAY, CONF_HOSTNAME, CONF_ID, CONF_MANUAL_IP, CONF_PASSWORD, CONF_POWER_SAVE_MODE, \
|
||||
CONF_REBOOT_TIMEOUT, CONF_SSID, CONF_STATIC_IP, CONF_SUBNET, CONF_NETWORKS, CONF_BSSID
|
||||
CONF_REBOOT_TIMEOUT, CONF_SSID, CONF_STATIC_IP, CONF_SUBNET, CONF_NETWORKS, CONF_BSSID, \
|
||||
CONF_FAST_CONNECT
|
||||
from esphomeyaml.core import CORE, HexInt
|
||||
from esphomeyaml.cpp_generator import Pvariable, StructInitializer, add, variable, ArrayInitializer
|
||||
from esphomeyaml.cpp_types import App, Component, esphomelib_ns, global_ns
|
||||
@@ -28,8 +29,8 @@ def validate_password(value):
|
||||
return value
|
||||
if len(value) < 8:
|
||||
raise vol.Invalid(u"WPA password must be at least 8 characters long")
|
||||
if len(value) > 63:
|
||||
raise vol.Invalid(u"WPA password must be at most 63 characters long")
|
||||
if len(value) > 64:
|
||||
raise vol.Invalid(u"WPA password must be at most 64 characters long")
|
||||
return value
|
||||
|
||||
|
||||
@@ -86,6 +87,14 @@ def validate(config):
|
||||
if (CONF_NETWORKS not in config) and (CONF_AP not in config):
|
||||
raise vol.Invalid("Please specify at least an SSID or an Access Point "
|
||||
"to create.")
|
||||
|
||||
if config.get(CONF_FAST_CONNECT, False):
|
||||
networks = config.get(CONF_NETWORKS, [])
|
||||
if not networks:
|
||||
raise vol.Invalid("At least one network required for fast_connect!")
|
||||
if len(networks) != 1:
|
||||
raise vol.Invalid("Fast connect can only be used with one network!")
|
||||
|
||||
return config
|
||||
|
||||
|
||||
@@ -102,6 +111,7 @@ CONFIG_SCHEMA = vol.All(vol.Schema({
|
||||
vol.Optional(CONF_DOMAIN, default='.local'): cv.domain_name,
|
||||
vol.Optional(CONF_REBOOT_TIMEOUT): cv.positive_time_period_milliseconds,
|
||||
vol.Optional(CONF_POWER_SAVE_MODE): cv.one_of(*WIFI_POWER_SAVE_MODES, upper=True),
|
||||
vol.Optional(CONF_FAST_CONNECT): cv.boolean,
|
||||
}), validate)
|
||||
|
||||
|
||||
@@ -167,6 +177,9 @@ def to_code(config):
|
||||
if CONF_POWER_SAVE_MODE in config:
|
||||
add(wifi.set_power_save_mode(WIFI_POWER_SAVE_MODES[config[CONF_POWER_SAVE_MODE]]))
|
||||
|
||||
if CONF_FAST_CONNECT in config:
|
||||
add(wifi.set_fast_connect(config[CONF_FAST_CONNECT]))
|
||||
|
||||
|
||||
def lib_deps(config):
|
||||
if CORE.is_esp8266:
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "esphomeyaml",
|
||||
"version": "1.10.0",
|
||||
"version": "1.10.1",
|
||||
"slug": "esphomeyaml",
|
||||
"description": "esphomeyaml Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices.",
|
||||
"url": "https://esphomelib.com/esphomeyaml/index.html",
|
||||
@@ -17,6 +17,7 @@
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"boot": "auto",
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"ssl",
|
||||
"config:rw"
|
||||
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
MAJOR_VERSION = 1
|
||||
MINOR_VERSION = 10
|
||||
PATCH_VERSION = '0'
|
||||
PATCH_VERSION = '1'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
ESPHOMELIB_VERSION = '1.10.0'
|
||||
ESPHOMELIB_VERSION = '1.10.1'
|
||||
|
||||
ESP_PLATFORM_ESP32 = 'ESP32'
|
||||
ESP_PLATFORM_ESP8266 = 'ESP8266'
|
||||
@@ -398,6 +398,7 @@ CONF_INTERVAL = 'interval'
|
||||
CONF_DIRECTION = 'direction'
|
||||
CONF_VARIANT = 'variant'
|
||||
CONF_METHOD = 'method'
|
||||
CONF_FAST_CONNECT = 'fast_connect'
|
||||
|
||||
ALLOWED_NAME_CHARS = u'abcdefghijklmnopqrstuvwxyz0123456789_'
|
||||
ARDUINO_VERSION_ESP32_DEV = 'https://github.com/platformio/platform-espressif32.git#feature/stage'
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
; This file allows the docker build file to install the required platformio
|
||||
; platforms
|
||||
|
||||
[env:espressif8266]
|
||||
platform = espressif8266
|
||||
board = nodemcuv2
|
||||
framework = arduino
|
||||
|
||||
[env:espressif32]
|
||||
platform = espressif32
|
||||
board = nodemcu-32s
|
||||
framework = arduino
|
||||
@@ -132,7 +132,7 @@ STACKTRACE_ESP8266_EXCVADDR_RE = re.compile(r'excvaddr=0x(4[0-9a-fA-F]{7})')
|
||||
STACKTRACE_ESP32_PC_RE = re.compile(r'PC\s*:\s*(?:0x)?(4[0-9a-fA-F]{7})')
|
||||
STACKTRACE_ESP32_EXCVADDR_RE = re.compile(r'EXCVADDR\s*:\s*(?:0x)?(4[0-9a-fA-F]{7})')
|
||||
STACKTRACE_BAD_ALLOC_RE = re.compile(r'^last failed alloc call: (4[0-9a-fA-F]{7})\((\d+)\)$')
|
||||
STACKTRACE_ESP32_BACKTRACE_RE = re.compile(r'Backtrace:(?:\s+0x4[0-9a-fA-F]{7}:0x3[0-9a-fA-F]{7})+')
|
||||
STACKTRACE_ESP32_BACKTRACE_RE = re.compile(r'Backtrace:(?:\s+0x[0-9a-fA-F]{8}:0x[0-9a-fA-F]{8})+')
|
||||
STACKTRACE_ESP32_BACKTRACE_PC_RE = re.compile(r'4[0-9a-f]{7}')
|
||||
STACKTRACE_ESP8266_BACKTRACE_PC_RE = re.compile(r'4[0-9a-f]{7}')
|
||||
|
||||
|
||||
@@ -279,10 +279,11 @@ def gather_lib_deps():
|
||||
if CORE.is_esp32:
|
||||
lib_deps |= {
|
||||
'Preferences', # Preferences helper
|
||||
'AsyncTCP@1.0.1', # Pin AsyncTCP version
|
||||
}
|
||||
# Manual fix for AsyncTCP
|
||||
if CORE.config[CONF_ESPHOMEYAML].get(CONF_ARDUINO_VERSION) == ARDUINO_VERSION_ESP32_DEV:
|
||||
lib_deps.add('https://github.com/me-no-dev/AsyncTCP.git#idf-update')
|
||||
lib_deps.add('AsyncTCP@1.0.3')
|
||||
lib_deps.discard('AsyncTCP@1.0.1')
|
||||
# avoid changing build flags order
|
||||
return list(sorted(x for x in lib_deps if x))
|
||||
|
||||
Reference in New Issue
Block a user