mirror of
https://github.com/esphome/esphome.git
synced 2025-11-03 08:31:47 +00:00
Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b71b14cd06 | ||
|
|
145e7b00ee | ||
|
|
07c80dfcda | ||
|
|
0e52c9a778 | ||
|
|
94bd179256 | ||
|
|
11c38ca4e8 | ||
|
|
dc71d11a21 | ||
|
|
e385c8435b | ||
|
|
13eca6012d | ||
|
|
cb3e3e024d | ||
|
|
79bdec32b8 | ||
|
|
c153dba5bc | ||
|
|
fa2c2917c1 | ||
|
|
2a06f4dbf4 | ||
|
|
49b618bb0c | ||
|
|
20ec3900be | ||
|
|
605be1a6ec | ||
|
|
33b67de32e | ||
|
|
1ffedb291c | ||
|
|
8f251848ef | ||
|
|
5ed987adcd | ||
|
|
a463c59733 | ||
|
|
1726c4237b | ||
|
|
f1241af91d | ||
|
|
7ae6777fd6 | ||
|
|
a169d37557 | ||
|
|
be21aa786d | ||
|
|
9a881100e6 | ||
|
|
c2f88776c7 | ||
|
|
846fcb8ccd | ||
|
|
44495c919c | ||
|
|
d4ce7699d4 | ||
|
|
318bb8b254 | ||
|
|
9a939d2d27 | ||
|
|
f51d301d53 | ||
|
|
d7d3a4aa36 | ||
|
|
6a2e9a8503 |
@@ -75,15 +75,15 @@ test2:
|
||||
--build-arg "BUILD_ARCH=${ADDON_ARCH}" \
|
||||
--build-arg "BUILD_REF=${CI_COMMIT_SHA}" \
|
||||
--build-arg "BUILD_VERSION=${ADDON_VERSION}" \
|
||||
--tag "${CI_REGISTRY}/esphomeyaml-hassio-${ADDON_ARCH}:dev" \
|
||||
--tag "${CI_REGISTRY}/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \
|
||||
--tag "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:dev" \
|
||||
--tag "${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}" \
|
||||
--file "docker/Dockerfile.hassio" \
|
||||
.
|
||||
- |
|
||||
if [ "${DO_PUSH:-true}" = true ]; then
|
||||
echo "Pushing to CI registry"
|
||||
docker push ${CI_REGISTRY}/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}
|
||||
docker push ${CI_REGISTRY}/esphomeyaml-hassio-${ADDON_ARCH}:dev
|
||||
docker push ${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:${CI_COMMIT_SHA}
|
||||
docker push ${CI_REGISTRY}/ottowinter/esphomeyaml-hassio-${ADDON_ARCH}:dev
|
||||
fi
|
||||
|
||||
# Generic deploy template
|
||||
|
||||
@@ -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
|
||||
|
||||
109
esphomeyaml-beta/README.md
Normal file
109
esphomeyaml-beta/README.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# Esphomeyaml Hass.io Add-On
|
||||
|
||||
[](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
[](https://github.com/OttoWinter/esphomelib)
|
||||
[![GitHub Release][releases-shield]][releases]
|
||||
[![Discord][discord-shield]][discord]
|
||||
|
||||
## About
|
||||
|
||||
This add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers
|
||||
directly through Hass.io **with no programming experience required**. All you need to do
|
||||
is write YAML configuration files; the rest (over-the-air updates, compiling) is all
|
||||
handled by esphomeyaml.
|
||||
|
||||
<p align="center">
|
||||
<img title="esphomeyaml dashboard screenshot" src="https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/images/screenshot.png" width="700px"></img>
|
||||
</p>
|
||||
|
||||
[_View the esphomeyaml documentation here_](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
## Example
|
||||
|
||||
With esphomeyaml, you can go from a few lines of YAML straight to a custom-made
|
||||
firmware. For example, to include a [DHT22][dht22].
|
||||
temperature and humidity sensor, you just need to include 8 lines of YAML
|
||||
in your configuration file:
|
||||
|
||||
<img title="esphomeyaml DHT configuration example" src="https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/images/dht-example.png" width="500px"></img>
|
||||
|
||||
Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
<img title="esphomelib Home Assistant MQTT discovery" src="https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/images/temperature-humidity.png" width="600px"></img>
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the esphomeyaml add-on repository
|
||||
first:
|
||||
|
||||
1. Add the epshomeyaml add-ons repository to your Hass.io instance. You can do this by navigating to the "Add-on Store" tab in the Hass.io panel and then entering https://github.com/OttoWinter/esphomeyaml in the "Add new repository by URL" field.
|
||||
2. Now scroll down and select the "esphomeyaml" add-on.
|
||||
3. Press install to download the add-on and unpack it on your machine. This can take some time.
|
||||
4. Optional: If you're using SSL certificates and want to encrypt your communication to this add-on, please enter `true` into the `ssl` field and set the `fullchain` and `certfile` options accordingly.
|
||||
5. Start the add-on, check the logs of the add-on to see if everything went well.
|
||||
6. Click "OPEN WEB UI" to open the esphomeyaml dashboard. You will be asked for your Home Assistant credentials - esphomeyaml uses Hass.io's authentication system to log you in.
|
||||
|
||||
**NOTE**: Installation on RPis running in 64-bit mode is currently not possible. Please use the 32-bit variant of HassOS instead.
|
||||
|
||||
You can view the esphomeyaml docs here: https://esphomelib.com/esphomeyaml/index.html
|
||||
|
||||
## Configuration
|
||||
|
||||
**Note**: _Remember to restart the add-on when the configuration is changed._
|
||||
|
||||
Example add-on configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"ssl": false,
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"port": 6052
|
||||
}
|
||||
```
|
||||
|
||||
### Option: `port`
|
||||
|
||||
The port to start the dashboard server on. Default is 6052.
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on.
|
||||
Set it to `true` to encrypt communications, `false` otherwise.
|
||||
Please note that if you set this to `true` you must also generate the key and certificate
|
||||
files for encryption. For example using [Let's Encrypt](https://www.home-assistant.io/addons/lets_encrypt/)
|
||||
or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certificates/tls_self_signed_certificate/).
|
||||
|
||||
### Option: `certfile`
|
||||
|
||||
The certificate file to use for SSL. If this file doesn't exist, the add-on start will fail.
|
||||
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io
|
||||
|
||||
### Option: `keyfile`
|
||||
|
||||
The private key file to use for SSL. If this file doesn't exist, the add-on start will fail.
|
||||
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
Adding this option to the add-on configuration allows you to disable
|
||||
authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphomeyaml_version`
|
||||
|
||||
Manually override which esphomeyaml version to use in the addon.
|
||||
For example to install the latest development version, use `"esphomeyaml_version": "dev"`,
|
||||
or for version 1.10.0: `"esphomeyaml_version": "v1.10.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
esphomeyaml add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
[discord-shield]: https://img.shields.io/discord/429907082951524364.svg
|
||||
[dht22]: https://esphomelib.com/esphomeyaml/components/sensor/dht.html
|
||||
[discord]: https://discord.me/KhAMKrd
|
||||
[releases-shield]: https://img.shields.io/github/release/OttoWinter/esphomeyaml.svg
|
||||
[releases]: https://esphomelib.com/esphomeyaml/changelog/index.html
|
||||
[repository]: https://github.com/OttoWinter/esphomeyaml
|
||||
@@ -1,33 +1,39 @@
|
||||
{
|
||||
"name": "esphomeyaml-beta",
|
||||
"version": "1.9.3",
|
||||
"version": "1.10.1",
|
||||
"slug": "esphomeyaml-beta",
|
||||
"description": "Beta version of esphomeyaml Hass.io add-on.",
|
||||
"url": "https://beta.esphomelib.com/esphomeyaml/index.html",
|
||||
"startup": "application",
|
||||
"webui": "http://[HOST]:[PORT:6052]",
|
||||
"boot": "auto",
|
||||
"ports": {
|
||||
"6052/tcp": 6052,
|
||||
"6053/tcp": 6053
|
||||
},
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"config:rw"
|
||||
],
|
||||
"startup": "application",
|
||||
"arch": [
|
||||
"amd64",
|
||||
"armhf",
|
||||
"i386"
|
||||
],
|
||||
"environment": {
|
||||
"ESPHOMEYAML_OTA_HOST_PORT": "6053"
|
||||
},
|
||||
"hassio_api": true,
|
||||
"auth_api": true,
|
||||
"hassio_role": "default",
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"boot": "auto",
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"ssl",
|
||||
"config:rw"
|
||||
],
|
||||
"options": {
|
||||
"password": ""
|
||||
"ssl": false,
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"port": 6052
|
||||
},
|
||||
"schema": {
|
||||
"password": "str?"
|
||||
},
|
||||
"image": "ottowinter/esphomeyaml-hassio-{arch}"
|
||||
"ssl": "bool",
|
||||
"certfile": "str",
|
||||
"keyfile": "str",
|
||||
"port": "int",
|
||||
"leave_front_door_open": "bool?",
|
||||
"esphomeyaml_version": "str?"
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -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
|
||||
|
||||
109
esphomeyaml/README.md
Normal file
109
esphomeyaml/README.md
Normal file
@@ -0,0 +1,109 @@
|
||||
# Esphomeyaml Hass.io Add-On
|
||||
|
||||
[](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
[](https://github.com/OttoWinter/esphomelib)
|
||||
[![GitHub Release][releases-shield]][releases]
|
||||
[![Discord][discord-shield]][discord]
|
||||
|
||||
## About
|
||||
|
||||
This add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers
|
||||
directly through Hass.io **with no programming experience required**. All you need to do
|
||||
is write YAML configuration files; the rest (over-the-air updates, compiling) is all
|
||||
handled by esphomeyaml.
|
||||
|
||||
<p align="center">
|
||||
<img title="esphomeyaml dashboard screenshot" src="https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/images/screenshot.png" width="700px"></img>
|
||||
</p>
|
||||
|
||||
[_View the esphomeyaml documentation here_](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
## Example
|
||||
|
||||
With esphomeyaml, you can go from a few lines of YAML straight to a custom-made
|
||||
firmware. For example, to include a [DHT22][dht22].
|
||||
temperature and humidity sensor, you just need to include 8 lines of YAML
|
||||
in your configuration file:
|
||||
|
||||
<img title="esphomeyaml DHT configuration example" src="https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/images/dht-example.png" width="500px"></img>
|
||||
|
||||
Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
<img title="esphomelib Home Assistant MQTT discovery" src="https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/images/temperature-humidity.png" width="600px"></img>
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the esphomeyaml add-on repository
|
||||
first:
|
||||
|
||||
1. Add the epshomeyaml add-ons repository to your Hass.io instance. You can do this by navigating to the "Add-on Store" tab in the Hass.io panel and then entering https://github.com/OttoWinter/esphomeyaml in the "Add new repository by URL" field.
|
||||
2. Now scroll down and select the "esphomeyaml" add-on.
|
||||
3. Press install to download the add-on and unpack it on your machine. This can take some time.
|
||||
4. Optional: If you're using SSL certificates and want to encrypt your communication to this add-on, please enter `true` into the `ssl` field and set the `fullchain` and `certfile` options accordingly.
|
||||
5. Start the add-on, check the logs of the add-on to see if everything went well.
|
||||
6. Click "OPEN WEB UI" to open the esphomeyaml dashboard. You will be asked for your Home Assistant credentials - esphomeyaml uses Hass.io's authentication system to log you in.
|
||||
|
||||
**NOTE**: Installation on RPis running in 64-bit mode is currently not possible. Please use the 32-bit variant of HassOS instead.
|
||||
|
||||
You can view the esphomeyaml docs here: https://esphomelib.com/esphomeyaml/index.html
|
||||
|
||||
## Configuration
|
||||
|
||||
**Note**: _Remember to restart the add-on when the configuration is changed._
|
||||
|
||||
Example add-on configuration:
|
||||
|
||||
```json
|
||||
{
|
||||
"ssl": false,
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"port": 6052
|
||||
}
|
||||
```
|
||||
|
||||
### Option: `port`
|
||||
|
||||
The port to start the dashboard server on. Default is 6052.
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on.
|
||||
Set it to `true` to encrypt communications, `false` otherwise.
|
||||
Please note that if you set this to `true` you must also generate the key and certificate
|
||||
files for encryption. For example using [Let's Encrypt](https://www.home-assistant.io/addons/lets_encrypt/)
|
||||
or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certificates/tls_self_signed_certificate/).
|
||||
|
||||
### Option: `certfile`
|
||||
|
||||
The certificate file to use for SSL. If this file doesn't exist, the add-on start will fail.
|
||||
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io
|
||||
|
||||
### Option: `keyfile`
|
||||
|
||||
The private key file to use for SSL. If this file doesn't exist, the add-on start will fail.
|
||||
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
Adding this option to the add-on configuration allows you to disable
|
||||
authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphomeyaml_version`
|
||||
|
||||
Manually override which esphomeyaml version to use in the addon.
|
||||
For example to install the latest development version, use `"esphomeyaml_version": "dev"`,
|
||||
or for version 1.10.0: `"esphomeyaml_version": "v1.10.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
esphomeyaml add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
[discord-shield]: https://img.shields.io/discord/429907082951524364.svg
|
||||
[dht22]: https://esphomelib.com/esphomeyaml/components/sensor/dht.html
|
||||
[discord]: https://discord.me/KhAMKrd
|
||||
[releases-shield]: https://img.shields.io/github/release/OttoWinter/esphomeyaml.svg
|
||||
[releases]: https://esphomelib.com/esphomeyaml/changelog/index.html
|
||||
[repository]: https://github.com/OttoWinter/esphomeyaml
|
||||
@@ -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
|
||||
|
||||
@@ -113,7 +113,11 @@ LambdaCondition = esphomelib_ns.class_('LambdaCondition', Condition)
|
||||
|
||||
|
||||
def validate_automation(extra_schema=None, extra_validators=None, single=False):
|
||||
schema = AUTOMATION_SCHEMA.extend(extra_schema or {})
|
||||
if extra_schema is None:
|
||||
extra_schema = {}
|
||||
if isinstance(extra_schema, vol.Schema):
|
||||
extra_schema = extra_schema.schema
|
||||
schema = AUTOMATION_SCHEMA.extend(extra_schema)
|
||||
|
||||
def validator_(value):
|
||||
if isinstance(value, list):
|
||||
@@ -295,7 +299,7 @@ COMPONENT_UPDATE_ACTION_SCHEMA = maybe_simple_id({
|
||||
def component_update_action_to_code(config, action_id, arg_type, template_arg):
|
||||
for var in get_variable(config[CONF_ID]):
|
||||
yield None
|
||||
rhs = UpdateComponentAction.new(var)
|
||||
rhs = UpdateComponentAction.new(template_arg, var)
|
||||
type = UpdateComponentAction.template(template_arg)
|
||||
yield Pvariable(action_id, rhs, type=type)
|
||||
|
||||
|
||||
@@ -10,14 +10,14 @@ from esphomeyaml.cpp_types import App, NoArg, PollingComponent, Trigger, esphome
|
||||
IntervalTrigger = esphomelib_ns.class_('IntervalTrigger', Trigger.template(NoArg), PollingComponent)
|
||||
|
||||
CONFIG_SCHEMA = automation.validate_automation(vol.Schema({
|
||||
vol.Required(CONF_ID): cv.declare_variable_id(IntervalTrigger),
|
||||
cv.GenerateID(): cv.declare_variable_id(IntervalTrigger),
|
||||
vol.Required(CONF_INTERVAL): cv.positive_time_period_milliseconds,
|
||||
}).extend(cv.COMPONENT_SCHEMA.schema))
|
||||
|
||||
|
||||
def to_code(config):
|
||||
for conf in config:
|
||||
rhs = App.register_component(IntervalTrigger.new(config[CONF_INTERVAL]))
|
||||
rhs = App.register_component(IntervalTrigger.new(conf[CONF_INTERVAL]))
|
||||
trigger = Pvariable(conf[CONF_ID], rhs)
|
||||
setup_component(trigger, conf)
|
||||
|
||||
|
||||
@@ -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,33 +1,40 @@
|
||||
{
|
||||
"name": "esphomeyaml",
|
||||
"version": "1.9.3",
|
||||
"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",
|
||||
"startup": "application",
|
||||
"webui": "http://[HOST]:[PORT:6052]",
|
||||
"boot": "auto",
|
||||
"ports": {
|
||||
"6052/tcp": 6052,
|
||||
"6053/tcp": 6053
|
||||
},
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"config:rw"
|
||||
],
|
||||
"startup": "application",
|
||||
"arch": [
|
||||
"amd64",
|
||||
"armhf",
|
||||
"i386"
|
||||
],
|
||||
"environment": {
|
||||
"ESPHOMEYAML_OTA_HOST_PORT": "6053"
|
||||
},
|
||||
"hassio_api": true,
|
||||
"auth_api": true,
|
||||
"hassio_role": "default",
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"boot": "auto",
|
||||
"auto_uart": true,
|
||||
"map": [
|
||||
"ssl",
|
||||
"config:rw"
|
||||
],
|
||||
"options": {
|
||||
"password": ""
|
||||
"ssl": false,
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"port": 6052
|
||||
},
|
||||
"schema": {
|
||||
"password": "str?"
|
||||
"ssl": "bool",
|
||||
"certfile": "str",
|
||||
"keyfile": "str",
|
||||
"port": "int",
|
||||
"leave_front_door_open": "bool?",
|
||||
"esphomeyaml_version": "str?"
|
||||
},
|
||||
"image": "ottowinter/esphomeyaml-hassio-{arch}"
|
||||
}
|
||||
}
|
||||
@@ -2,10 +2,10 @@
|
||||
|
||||
MAJOR_VERSION = 1
|
||||
MINOR_VERSION = 10
|
||||
PATCH_VERSION = '0b1'
|
||||
PATCH_VERSION = '1'
|
||||
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
|
||||
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
|
||||
ESPHOMELIB_VERSION = '1.10.0b1'
|
||||
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'
|
||||
|
||||
@@ -47,9 +47,9 @@
|
||||
<div class="container">
|
||||
{% for i, entry in enumerate(entries) %}
|
||||
<div class="row">
|
||||
<div class="col s8 offset-s2 m10 offset-m1 l12">
|
||||
<div class="col s12 m10 offset-m1 l12">
|
||||
<div class="card horizontal">
|
||||
<div class="card-image center-align">
|
||||
<div class="card-image center-align hide-on-small-only">
|
||||
<i class="material-icons very-large icon-grey">memory</i>
|
||||
</div>
|
||||
<div class="card-stacked">
|
||||
|
||||
@@ -187,9 +187,6 @@ def perform_ota(sock, password, file_handle, filename):
|
||||
|
||||
send_check(sock, result, 'auth result')
|
||||
receive_exactly(sock, 1, 'auth result', RESPONSE_AUTH_OK)
|
||||
else:
|
||||
if password:
|
||||
raise OTAError("Password specified, but ESP doesn't accept password!")
|
||||
|
||||
file_size_encoded = [
|
||||
(file_size >> 24) & 0xFF,
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 5.5 KiB After Width: | Height: | Size: 8.6 KiB |
@@ -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))
|
||||
|
||||
@@ -233,3 +233,8 @@ stepper:
|
||||
# Optional:
|
||||
acceleration: inf
|
||||
deceleration: inf
|
||||
|
||||
interval:
|
||||
interval: 5s
|
||||
then:
|
||||
- logger.log: "Interval Run"
|
||||
|
||||
Reference in New Issue
Block a user