├── esphome ├── icon.png ├── logo.png ├── config.json └── README.md ├── template ├── icon.png ├── logo.png ├── config.yaml └── README.md ├── esphome-dev ├── icon.png ├── logo.png ├── images │ ├── screenshot.png │ ├── dht-example.png │ └── temperature-humidity.png ├── rootfs │ └── etc │ │ ├── nginx │ │ ├── includes │ │ │ ├── server_params.conf │ │ │ ├── ssl_params.conf │ │ │ ├── proxy_params.conf │ │ │ └── mime.types │ │ ├── servers │ │ │ ├── direct.disabled │ │ │ ├── ingress.conf │ │ │ └── direct-ssl.disabled │ │ └── nginx.conf │ │ ├── services.d │ │ ├── nginx │ │ │ ├── finish │ │ │ └── run │ │ └── esphome │ │ │ ├── finish │ │ │ └── run │ │ └── cont-init.d │ │ ├── 40-migrate.sh │ │ ├── 30-esphome.sh │ │ ├── 20-nginx.sh │ │ └── 10-requirements.sh ├── build.json ├── Dockerfile ├── config.json └── README.md ├── esphome-beta ├── icon.png ├── logo.png ├── config.json └── README.md ├── repository.json ├── README.md └── script └── generate.py /esphome/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome/icon.png -------------------------------------------------------------------------------- /esphome/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome/logo.png -------------------------------------------------------------------------------- /template/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/template/icon.png -------------------------------------------------------------------------------- /template/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/template/logo.png -------------------------------------------------------------------------------- /esphome-dev/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-dev/icon.png -------------------------------------------------------------------------------- /esphome-dev/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-dev/logo.png -------------------------------------------------------------------------------- /esphome-beta/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-beta/icon.png -------------------------------------------------------------------------------- /esphome-beta/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-beta/logo.png -------------------------------------------------------------------------------- /esphome-dev/images/screenshot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-dev/images/screenshot.png -------------------------------------------------------------------------------- /esphome-dev/images/dht-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-dev/images/dht-example.png -------------------------------------------------------------------------------- /esphome-dev/images/temperature-humidity.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/CircuitSetup/hassio/master/esphome-dev/images/temperature-humidity.png -------------------------------------------------------------------------------- /repository.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ESPHome Hass.io Add-Ons", 3 | "url": "https://github.com/CircuitSetup/hassio", 4 | "maintainer": "ESPHome " 5 | } 6 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/includes/server_params.conf: -------------------------------------------------------------------------------- 1 | root /dev/null; 2 | server_name $hostname; 3 | 4 | add_header X-Content-Type-Options nosniff; 5 | add_header X-XSS-Protection "1; mode=block"; 6 | add_header X-Robots-Tag none; 7 | -------------------------------------------------------------------------------- /esphome-dev/build.json: -------------------------------------------------------------------------------- 1 | { 2 | "args": {}, 3 | "build_from": { 4 | "aarch64": "esphome/esphome-hassio-base-aarch64:2.0.1", 5 | "amd64": "esphome/esphome-hassio-base-amd64:2.0.1", 6 | "armv7": "esphome/esphome-hassio-base-armv7:2.0.1", 7 | "i386": "esphome/esphome-hassio-base-i386:2.0.1" 8 | }, 9 | "squash": false 10 | } -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/servers/direct.disabled: -------------------------------------------------------------------------------- 1 | server { 2 | listen %%port%% default_server; 3 | 4 | include /etc/nginx/includes/server_params.conf; 5 | include /etc/nginx/includes/proxy_params.conf; 6 | # Clear Hass.io Ingress header 7 | proxy_set_header X-Hassio-Ingress ""; 8 | 9 | location / { 10 | proxy_pass http://esphome; 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/services.d/nginx/finish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/execlineb -S0 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # Take down the S6 supervision tree when NGINX fails 5 | # ============================================================================== 6 | if -n { s6-test $# -ne 0 } 7 | if -n { s6-test ${1} -eq 256 } 8 | 9 | s6-svscanctl -t /var/run/s6/services 10 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/services.d/esphome/finish: -------------------------------------------------------------------------------- 1 | #!/usr/bin/execlineb -S0 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # Take down the S6 supervision tree when ESPHome fails 5 | # ============================================================================== 6 | if -n { s6-test $# -ne 0 } 7 | if -n { s6-test ${1} -eq 256 } 8 | 9 | s6-svscanctl -t /var/run/s6/services 10 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/includes/ssl_params.conf: -------------------------------------------------------------------------------- 1 | ssl_protocols TLSv1.2; 2 | ssl_prefer_server_ciphers on; 3 | 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; 4 | ssl_ecdh_curve secp384r1; 5 | ssl_session_timeout 10m; 6 | ssl_session_cache shared:SSL:10m; 7 | ssl_session_tickets off; 8 | ssl_stapling on; 9 | ssl_stapling_verify on; 10 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/servers/ingress.conf: -------------------------------------------------------------------------------- 1 | server { 2 | listen %%interface%%:%%port%% default_server; 3 | 4 | include /etc/nginx/includes/server_params.conf; 5 | include /etc/nginx/includes/proxy_params.conf; 6 | # Set Hass.io Ingress header 7 | proxy_set_header X-Hassio-Ingress "YES"; 8 | 9 | location / { 10 | # Only allow from Hass.io supervisor 11 | allow 172.30.32.2; 12 | deny all; 13 | 14 | proxy_pass http://esphome; 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/services.d/nginx/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # Runs the NGINX proxy 5 | # ============================================================================== 6 | 7 | bashio::log.info "Waiting for dashboard to come up..." 8 | 9 | while [[ ! -S /var/run/esphome.sock ]]; do 10 | sleep 0.5 11 | done 12 | 13 | bashio::log.info "Starting NGINX..." 14 | exec nginx 15 | -------------------------------------------------------------------------------- /esphome-dev/Dockerfile: -------------------------------------------------------------------------------- 1 | ARG BUILD_FROM=esphome/esphome-hassio-base-amd64:2.0.0 2 | FROM ${BUILD_FROM} 3 | 4 | # Copy root filesystem 5 | COPY rootfs / 6 | 7 | RUN pip3 install --no-cache-dir https://github.com/esphome/esphome/archive/dev.zip 8 | 9 | # Build arguments 10 | ARG BUILD_VERSION=dev 11 | 12 | # Labels 13 | LABEL \ 14 | io.hass.name="ESPHome" \ 15 | io.hass.description="Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files" \ 16 | io.hass.type="addon" \ 17 | io.hass.version=dev 18 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/cont-init.d/40-migrate.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # This files migrates the esphome config directory from the old path 5 | # ============================================================================== 6 | 7 | if [[ ! -d /config/esphome && -d /config/esphomeyaml ]]; then 8 | echo "Moving config directory from /config/esphomeyaml to /config/esphome" 9 | mv /config/esphomeyaml /config/esphome 10 | mv /config/esphome/.esphomeyaml /config/esphome/.esphome 11 | fi 12 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/includes/proxy_params.conf: -------------------------------------------------------------------------------- 1 | proxy_http_version 1.1; 2 | proxy_ignore_client_abort off; 3 | proxy_read_timeout 86400s; 4 | proxy_redirect off; 5 | proxy_send_timeout 86400s; 6 | proxy_max_temp_file_size 0; 7 | 8 | proxy_set_header Accept-Encoding ""; 9 | proxy_set_header Connection $connection_upgrade; 10 | proxy_set_header Host $http_host; 11 | proxy_set_header Upgrade $http_upgrade; 12 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 13 | proxy_set_header X-Forwarded-Proto $scheme; 14 | proxy_set_header X-NginX-Proxy true; 15 | proxy_set_header X-Real-IP $remote_addr; 16 | proxy_set_header Authorization ""; 17 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # ESPHome [![Discord Chat](https://img.shields.io/discord/429907082951524364.svg)](https://discord.gg/KhAMKrd) [![GitHub release](https://img.shields.io/github/release/esphome/esphome.svg)](https://GitHub.com/esphome/esphome/releases/) 2 | 3 | [![ESPHome Logo](https://esphome.io/_images/logo-text.png)](https://esphome.io/) 4 | 5 | This is the Hass.io addon repository for ESPHome. For the ESPHome source please go to [esphome](https://github.com/esphome/esphome) 6 | 7 | **Documentation:** https://esphome.io/ 8 | 9 | For issues, please go to [the issue tracker](https://github.com/esphome/issues/issues). 10 | 11 | For feature requests, please see [feature requests](https://github.com/esphome/feature-requests/issues). 12 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/servers/direct-ssl.disabled: -------------------------------------------------------------------------------- 1 | server { 2 | listen %%port%% default_server ssl http2; 3 | 4 | include /etc/nginx/includes/server_params.conf; 5 | include /etc/nginx/includes/proxy_params.conf; 6 | include /etc/nginx/includes/ssl_params.conf; 7 | 8 | ssl on; 9 | ssl_certificate /ssl/%%certfile%%; 10 | ssl_certificate_key /ssl/%%keyfile%%; 11 | 12 | # Clear Hass.io Ingress header 13 | proxy_set_header X-Hassio-Ingress ""; 14 | 15 | # Redirect http requests to https on the same port. 16 | # https://rageagainstshell.com/2016/11/redirect-http-to-https-on-the-same-port-in-nginx/ 17 | error_page 497 https://$http_host$request_uri; 18 | 19 | location / { 20 | proxy_pass http://esphome; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/cont-init.d/30-esphome.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # This files installs the user ESPHome version if specified 5 | # ============================================================================== 6 | 7 | declare esphome_version 8 | 9 | if bashio::config.has_value 'esphome_version'; then 10 | esphome_version=$(bashio::config 'esphome_version') 11 | full_url="https://github.com/CircuitSetup/esphome@test" 12 | bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..." 13 | pip3 install -U --no-cache-dir git+"${full_url}" \ 14 | || bashio::exit.nok "Failed installing esphome pinned version." 15 | fi 16 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/nginx.conf: -------------------------------------------------------------------------------- 1 | daemon off; 2 | user root; 3 | pid /var/run/nginx.pid; 4 | worker_processes 1; 5 | # Hass.io addon log 6 | error_log /proc/1/fd/1 error; 7 | events { 8 | worker_connections 1024; 9 | } 10 | 11 | http { 12 | include /etc/nginx/includes/mime.types; 13 | access_log stdout; 14 | default_type application/octet-stream; 15 | gzip on; 16 | keepalive_timeout 65; 17 | sendfile on; 18 | server_tokens off; 19 | 20 | map $http_upgrade $connection_upgrade { 21 | default upgrade; 22 | '' close; 23 | } 24 | 25 | # Use Hass.io supervisor as resolver 26 | resolver 172.30.32.2; 27 | 28 | upstream esphome { 29 | server unix:/var/run/esphome.sock; 30 | } 31 | 32 | include /etc/nginx/servers/*.conf; 33 | } 34 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/services.d/esphome/run: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # Runs the ESPHome dashboard 5 | # ============================================================================== 6 | 7 | export ESPHOME_IS_HASSIO=true 8 | 9 | if bashio::config.true 'leave_front_door_open'; then 10 | export DISABLE_HA_AUTHENTICATION=true 11 | fi 12 | 13 | if bashio::config.true 'streamer_mode'; then 14 | export ESPHOME_STREAMER_MODE=true 15 | fi 16 | 17 | if bashio::config.true 'status_use_ping'; then 18 | export ESPHOME_DASHBOARD_USE_PING=true 19 | fi 20 | 21 | if bashio::config.has_value 'relative_url'; then 22 | export ESPHOME_DASHBOARD_RELATIVE_URL=$(bashio::config 'relative_url') 23 | fi 24 | 25 | bashio::log.info "Starting ESPHome dashboard..." 26 | exec esphome /config/esphome dashboard --socket /var/run/esphome.sock --hassio 27 | -------------------------------------------------------------------------------- /esphome-beta/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "arch": [ 3 | "amd64", 4 | "i386", 5 | "armv7", 6 | "aarch64" 7 | ], 8 | "auth_api": true, 9 | "auto_uart": true, 10 | "boot": "auto", 11 | "description": "Beta version of ESPHome Hass.io add-on.", 12 | "hassio_api": true, 13 | "hassio_role": "default", 14 | "homeassistant_api": false, 15 | "host_network": true, 16 | "image": "esphome/esphome-hassio-{arch}", 17 | "ingress": true, 18 | "ingress_port": 0, 19 | "map": [ 20 | "ssl:ro", 21 | "config:rw" 22 | ], 23 | "name": "ESPHome (beta)", 24 | "options": {}, 25 | "panel_icon": "mdi:chip", 26 | "ports": { 27 | "6052/tcp": null 28 | }, 29 | "ports_description": { 30 | "6052/tcp": "Web interface (Not required for Hass.io Ingress)" 31 | }, 32 | "schema": { 33 | "certfile": "str?", 34 | "esphome_version": "str?", 35 | "keyfile": "str?", 36 | "leave_front_door_open": "bool?", 37 | "relative_url": "str?", 38 | "ssl": "bool?", 39 | "status_use_ping": "bool?", 40 | "streamer_mode": "bool?" 41 | }, 42 | "slug": "esphome-beta", 43 | "startup": "application", 44 | "url": "https://beta.esphome.io/", 45 | "version": "1.14.0b3", 46 | "webui": "http://[HOST]:[PORT:6052]" 47 | } -------------------------------------------------------------------------------- /esphome/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "arch": [ 3 | "amd64", 4 | "i386", 5 | "armv7", 6 | "aarch64" 7 | ], 8 | "auth_api": true, 9 | "auto_uart": true, 10 | "boot": "auto", 11 | "description": "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices.", 12 | "hassio_api": true, 13 | "hassio_role": "default", 14 | "homeassistant_api": false, 15 | "host_network": true, 16 | "image": "esphome/esphome-hassio-{arch}", 17 | "ingress": true, 18 | "ingress_port": 0, 19 | "map": [ 20 | "ssl:ro", 21 | "config:rw" 22 | ], 23 | "name": "ESPHome", 24 | "options": {}, 25 | "panel_icon": "mdi:chip", 26 | "ports": { 27 | "6052/tcp": null 28 | }, 29 | "ports_description": { 30 | "6052/tcp": "Web interface (Not required for Hass.io Ingress)" 31 | }, 32 | "schema": { 33 | "certfile": "str?", 34 | "esphome_version": "str?", 35 | "keyfile": "str?", 36 | "leave_front_door_open": "bool?", 37 | "relative_url": "str?", 38 | "ssl": "bool?", 39 | "status_use_ping": "bool?", 40 | "streamer_mode": "bool?" 41 | }, 42 | "slug": "esphome", 43 | "startup": "application", 44 | "url": "https://esphome.io/", 45 | "version": "1.13.6", 46 | "webui": "http://[HOST]:[PORT:6052]" 47 | } -------------------------------------------------------------------------------- /esphome-dev/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "arch": [ 3 | "amd64", 4 | "i386", 5 | "armv7", 6 | "aarch64" 7 | ], 8 | "auth_api": true, 9 | "auto_uart": true, 10 | "boot": "auto", 11 | "description": "Development Version! Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files", 12 | "hassio_api": true, 13 | "hassio_role": "default", 14 | "homeassistant_api": false, 15 | "host_network": true, 16 | "ingress": true, 17 | "ingress_port": 0, 18 | "map": [ 19 | "ssl:ro", 20 | "config:rw" 21 | ], 22 | "name": "ESPHome (devc)", 23 | "options": { 24 | "esphome_version": "dev" 25 | }, 26 | "panel_icon": "mdi:chip", 27 | "ports": { 28 | "6052/tcp": null 29 | }, 30 | "ports_description": { 31 | "6052/tcp": "Web interface (Not required for Hass.io Ingress)" 32 | }, 33 | "schema": { 34 | "certfile": "str?", 35 | "esphome_version": "str?", 36 | "keyfile": "str?", 37 | "leave_front_door_open": "bool?", 38 | "relative_url": "str?", 39 | "ssl": "bool?", 40 | "status_use_ping": "bool?", 41 | "streamer_mode": "bool?" 42 | }, 43 | "slug": "esphome-dev", 44 | "startup": "application", 45 | "url": "https://next.esphome.io/", 46 | "version": "dev", 47 | "webui": "http://[HOST]:[PORT:6052]" 48 | } 49 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/cont-init.d/20-nginx.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # Configures NGINX for use with ESPHome 5 | # ============================================================================== 6 | 7 | declare certfile 8 | declare keyfile 9 | declare direct_port 10 | declare ingress_interface 11 | declare ingress_port 12 | 13 | mkdir -p /var/log/nginx 14 | 15 | direct_port=$(bashio::addon.port 6052) 16 | if bashio::var.has_value "${direct_port}"; then 17 | if bashio::config.true 'ssl'; then 18 | certfile=$(bashio::config 'certfile') 19 | keyfile=$(bashio::config 'keyfile') 20 | 21 | mv /etc/nginx/servers/direct-ssl.disabled /etc/nginx/servers/direct.conf 22 | sed -i "s/%%certfile%%/${certfile}/g" /etc/nginx/servers/direct.conf 23 | sed -i "s/%%keyfile%%/${keyfile}/g" /etc/nginx/servers/direct.conf 24 | else 25 | mv /etc/nginx/servers/direct.disabled /etc/nginx/servers/direct.conf 26 | fi 27 | 28 | sed -i "s/%%port%%/${direct_port}/g" /etc/nginx/servers/direct.conf 29 | fi 30 | 31 | ingress_port=$(bashio::addon.ingress_port) 32 | ingress_interface=$(bashio::addon.ip_address) 33 | sed -i "s/%%port%%/${ingress_port}/g" /etc/nginx/servers/ingress.conf 34 | sed -i "s/%%interface%%/${ingress_interface}/g" /etc/nginx/servers/ingress.conf 35 | -------------------------------------------------------------------------------- /script/generate.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | import argparse 4 | import yaml 5 | from pathlib import Path 6 | from enum import Enum 7 | import json 8 | from shutil import copyfile 9 | 10 | class Channel(Enum): 11 | stable = 'stable' 12 | beta = 'beta' 13 | dev = 'dev' 14 | 15 | parser = argparse.ArgumentParser(description='Generate ESPHome Hass.io config.json') 16 | parser.add_argument('channels', nargs='+', type=Channel, choices=list(Channel)) 17 | args = parser.parse_args() 18 | 19 | root = Path(__file__).parent.parent 20 | templ = root / 'template' 21 | 22 | with open(templ / "config.yaml", 'r') as f: 23 | config = yaml.safe_load(f) 24 | 25 | copyf = config['copy_files'] 26 | 27 | for channel in args.channels: 28 | conf = config[f'esphome-{channel.value}'] 29 | base_image = conf.pop('base_image') 30 | dir_ = root / conf.pop('directory') 31 | path = dir_ / 'config.json' 32 | with open(path, 'w') as f: 33 | json.dump(conf, f, indent=2, sort_keys=True) 34 | 35 | for file_, conf_ in copyf.items(): 36 | copyfile(templ / file_, dir_ / file_) 37 | 38 | if channel == Channel.dev: 39 | path = dir_ / 'build.json' 40 | build_conf = { 41 | 'squash': False, 42 | "build_from": {arch: base_image.format(arch=arch) for arch in conf['arch']}, 43 | "args": {} 44 | } 45 | with open(path, 'w') as f: 46 | json.dump(build_conf, f, indent=2, sort_keys=True) 47 | 48 | print(f"Wrote {path}") 49 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/cont-init.d/10-requirements.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/with-contenv bashio 2 | # ============================================================================== 3 | # Community Hass.io Add-ons: ESPHome 4 | # This files check if all user configuration requirements are met 5 | # ============================================================================== 6 | 7 | # Check SSL requirements, if enabled 8 | if bashio::config.true 'ssl'; then 9 | if ! bashio::config.has_value 'certfile'; then 10 | bashio::fatal 'SSL is enabled, but no certfile was specified.' 11 | bashio::exit.nok 12 | fi 13 | 14 | if ! bashio::config.has_value 'keyfile'; then 15 | bashio::fatal 'SSL is enabled, but no keyfile was specified' 16 | bashio::exit.nok 17 | fi 18 | 19 | 20 | certfile="/ssl/$(bashio::config 'certfile')" 21 | keyfile="/ssl/$(bashio::config 'keyfile')" 22 | 23 | if ! bashio::fs.file_exists "${certfile}"; then 24 | if ! bashio::fs.file_exists "${keyfile}"; then 25 | # Both files are missing, let's print a friendlier error message 26 | bashio::log.fatal 'You enabled encrypted connections using the "ssl": true option.' 27 | bashio::log.fatal "However, the SSL files '${certfile}' and '${keyfile}'" 28 | bashio::log.fatal "were not found. If you're using Hass.io on your local network and don't want" 29 | bashio::log.fatal 'to encrypt connections to the ESPHome dashboard, you can manually disable' 30 | bashio::log.fatal 'SSL by setting "ssl" to false."' 31 | bashio::exit.nok 32 | fi 33 | bashio::log.fatal "The configured certfile '${certfile}' was not found." 34 | bashio::exit.nok 35 | fi 36 | 37 | if ! bashio::fs.file_exists "/ssl/$(bashio::config 'keyfile')"; then 38 | bashio::log.fatal "The configured keyfile '${keyfile}' was not found." 39 | bashio::exit.nok 40 | fi 41 | fi 42 | -------------------------------------------------------------------------------- /template/config.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | base: &base 3 | url: https://esphome.io/ 4 | webui: 'http://[HOST]:[PORT:6052]' 5 | startup: application 6 | boot: auto 7 | arch: 8 | - amd64 9 | - i386 10 | - armv7 11 | - aarch64 12 | # Uses Hass.io API (auth) 13 | hassio_api: true 14 | auth_api: true 15 | hassio_role: default 16 | # Doesn't use HA API 17 | homeassistant_api: false 18 | # Host network mode for mDNS 19 | host_network: true 20 | # Ingress settings 21 | ingress: true 22 | ingress_port: 0 23 | panel_icon: 'mdi:chip' 24 | # Automatically add UART devices to addon 25 | auto_uart: true 26 | ports: 27 | '6052/tcp': null 28 | ports_description: 29 | '6052/tcp': "Web interface (Not required for Hass.io Ingress)" 30 | map: 31 | - ssl:ro 32 | - config:rw 33 | schema: 34 | ssl: bool? 35 | certfile: str? 36 | keyfile: str? 37 | leave_front_door_open: bool? 38 | esphome_version: str? 39 | streamer_mode: bool? 40 | relative_url: str? 41 | status_use_ping: bool? 42 | base_image: esphome/esphome-hassio-base-{arch}:2.0.1 43 | 44 | esphome-dev: 45 | <<: *base 46 | directory: esphome-dev 47 | name: ESPHome (dev) 48 | version: 'dev' # DEV 49 | slug: esphome-dev 50 | description: "Development Version! Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files" 51 | url: https://next.esphome.io/ 52 | options: 53 | esphome_version: dev 54 | 55 | esphome-beta: 56 | <<: *base 57 | directory: esphome-beta 58 | name: ESPHome (beta) 59 | version: '1.14.0b3' # BETA 60 | slug: esphome-beta 61 | description: "Beta version of ESPHome Hass.io add-on." 62 | url: https://beta.esphome.io/ 63 | image: esphome/esphome-hassio-{arch} 64 | options: {} 65 | 66 | esphome-stable: 67 | <<: *base 68 | directory: esphome 69 | name: ESPHome 70 | version: '1.13.6' # STABLE 71 | slug: esphome 72 | description: "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices." 73 | image: esphome/esphome-hassio-{arch} 74 | options: {} 75 | 76 | copy_files: 77 | icon.png: 78 | logo.png: 79 | README.md: 80 | -------------------------------------------------------------------------------- /esphome-dev/rootfs/etc/nginx/includes/mime.types: -------------------------------------------------------------------------------- 1 | types { 2 | text/html html htm shtml; 3 | text/css css; 4 | text/xml xml; 5 | image/gif gif; 6 | image/jpeg jpeg jpg; 7 | application/javascript js; 8 | application/atom+xml atom; 9 | application/rss+xml rss; 10 | 11 | text/mathml mml; 12 | text/plain txt; 13 | text/vnd.sun.j2me.app-descriptor jad; 14 | text/vnd.wap.wml wml; 15 | text/x-component htc; 16 | 17 | image/png png; 18 | image/svg+xml svg svgz; 19 | image/tiff tif tiff; 20 | image/vnd.wap.wbmp wbmp; 21 | image/webp webp; 22 | image/x-icon ico; 23 | image/x-jng jng; 24 | image/x-ms-bmp bmp; 25 | 26 | font/woff woff; 27 | font/woff2 woff2; 28 | 29 | application/java-archive jar war ear; 30 | application/json json; 31 | application/mac-binhex40 hqx; 32 | application/msword doc; 33 | application/pdf pdf; 34 | application/postscript ps eps ai; 35 | application/rtf rtf; 36 | application/vnd.apple.mpegurl m3u8; 37 | application/vnd.google-earth.kml+xml kml; 38 | application/vnd.google-earth.kmz kmz; 39 | application/vnd.ms-excel xls; 40 | application/vnd.ms-fontobject eot; 41 | application/vnd.ms-powerpoint ppt; 42 | application/vnd.oasis.opendocument.graphics odg; 43 | application/vnd.oasis.opendocument.presentation odp; 44 | application/vnd.oasis.opendocument.spreadsheet ods; 45 | application/vnd.oasis.opendocument.text odt; 46 | application/vnd.openxmlformats-officedocument.presentationml.presentation 47 | pptx; 48 | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet 49 | xlsx; 50 | application/vnd.openxmlformats-officedocument.wordprocessingml.document 51 | docx; 52 | application/vnd.wap.wmlc wmlc; 53 | application/x-7z-compressed 7z; 54 | application/x-cocoa cco; 55 | application/x-java-archive-diff jardiff; 56 | application/x-java-jnlp-file jnlp; 57 | application/x-makeself run; 58 | application/x-perl pl pm; 59 | application/x-pilot prc pdb; 60 | application/x-rar-compressed rar; 61 | application/x-redhat-package-manager rpm; 62 | application/x-sea sea; 63 | application/x-shockwave-flash swf; 64 | application/x-stuffit sit; 65 | application/x-tcl tcl tk; 66 | application/x-x509-ca-cert der pem crt; 67 | application/x-xpinstall xpi; 68 | application/xhtml+xml xhtml; 69 | application/xspf+xml xspf; 70 | application/zip zip; 71 | 72 | application/octet-stream bin exe dll; 73 | application/octet-stream deb; 74 | application/octet-stream dmg; 75 | application/octet-stream iso img; 76 | application/octet-stream msi msp msm; 77 | 78 | audio/midi mid midi kar; 79 | audio/mpeg mp3; 80 | audio/ogg ogg; 81 | audio/x-m4a m4a; 82 | audio/x-realaudio ra; 83 | 84 | video/3gpp 3gpp 3gp; 85 | video/mp2t ts; 86 | video/mp4 mp4; 87 | video/mpeg mpeg mpg; 88 | video/quicktime mov; 89 | video/webm webm; 90 | video/x-flv flv; 91 | video/x-m4v m4v; 92 | video/x-mng mng; 93 | video/x-ms-asf asx asf; 94 | video/x-ms-wmv wmv; 95 | video/x-msvideo avi; 96 | } 97 | -------------------------------------------------------------------------------- /esphome/README.md: -------------------------------------------------------------------------------- 1 | # ESPHome Hass.io Add-On 2 | 3 | [![ESPHome logo](https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/logo.png)](https://esphome.io/) 4 | 5 | [![GitHub stars](https://img.shields.io/github/stars/esphome/esphome.svg?style=social&label=Star&maxAge=2592000)](https://github.com/esphome/esphome) 6 | [![GitHub Release][releases-shield]][releases] 7 | [![Discord][discord-shield]][discord] 8 | 9 | ## About 10 | 11 | This add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers 12 | directly through Hass.io **with no programming experience required**. All you need to do 13 | is write YAML configuration files; the rest (over-the-air updates, compiling) is all 14 | handled by ESPHome. 15 | 16 |

17 | 18 |

19 | 20 | [_View the ESPHome documentation here_](https://esphome.io/) 21 | 22 | ## Example 23 | 24 | With ESPHome, you can go from a few lines of YAML straight to a custom-made 25 | firmware. For example, to include a [DHT22][dht22]. 26 | temperature and humidity sensor, you just need to include 8 lines of YAML 27 | in your configuration file: 28 | 29 | 30 | 31 | Then just click UPLOAD and the sensor will magically appear in Home Assistant: 32 | 33 | 34 | 35 | ## Installation 36 | 37 | To install this Hass.io add-on you need to add the ESPHome add-on repository 38 | first: 39 | 40 | 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/esphome/hassio in the "Add new repository by URL" field. 41 | 2. Now scroll down and select the "ESPHome" add-on. 42 | 3. Press install to download the add-on and unpack it on your machine. This can take some time. 43 | 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. 44 | 5. Start the add-on, check the logs of the add-on to see if everything went well. 45 | 6. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in. 46 | 47 | You can view the ESPHome docs here: https://esphome.io/ 48 | 49 | ## Configuration 50 | 51 | **Note**: _Remember to restart the add-on when the configuration is changed._ 52 | 53 | Example add-on configuration: 54 | 55 | ```json 56 | { 57 | "ssl": false, 58 | "certfile": "fullchain.pem", 59 | "keyfile": "privkey.pem" 60 | } 61 | ``` 62 | 63 | ### Option: `ssl` 64 | 65 | Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on. 66 | Set it to `true` to encrypt communications, `false` otherwise. 67 | Please note that if you set this to `true` you must also generate the key and certificate 68 | files for encryption. For example using [Let's Encrypt](https://www.home-assistant.io/addons/lets_encrypt/) 69 | or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certificates/tls_self_signed_certificate/). 70 | 71 | ### Option: `certfile` 72 | 73 | The certificate file to use for SSL. If this file doesn't exist, the add-on start will fail. 74 | 75 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 76 | 77 | ### Option: `keyfile` 78 | 79 | The private key file to use for SSL. If this file doesn't exist, the add-on start will fail. 80 | 81 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 82 | 83 | ### Option: `leave_front_door_open` 84 | 85 | Adding this option to the add-on configuration allows you to disable 86 | authentication by setting it to `true`. 87 | 88 | ### Option: `esphome_version` 89 | 90 | Manually override which ESPHome version to use in the addon. 91 | For example to install the latest development version, use `"esphome_version": "dev"`, 92 | or for version 1.10.0: `"esphome_version": "v1.10.0""`. 93 | 94 | Please note that this does not always work and is only meant for testing, usually the 95 | ESPHome add-on and dashboard version must match to guarantee a working system. 96 | 97 | ### Option: `relative_url` 98 | 99 | Host the ESPHome dashboard under a relative URL, so that it can be integrated 100 | into existing web proxys like nginx under a relative URl. Defaults to `/`. 101 | 102 | ### Option: `status_use_ping` 103 | 104 | By default the dashboard uses mDNS to check if nodes are online. This does 105 | not work across subnets unless your router supports mDNS forwarding or avahi. 106 | 107 | Setting this to `true` will make ESPHome use ICMP ping requests to get the node status. Use this if all nodes always have offline status even when they're connected. 108 | 109 | ### Option: `streamer_mode` 110 | 111 | If set to `true`, this will enable streamer mode, which makes ESPHome hide all 112 | potentially private information. So for example WiFi (B)SSIDs (which could be 113 | used to find your location), usernames etc. Please note that you need to use 114 | the `!secret` tag in your YAML file to also prevent these from showing up 115 | while editing and validating. 116 | 117 | [discord-shield]: https://img.shields.io/discord/429907082951524364.svg 118 | [dht22]: https://esphome.io/components/sensor/dht.html 119 | [discord]: https://discord.gg/KhAMKrd 120 | [releases-shield]: https://img.shields.io/github/release/esphome/esphome.svg 121 | [releases]: https://esphome.io/changelog/index.html 122 | [repository]: https://github.com/esphome/esphome 123 | -------------------------------------------------------------------------------- /template/README.md: -------------------------------------------------------------------------------- 1 | # ESPHome Hass.io Add-On 2 | 3 | [![ESPHome logo](https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/logo.png)](https://esphome.io/) 4 | 5 | [![GitHub stars](https://img.shields.io/github/stars/esphome/esphome.svg?style=social&label=Star&maxAge=2592000)](https://github.com/esphome/esphome) 6 | [![GitHub Release][releases-shield]][releases] 7 | [![Discord][discord-shield]][discord] 8 | 9 | ## About 10 | 11 | This add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers 12 | directly through Hass.io **with no programming experience required**. All you need to do 13 | is write YAML configuration files; the rest (over-the-air updates, compiling) is all 14 | handled by ESPHome. 15 | 16 |

17 | 18 |

19 | 20 | [_View the ESPHome documentation here_](https://esphome.io/) 21 | 22 | ## Example 23 | 24 | With ESPHome, you can go from a few lines of YAML straight to a custom-made 25 | firmware. For example, to include a [DHT22][dht22]. 26 | temperature and humidity sensor, you just need to include 8 lines of YAML 27 | in your configuration file: 28 | 29 | 30 | 31 | Then just click UPLOAD and the sensor will magically appear in Home Assistant: 32 | 33 | 34 | 35 | ## Installation 36 | 37 | To install this Hass.io add-on you need to add the ESPHome add-on repository 38 | first: 39 | 40 | 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/esphome/hassio in the "Add new repository by URL" field. 41 | 2. Now scroll down and select the "ESPHome" add-on. 42 | 3. Press install to download the add-on and unpack it on your machine. This can take some time. 43 | 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. 44 | 5. Start the add-on, check the logs of the add-on to see if everything went well. 45 | 6. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in. 46 | 47 | You can view the ESPHome docs here: https://esphome.io/ 48 | 49 | ## Configuration 50 | 51 | **Note**: _Remember to restart the add-on when the configuration is changed._ 52 | 53 | Example add-on configuration: 54 | 55 | ```json 56 | { 57 | "ssl": false, 58 | "certfile": "fullchain.pem", 59 | "keyfile": "privkey.pem" 60 | } 61 | ``` 62 | 63 | ### Option: `ssl` 64 | 65 | Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on. 66 | Set it to `true` to encrypt communications, `false` otherwise. 67 | Please note that if you set this to `true` you must also generate the key and certificate 68 | files for encryption. For example using [Let's Encrypt](https://www.home-assistant.io/addons/lets_encrypt/) 69 | or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certificates/tls_self_signed_certificate/). 70 | 71 | ### Option: `certfile` 72 | 73 | The certificate file to use for SSL. If this file doesn't exist, the add-on start will fail. 74 | 75 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 76 | 77 | ### Option: `keyfile` 78 | 79 | The private key file to use for SSL. If this file doesn't exist, the add-on start will fail. 80 | 81 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 82 | 83 | ### Option: `leave_front_door_open` 84 | 85 | Adding this option to the add-on configuration allows you to disable 86 | authentication by setting it to `true`. 87 | 88 | ### Option: `esphome_version` 89 | 90 | Manually override which ESPHome version to use in the addon. 91 | For example to install the latest development version, use `"esphome_version": "dev"`, 92 | or for version 1.10.0: `"esphome_version": "v1.10.0""`. 93 | 94 | Please note that this does not always work and is only meant for testing, usually the 95 | ESPHome add-on and dashboard version must match to guarantee a working system. 96 | 97 | ### Option: `relative_url` 98 | 99 | Host the ESPHome dashboard under a relative URL, so that it can be integrated 100 | into existing web proxys like nginx under a relative URl. Defaults to `/`. 101 | 102 | ### Option: `status_use_ping` 103 | 104 | By default the dashboard uses mDNS to check if nodes are online. This does 105 | not work across subnets unless your router supports mDNS forwarding or avahi. 106 | 107 | Setting this to `true` will make ESPHome use ICMP ping requests to get the node status. Use this if all nodes always have offline status even when they're connected. 108 | 109 | ### Option: `streamer_mode` 110 | 111 | If set to `true`, this will enable streamer mode, which makes ESPHome hide all 112 | potentially private information. So for example WiFi (B)SSIDs (which could be 113 | used to find your location), usernames etc. Please note that you need to use 114 | the `!secret` tag in your YAML file to also prevent these from showing up 115 | while editing and validating. 116 | 117 | [discord-shield]: https://img.shields.io/discord/429907082951524364.svg 118 | [dht22]: https://esphome.io/components/sensor/dht.html 119 | [discord]: https://discord.gg/KhAMKrd 120 | [releases-shield]: https://img.shields.io/github/release/esphome/esphome.svg 121 | [releases]: https://esphome.io/changelog/index.html 122 | [repository]: https://github.com/esphome/esphome 123 | -------------------------------------------------------------------------------- /esphome-beta/README.md: -------------------------------------------------------------------------------- 1 | # ESPHome Hass.io Add-On 2 | 3 | [![ESPHome logo](https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/logo.png)](https://esphome.io/) 4 | 5 | [![GitHub stars](https://img.shields.io/github/stars/esphome/esphome.svg?style=social&label=Star&maxAge=2592000)](https://github.com/esphome/esphome) 6 | [![GitHub Release][releases-shield]][releases] 7 | [![Discord][discord-shield]][discord] 8 | 9 | ## About 10 | 11 | This add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers 12 | directly through Hass.io **with no programming experience required**. All you need to do 13 | is write YAML configuration files; the rest (over-the-air updates, compiling) is all 14 | handled by ESPHome. 15 | 16 |

17 | 18 |

19 | 20 | [_View the ESPHome documentation here_](https://esphome.io/) 21 | 22 | ## Example 23 | 24 | With ESPHome, you can go from a few lines of YAML straight to a custom-made 25 | firmware. For example, to include a [DHT22][dht22]. 26 | temperature and humidity sensor, you just need to include 8 lines of YAML 27 | in your configuration file: 28 | 29 | 30 | 31 | Then just click UPLOAD and the sensor will magically appear in Home Assistant: 32 | 33 | 34 | 35 | ## Installation 36 | 37 | To install this Hass.io add-on you need to add the ESPHome add-on repository 38 | first: 39 | 40 | 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/esphome/hassio in the "Add new repository by URL" field. 41 | 2. Now scroll down and select the "ESPHome" add-on. 42 | 3. Press install to download the add-on and unpack it on your machine. This can take some time. 43 | 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. 44 | 5. Start the add-on, check the logs of the add-on to see if everything went well. 45 | 6. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in. 46 | 47 | You can view the ESPHome docs here: https://esphome.io/ 48 | 49 | ## Configuration 50 | 51 | **Note**: _Remember to restart the add-on when the configuration is changed._ 52 | 53 | Example add-on configuration: 54 | 55 | ```json 56 | { 57 | "ssl": false, 58 | "certfile": "fullchain.pem", 59 | "keyfile": "privkey.pem" 60 | } 61 | ``` 62 | 63 | ### Option: `ssl` 64 | 65 | Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on. 66 | Set it to `true` to encrypt communications, `false` otherwise. 67 | Please note that if you set this to `true` you must also generate the key and certificate 68 | files for encryption. For example using [Let's Encrypt](https://www.home-assistant.io/addons/lets_encrypt/) 69 | or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certificates/tls_self_signed_certificate/). 70 | 71 | ### Option: `certfile` 72 | 73 | The certificate file to use for SSL. If this file doesn't exist, the add-on start will fail. 74 | 75 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 76 | 77 | ### Option: `keyfile` 78 | 79 | The private key file to use for SSL. If this file doesn't exist, the add-on start will fail. 80 | 81 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 82 | 83 | ### Option: `leave_front_door_open` 84 | 85 | Adding this option to the add-on configuration allows you to disable 86 | authentication by setting it to `true`. 87 | 88 | ### Option: `esphome_version` 89 | 90 | Manually override which ESPHome version to use in the addon. 91 | For example to install the latest development version, use `"esphome_version": "dev"`, 92 | or for version 1.10.0: `"esphome_version": "v1.10.0""`. 93 | 94 | Please note that this does not always work and is only meant for testing, usually the 95 | ESPHome add-on and dashboard version must match to guarantee a working system. 96 | 97 | ### Option: `relative_url` 98 | 99 | Host the ESPHome dashboard under a relative URL, so that it can be integrated 100 | into existing web proxys like nginx under a relative URl. Defaults to `/`. 101 | 102 | ### Option: `status_use_ping` 103 | 104 | By default the dashboard uses mDNS to check if nodes are online. This does 105 | not work across subnets unless your router supports mDNS forwarding or avahi. 106 | 107 | Setting this to `true` will make ESPHome use ICMP ping requests to get the node status. Use this if all nodes always have offline status even when they're connected. 108 | 109 | ### Option: `streamer_mode` 110 | 111 | If set to `true`, this will enable streamer mode, which makes ESPHome hide all 112 | potentially private information. So for example WiFi (B)SSIDs (which could be 113 | used to find your location), usernames etc. Please note that you need to use 114 | the `!secret` tag in your YAML file to also prevent these from showing up 115 | while editing and validating. 116 | 117 | [discord-shield]: https://img.shields.io/discord/429907082951524364.svg 118 | [dht22]: https://esphome.io/components/sensor/dht.html 119 | [discord]: https://discord.gg/KhAMKrd 120 | [releases-shield]: https://img.shields.io/github/release/esphome/esphome.svg 121 | [releases]: https://esphome.io/changelog/index.html 122 | [repository]: https://github.com/esphome/esphome 123 | -------------------------------------------------------------------------------- /esphome-dev/README.md: -------------------------------------------------------------------------------- 1 | # ESPHome Hass.io Add-On 2 | 3 | [![ESPHome logo](https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/logo.png)](https://esphome.io/) 4 | 5 | [![GitHub stars](https://img.shields.io/github/stars/esphome/esphome.svg?style=social&label=Star&maxAge=2592000)](https://github.com/esphome/esphome) 6 | [![GitHub Release][releases-shield]][releases] 7 | [![Discord][discord-shield]][discord] 8 | 9 | ## About 10 | 11 | This add-on allows you to manage and program your ESP8266 and ESP32 based microcontrollers 12 | directly through Hass.io **with no programming experience required**. All you need to do 13 | is write YAML configuration files; the rest (over-the-air updates, compiling) is all 14 | handled by ESPHome. 15 | 16 |

17 | 18 |

19 | 20 | [_View the ESPHome documentation here_](https://esphome.io/) 21 | 22 | ## Example 23 | 24 | With ESPHome, you can go from a few lines of YAML straight to a custom-made 25 | firmware. For example, to include a [DHT22][dht22]. 26 | temperature and humidity sensor, you just need to include 8 lines of YAML 27 | in your configuration file: 28 | 29 | 30 | 31 | Then just click UPLOAD and the sensor will magically appear in Home Assistant: 32 | 33 | 34 | 35 | ## Installation 36 | 37 | To install this Hass.io add-on you need to add the ESPHome add-on repository 38 | first: 39 | 40 | 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/esphome/hassio in the "Add new repository by URL" field. 41 | 2. Now scroll down and select the "ESPHome" add-on. 42 | 3. Press install to download the add-on and unpack it on your machine. This can take some time. 43 | 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. 44 | 5. Start the add-on, check the logs of the add-on to see if everything went well. 45 | 6. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in. 46 | 47 | You can view the ESPHome docs here: https://esphome.io/ 48 | 49 | ## Configuration 50 | 51 | **Note**: _Remember to restart the add-on when the configuration is changed._ 52 | 53 | Example add-on configuration: 54 | 55 | ```json 56 | { 57 | "ssl": false, 58 | "certfile": "fullchain.pem", 59 | "keyfile": "privkey.pem" 60 | } 61 | ``` 62 | 63 | ### Option: `ssl` 64 | 65 | Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on. 66 | Set it to `true` to encrypt communications, `false` otherwise. 67 | Please note that if you set this to `true` you must also generate the key and certificate 68 | files for encryption. For example using [Let's Encrypt](https://www.home-assistant.io/addons/lets_encrypt/) 69 | or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certificates/tls_self_signed_certificate/). 70 | 71 | ### Option: `certfile` 72 | 73 | The certificate file to use for SSL. If this file doesn't exist, the add-on start will fail. 74 | 75 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 76 | 77 | ### Option: `keyfile` 78 | 79 | The private key file to use for SSL. If this file doesn't exist, the add-on start will fail. 80 | 81 | **Note**: The file MUST be stored in `/ssl/`, which is the default for Hass.io 82 | 83 | ### Option: `leave_front_door_open` 84 | 85 | Adding this option to the add-on configuration allows you to disable 86 | authentication by setting it to `true`. 87 | 88 | ### Option: `esphome_version` 89 | 90 | Manually override which ESPHome version to use in the addon. 91 | For example to install the latest development version, use `"esphome_version": "dev"`, 92 | or for version 1.10.0: `"esphome_version": "v1.10.0""`. 93 | 94 | Please note that this does not always work and is only meant for testing, usually the 95 | ESPHome add-on and dashboard version must match to guarantee a working system. 96 | 97 | ### Option: `relative_url` 98 | 99 | Host the ESPHome dashboard under a relative URL, so that it can be integrated 100 | into existing web proxys like nginx under a relative URl. Defaults to `/`. 101 | 102 | ### Option: `status_use_ping` 103 | 104 | By default the dashboard uses mDNS to check if nodes are online. This does 105 | not work across subnets unless your router supports mDNS forwarding or avahi. 106 | 107 | Setting this to `true` will make ESPHome use ICMP ping requests to get the node status. Use this if all nodes always have offline status even when they're connected. 108 | 109 | ### Option: `streamer_mode` 110 | 111 | If set to `true`, this will enable streamer mode, which makes ESPHome hide all 112 | potentially private information. So for example WiFi (B)SSIDs (which could be 113 | used to find your location), usernames etc. Please note that you need to use 114 | the `!secret` tag in your YAML file to also prevent these from showing up 115 | while editing and validating. 116 | 117 | [discord-shield]: https://img.shields.io/discord/429907082951524364.svg 118 | [dht22]: https://esphome.io/components/sensor/dht.html 119 | [discord]: https://discord.gg/KhAMKrd 120 | [releases-shield]: https://img.shields.io/github/release/esphome/esphome.svg 121 | [releases]: https://esphome.io/changelog/index.html 122 | [repository]: https://github.com/esphome/esphome 123 | --------------------------------------------------------------------------------