Merge branch 'master' into dev
|
@ -2,108 +2,7 @@
|
|||
|
||||
[![esphomeyaml logo](https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/logo.png)](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
[![GitHub stars](https://img.shields.io/github/stars/OttoWinter/esphomelib.svg?style=social&label=Star&maxAge=2592000)](https://github.com/OttoWinter/esphomelib)
|
||||
[![GitHub Release][releases-shield]][releases]
|
||||
[![Discord][discord-shield]][discord]
|
||||
# This Add-On has moved!
|
||||
|
||||
## 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
|
||||
See https://esphome.io/changelog/v1.11.0.html#installation-methods-changed
|
||||
for updated instructions
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 8.6 KiB |
|
@ -1,59 +0,0 @@
|
|||
ARG BUILD_FROM=hassioaddons/ubuntu-base:2.2.1
|
||||
# hadolint ignore=DL3006
|
||||
FROM ${BUILD_FROM}
|
||||
|
||||
# Set shell
|
||||
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
||||
|
||||
# Copy root filesystem
|
||||
COPY rootfs /
|
||||
|
||||
RUN \
|
||||
# Temporarily move nginx.conf (otherwise dpkg fails)
|
||||
mv /etc/nginx/nginx.conf /etc/nginx/nginx.conf.bkp \
|
||||
# Install add-on dependencies
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
# Python 2 for ESPHome
|
||||
python \
|
||||
python-pip \
|
||||
python-setuptools \
|
||||
# Python Pillow for display component
|
||||
python-pil \
|
||||
# Git for esphomelib downloads
|
||||
git \
|
||||
# NGINX proxy
|
||||
nginx \
|
||||
\
|
||||
&& mv /etc/nginx/nginx.conf.bkp /etc/nginx/nginx.conf \
|
||||
\
|
||||
&& pip2 install --no-cache-dir --no-binary :all: https://github.com/esphome/esphome/archive/dev.zip \
|
||||
\
|
||||
# Change some platformio settings
|
||||
&& platformio settings set enable_telemetry No \
|
||||
&& platformio settings set check_libraries_interval 1000000 \
|
||||
&& platformio settings set check_platformio_interval 1000000 \
|
||||
&& platformio settings set check_platforms_interval 1000000 \
|
||||
\
|
||||
# Build an empty platformio project to force platformio to install all fw build dependencies
|
||||
# The return-code will be non-zero since there's nothing to build.
|
||||
&& (platformio run -d /opt/pio; echo "Done") \
|
||||
\
|
||||
# Cleanup
|
||||
&& rm -fr \
|
||||
/tmp/* \
|
||||
/var/{cache,log}/* \
|
||||
/var/lib/apt/lists/* \
|
||||
/opt/pio/
|
||||
|
||||
# Build arugments
|
||||
ARG BUILD_ARCH=amd64
|
||||
ARG BUILD_VERSION
|
||||
|
||||
# Labels
|
||||
LABEL \
|
||||
io.hass.name="ESPHome" \
|
||||
io.hass.description="Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files" \
|
||||
io.hass.arch="${BUILD_ARCH}" \
|
||||
io.hass.type="addon" \
|
||||
io.hass.version=${BUILD_VERSION}
|
|
@ -1,109 +0,0 @@
|
|||
# Esphomeyaml Hass.io Add-On
|
||||
|
||||
[![esphomeyaml logo](https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/logo.png)](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
[![GitHub stars](https://img.shields.io/github/stars/OttoWinter/esphomelib.svg?style=social&label=Star&maxAge=2592000)](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,10 +0,0 @@
|
|||
{
|
||||
"squash": false,
|
||||
"build_from": {
|
||||
"aarch64": "hassioaddons/ubuntu-base-aarch64:2.2.1",
|
||||
"amd64": "hassioaddons/ubuntu-base-amd64:2.2.1",
|
||||
"armhf": "hassioaddons/ubuntu-base-armhf:2.2.1",
|
||||
"i386": "hassioaddons/ubuntu-base-i386:2.2.1"
|
||||
},
|
||||
"args": {}
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
{
|
||||
"name": "esphomeyaml-edge",
|
||||
"version": "dev",
|
||||
"slug": "esphomeyaml-edge",
|
||||
"description": "Development Version! Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files",
|
||||
"url": "https://github.com/OttoWinter/esphomeyaml/tree/dev/esphomeyaml-edge/README.md",
|
||||
"webui": "http://[HOST]:[PORT:6052]",
|
||||
"startup": "application",
|
||||
"arch": [
|
||||
"amd64",
|
||||
"armhf",
|
||||
"i386"
|
||||
],
|
||||
"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": {
|
||||
"ssl": false,
|
||||
"certfile": "fullchain.pem",
|
||||
"keyfile": "privkey.pem",
|
||||
"port": 6052,
|
||||
"esphome_version": "dev"
|
||||
},
|
||||
"schema": {
|
||||
"ssl": "bool",
|
||||
"certfile": "str",
|
||||
"keyfile": "str",
|
||||
"port": "int",
|
||||
"leave_front_door_open": "bool?",
|
||||
"esphome_version": "str?"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 50 KiB |
Before Width: | Height: | Size: 5.3 KiB |
Before Width: | Height: | Size: 8.6 KiB |
|
@ -1,35 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# This files check if all user configuration requirements are met
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
# Check SSL requirements, if enabled
|
||||
if hass.config.true 'ssl'; then
|
||||
if ! hass.config.has_value 'certfile'; then
|
||||
hass.die 'SSL is enabled, but no certfile was specified.'
|
||||
fi
|
||||
|
||||
if ! hass.config.has_value 'keyfile'; then
|
||||
hass.die 'SSL is enabled, but no keyfile was specified'
|
||||
fi
|
||||
|
||||
if ! hass.file_exists "/ssl/$(hass.config.get 'certfile')"; then
|
||||
if ! hass.file_exists "/ssl/$(hass.config.get 'keyfile')"; then
|
||||
# Both files are missing, let's print a friendlier error message
|
||||
text="You enabled encrypted connections using the \"ssl\": true option.
|
||||
However, the SSL files \"$(hass.config.get 'certfile')\" and \"$(hass.config.get 'keyfile')\"
|
||||
were not found. If you're using Hass.io on your local network and don't want
|
||||
to encrypt connections to the ESPHome dashboard, you can manually disable
|
||||
SSL by setting \"ssl\" to false."
|
||||
hass.die "${text}"
|
||||
fi
|
||||
hass.die 'The configured certfile is not found'
|
||||
fi
|
||||
|
||||
if ! hass.file_exists "/ssl/$(hass.config.get 'keyfile')"; then
|
||||
hass.die 'The configured keyfile is not found'
|
||||
fi
|
||||
fi
|
|
@ -1,28 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# Configures NGINX for use with ESPHome
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
declare certfile
|
||||
declare keyfile
|
||||
declare port
|
||||
|
||||
mkdir -p /var/log/nginx
|
||||
|
||||
# Enable SSL
|
||||
if hass.config.true 'ssl'; then
|
||||
rm /etc/nginx/nginx.conf
|
||||
mv /etc/nginx/nginx-ssl.conf /etc/nginx/nginx.conf
|
||||
|
||||
certfile=$(hass.config.get 'certfile')
|
||||
keyfile=$(hass.config.get 'keyfile')
|
||||
|
||||
sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/nginx.conf
|
||||
sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/nginx.conf
|
||||
fi
|
||||
|
||||
port=$(hass.config.get 'port')
|
||||
sed -i "s/%%port%%/${port}/g" /etc/nginx/nginx.conf
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# This files installs the user ESPHome version if specified
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
declare esphome_version
|
||||
|
||||
if hass.config.has_value 'esphome_version'; then
|
||||
esphome_version=$(hass.config.get 'esphome_version')
|
||||
pip2 install --no-cache-dir --no-binary :all: "https://github.com/esphome/esphome/archive/${esphome_version}.zip"
|
||||
fi
|
|
@ -1,13 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# This files migrates the esphome config directory from the old path
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
if [[ ! -d /config/esphome && -d /config/esphomeyaml ]]; then
|
||||
echo "Moving config directory from /config/esphomeyaml to /config/esphome"
|
||||
mv /config/esphomeyaml /config/esphome
|
||||
mv /config/esphome/.esphomeyaml /config/esphome/.esphome
|
||||
fi
|
|
@ -1,62 +0,0 @@
|
|||
worker_processes 1;
|
||||
pid /var/run/nginx.pid;
|
||||
error_log stderr;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
access_log stdout;
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
upstream esphome {
|
||||
ip_hash;
|
||||
server unix:/var/run/esphome.sock;
|
||||
}
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name hassio.local;
|
||||
listen %%port%% default_server ssl;
|
||||
root /dev/null;
|
||||
|
||||
ssl_certificate /ssl/%%certfile%%;
|
||||
ssl_certificate_key /ssl/%%keyfile%%;
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_prefer_server_ciphers on;
|
||||
ssl_ciphers ECDHE-RSA-AES256-GCM-SHA512:DHE-RSA-AES256-GCM-SHA512:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA;
|
||||
ssl_ecdh_curve secp384r1;
|
||||
ssl_session_timeout 10m;
|
||||
ssl_session_cache shared:SSL:10m;
|
||||
ssl_session_tickets off;
|
||||
ssl_stapling on;
|
||||
ssl_stapling_verify on;
|
||||
|
||||
# Redirect http requests to https on the same port.
|
||||
# https://rageagainstshell.com/2016/11/redirect-http-to-https-on-the-same-port-in-nginx/
|
||||
error_page 497 https://$http_host$request_uri;
|
||||
|
||||
location / {
|
||||
proxy_redirect off;
|
||||
proxy_pass http://esphome;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Authorization "";
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,46 +0,0 @@
|
|||
worker_processes 1;
|
||||
pid /var/run/nginx.pid;
|
||||
error_log stderr;
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
access_log stdout;
|
||||
include mime.types;
|
||||
default_type application/octet-stream;
|
||||
sendfile on;
|
||||
keepalive_timeout 65;
|
||||
|
||||
upstream esphome {
|
||||
ip_hash;
|
||||
server unix:/var/run/esphome.sock;
|
||||
}
|
||||
map $http_upgrade $connection_upgrade {
|
||||
default upgrade;
|
||||
'' close;
|
||||
}
|
||||
|
||||
server {
|
||||
server_name hassio.local;
|
||||
listen %%port%% default_server;
|
||||
root /dev/null;
|
||||
|
||||
location / {
|
||||
proxy_redirect off;
|
||||
proxy_pass http://esphome;
|
||||
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection $connection_upgrade;
|
||||
proxy_set_header Authorization "";
|
||||
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header Host $http_host;
|
||||
proxy_set_header X-NginX-Proxy true;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/execlineb -S0
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# Take down the S6 supervision tree when ESPHome fails
|
||||
# ==============================================================================
|
||||
if -n { s6-test $# -ne 0 }
|
||||
if -n { s6-test ${1} -eq 256 }
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
|
@ -1,14 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# Runs the ESPHome dashboard
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
if hass.config.true 'leave_front_door_open'; then
|
||||
export DISABLE_HA_AUTHENTICATION=true
|
||||
fi
|
||||
|
||||
hass.log.info "Starting ESPHome dashboard..."
|
||||
exec esphome /config/esphome dashboard --socket /var/run/esphome.sock --hassio
|
|
@ -1,9 +0,0 @@
|
|||
#!/usr/bin/execlineb -S0
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# Take down the S6 supervision tree when NGINX fails
|
||||
# ==============================================================================
|
||||
if -n { s6-test $# -ne 0 }
|
||||
if -n { s6-test ${1} -eq 256 }
|
||||
|
||||
s6-svscanctl -t /var/run/s6/services
|
|
@ -1,10 +0,0 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: ESPHome
|
||||
# Runs the NGINX proxy
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
hass.log.info "Starting NGINX..."
|
||||
exec nginx -g "daemon off;"
|
|
@ -1,12 +0,0 @@
|
|||
; This file allows the docker build file to install the required platformio
|
||||
; platforms
|
||||
|
||||
[env:espressif8266]
|
||||
platform = espressif8266@1.8.0
|
||||
board = nodemcuv2
|
||||
framework = arduino
|
||||
|
||||
[env:espressif32]
|
||||
platform = espressif32@1.5.0
|
||||
board = nodemcu-32s
|
||||
framework = arduino
|
|
@ -2,108 +2,7 @@
|
|||
|
||||
[![esphomeyaml logo](https://raw.githubusercontent.com/OttoWinter/esphomeyaml/dev/esphomeyaml-edge/logo.png)](https://esphomelib.com/esphomeyaml/index.html)
|
||||
|
||||
[![GitHub stars](https://img.shields.io/github/stars/OttoWinter/esphomelib.svg?style=social&label=Star&maxAge=2592000)](https://github.com/OttoWinter/esphomelib)
|
||||
[![GitHub Release][releases-shield]][releases]
|
||||
[![Discord][discord-shield]][discord]
|
||||
# This Add-On has moved!
|
||||
|
||||
## 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
|
||||
See https://esphome.io/changelog/v1.11.0.html#installation-methods-changed
|
||||
for updated instructions
|
||||
|
|
Before Width: | Height: | Size: 2.8 KiB |
Before Width: | Height: | Size: 5.5 KiB |