Compare commits
75 Commits
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: Issue Tracker
|
||||
url: https://github.com/esphome/issues
|
||||
about: Please create bug reports in the dedicated issue tracker.
|
||||
- name: Feature Request Tracker
|
||||
url: https://github.com/esphome/feature-requests
|
||||
about: Please create feature requests in the dedicated feature request tracker.
|
||||
- name: Frequently Asked Question
|
||||
url: https://esphome.io/guides/faq.html
|
||||
about: Please view the FAQ for common questions and what to include in a bug report.
|
||||
73
.github/workflows/bump-version.yml
vendored
Normal file
@@ -0,0 +1,73 @@
|
||||
name: Publish Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
version:
|
||||
description: The version to release
|
||||
required: true
|
||||
|
||||
jobs:
|
||||
create-release:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- run: pip install -r script/requirements.txt
|
||||
- run: script/bump-version.py ${{ github.event.inputs.version }}
|
||||
- name: Commit version bump
|
||||
id: commit_version
|
||||
run: |
|
||||
git config user.name esphomebot
|
||||
git config user.email esphome@nabucasa.com
|
||||
git add .
|
||||
git commit -m "Bump version to v${{ github.event.inputs.version }}"
|
||||
git push
|
||||
COMMIT=$(git rev-parse HEAD)
|
||||
echo "::set-output name=commit_sha::${COMMIT}"
|
||||
- if: ${{ contains(github.event.inputs.version, 'b') }}
|
||||
name: Create Beta Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ github.event.inputs.version }}
|
||||
release_name: ${{ github.event.inputs.version }}
|
||||
body: 'See https://beta.esphome.io/changelog/index.html'
|
||||
prerelease: true
|
||||
commitish: ${{ steps.commit_version.outputs.commit_sha }}
|
||||
- if: ${{ !contains(github.event.inputs.version, 'b') }}
|
||||
name: Create Stable Release
|
||||
uses: actions/create-release@v1
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: v${{ github.event.inputs.version }}
|
||||
release_name: ${{ github.event.inputs.version }}
|
||||
body: 'See https://esphome.io/changelog/index.html'
|
||||
prerelease: false
|
||||
commitish: ${{ steps.commit_version.outputs.commit_sha }}
|
||||
|
||||
deploy-community-addons:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [create-release]
|
||||
steps:
|
||||
- name: Publish beta release to community-addons repository
|
||||
run: |
|
||||
docker run --rm hassioaddons/repository-updater:latest \
|
||||
--repository hassio-addons/repository-beta \
|
||||
--addon esphome \
|
||||
--token "${TOKEN}"
|
||||
env:
|
||||
TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }}
|
||||
- if: ${{ !contains(github.event.inputs.version, 'b') }}
|
||||
name: Publish stable release to community-addons repository
|
||||
run: |
|
||||
docker run --rm hassioaddons/repository-updater:latest \
|
||||
--repository hassio-addons/repository \
|
||||
--addon esphome \
|
||||
--token "${TOKEN}"
|
||||
env:
|
||||
TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }}
|
||||
24
.github/workflows/lint.yml
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
name: Lint
|
||||
on: [push, pull_request]
|
||||
jobs:
|
||||
build:
|
||||
name: Add-on configuration
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
channel: [esphome, esphome-beta, esphome-dev]
|
||||
steps:
|
||||
- name: ⤵️ Check out code from GitHub
|
||||
uses: actions/checkout@v2
|
||||
- name: 🛠 Setup Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: '3.x'
|
||||
- name: 🛠 Install dependencies
|
||||
run: pip install -r script/requirements.txt
|
||||
- name: 🛠 Generate files from template
|
||||
run: python script/generate.py dev beta stable
|
||||
- name: 🚀 Run Home Assistant Add-on Lint on ${{ matrix.channel }}
|
||||
uses: frenck/action-addon-linter@v2
|
||||
with:
|
||||
path: "./${{ matrix.channel }}"
|
||||
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
__pycache__/
|
||||
*.py[cod]
|
||||
*$py.class
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
[](https://esphome.io/)
|
||||
|
||||
This is the Hass.io addon repository for ESPHome. For the ESPHome source please go to [esphome](https://github.com/esphome/esphome)
|
||||
This is the Home Assistant (former Hass.io) addon repository for ESPHome. For the ESPHome source please go to [esphome](https://github.com/esphome/esphome).
|
||||
|
||||
**Documentation:** https://esphome.io/
|
||||
|
||||
|
||||
81
esphome-beta/DOCS.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Home Assistant Community Add-on: ESPHome
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Search for the “ESPHome” add-on in the Supervisor add-on store.
|
||||
2. Press install to download the add-on and unpack it on your machine. This can take some time.
|
||||
3. Optional: If you're using SSL/TLS 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.
|
||||
4. Start the add-on, check the logs of the add-on to see if everything went well.
|
||||
5. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Home Assistant's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables or disables encrypted SSL/TLS (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 Home Assistant
|
||||
|
||||
### 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 Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
Adding this option to the add-on configuration allows you to disable
|
||||
authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the add-on.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames, etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
1
esphome-beta/FILES ARE GENERATED DO NOT EDIT
Normal file
@@ -0,0 +1 @@
|
||||
Any edits should be made to the files in the 'template' directory
|
||||
@@ -1,4 +1,4 @@
|
||||
# ESPHome Hass.io Add-On
|
||||
# ESPHome Home Assistant Add-On
|
||||
|
||||
[](https://esphome.io/)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
## 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
|
||||
directly through Home Assistant **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 ESPHome.
|
||||
|
||||
@@ -17,7 +17,7 @@ handled by ESPHome.
|
||||
<img title="ESPHome dashboard screenshot" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/screenshot.png" width="700px"></img>
|
||||
</p>
|
||||
|
||||
[_View the ESPHome documentation here_](https://esphome.io/)
|
||||
[View the ESPHome documentation](https://esphome.io/)
|
||||
|
||||
## Example
|
||||
|
||||
@@ -32,88 +32,6 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
<img title="ESPHome Home Assistant MQTT discovery" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/temperature-humidity.png" width="600px"></img>
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome 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/esphome/hassio in the "Add new repository by URL" field.
|
||||
2. Now scroll down and select the "ESPHome" 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 ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome docs here: https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### 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: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.10.0: `"esphome_version": "v1.10.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxys like nginx under a relative URl. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
|
||||
[discord-shield]: https://img.shields.io/discord/429907082951524364.svg
|
||||
[dht22]: https://esphome.io/components/sensor/dht.html
|
||||
[discord]: https://discord.gg/KhAMKrd
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"i386",
|
||||
"armv7",
|
||||
"aarch64"
|
||||
],
|
||||
"auth_api": true,
|
||||
"auto_uart": true,
|
||||
"boot": "auto",
|
||||
"description": "Beta version of ESPHome Hass.io add-on.",
|
||||
"hassio_api": true,
|
||||
"hassio_role": "default",
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"image": "esphome/esphome-hassio-{arch}",
|
||||
"ingress": true,
|
||||
@@ -21,13 +16,12 @@
|
||||
"config:rw"
|
||||
],
|
||||
"name": "ESPHome (beta)",
|
||||
"options": {},
|
||||
"panel_icon": "mdi:chip",
|
||||
"ports": {
|
||||
"6052/tcp": null
|
||||
},
|
||||
"ports_description": {
|
||||
"6052/tcp": "Web interface (Not required for Hass.io Ingress)"
|
||||
"6052/tcp": "Web interface (Not required for Home Assistant Ingress)"
|
||||
},
|
||||
"schema": {
|
||||
"certfile": "str?",
|
||||
@@ -40,8 +34,8 @@
|
||||
"streamer_mode": "bool?"
|
||||
},
|
||||
"slug": "esphome-beta",
|
||||
"startup": "application",
|
||||
"stage": "experimental",
|
||||
"uart": true,
|
||||
"url": "https://beta.esphome.io/",
|
||||
"version": "1.14.2",
|
||||
"webui": "http://[HOST]:[PORT:6052]"
|
||||
"version": "1.18.0"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
81
esphome-dev/DOCS.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Home Assistant Community Add-on: ESPHome
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Search for the “ESPHome” add-on in the Supervisor add-on store.
|
||||
2. Press install to download the add-on and unpack it on your machine. This can take some time.
|
||||
3. Optional: If you're using SSL/TLS 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.
|
||||
4. Start the add-on, check the logs of the add-on to see if everything went well.
|
||||
5. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Home Assistant's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables or disables encrypted SSL/TLS (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 Home Assistant
|
||||
|
||||
### 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 Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
Adding this option to the add-on configuration allows you to disable
|
||||
authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the add-on.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames, etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
1
esphome-dev/FILES ARE GENERATED DO NOT EDIT
Normal file
@@ -0,0 +1 @@
|
||||
Any edits should be made to the files in the 'template' directory
|
||||
@@ -1,4 +1,4 @@
|
||||
# ESPHome Hass.io Add-On
|
||||
# ESPHome Home Assistant Add-On
|
||||
|
||||
[](https://esphome.io/)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
## 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
|
||||
directly through Home Assistant **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 ESPHome.
|
||||
|
||||
@@ -17,7 +17,7 @@ handled by ESPHome.
|
||||
<img title="ESPHome dashboard screenshot" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/screenshot.png" width="700px"></img>
|
||||
</p>
|
||||
|
||||
[_View the ESPHome documentation here_](https://esphome.io/)
|
||||
[View the ESPHome documentation](https://esphome.io/)
|
||||
|
||||
## Example
|
||||
|
||||
@@ -32,88 +32,6 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
<img title="ESPHome Home Assistant MQTT discovery" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/temperature-humidity.png" width="600px"></img>
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome 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/esphome/hassio in the "Add new repository by URL" field.
|
||||
2. Now scroll down and select the "ESPHome" 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 ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome docs here: https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### 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: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.10.0: `"esphome_version": "v1.10.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxys like nginx under a relative URl. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
|
||||
[discord-shield]: https://img.shields.io/discord/429907082951524364.svg
|
||||
[dht22]: https://esphome.io/components/sensor/dht.html
|
||||
[discord]: https://discord.gg/KhAMKrd
|
||||
|
||||
@@ -1,10 +1,7 @@
|
||||
{
|
||||
"args": {},
|
||||
"build_from": {
|
||||
"aarch64": "esphome/esphome-hassio-base-aarch64:2.0.1",
|
||||
"amd64": "esphome/esphome-hassio-base-amd64:2.0.1",
|
||||
"armv7": "esphome/esphome-hassio-base-armv7:2.0.1",
|
||||
"i386": "esphome/esphome-hassio-base-i386:2.0.1"
|
||||
},
|
||||
"squash": false
|
||||
"aarch64": "esphome/esphome-hassio-base-aarch64:3.0.0",
|
||||
"amd64": "esphome/esphome-hassio-base-amd64:3.0.0",
|
||||
"armv7": "esphome/esphome-hassio-base-armv7:3.0.0"
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,12 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"i386",
|
||||
"armv7",
|
||||
"aarch64"
|
||||
],
|
||||
"auth_api": true,
|
||||
"auto_uart": true,
|
||||
"boot": "auto",
|
||||
"description": "Development Version! Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files",
|
||||
"hassio_api": true,
|
||||
"hassio_role": "default",
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"ingress": true,
|
||||
"ingress_port": 0,
|
||||
@@ -28,7 +23,7 @@
|
||||
"6052/tcp": null
|
||||
},
|
||||
"ports_description": {
|
||||
"6052/tcp": "Web interface (Not required for Hass.io Ingress)"
|
||||
"6052/tcp": "Web interface (Not required for Home Assistant Ingress)"
|
||||
},
|
||||
"schema": {
|
||||
"certfile": "str?",
|
||||
@@ -41,8 +36,8 @@
|
||||
"streamer_mode": "bool?"
|
||||
},
|
||||
"slug": "esphome-dev",
|
||||
"startup": "application",
|
||||
"stage": "experimental",
|
||||
"uart": true,
|
||||
"url": "https://next.esphome.io/",
|
||||
"version": "dev",
|
||||
"webui": "http://[HOST]:[PORT:6052]"
|
||||
"version": "dev"
|
||||
}
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 20 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
@@ -8,7 +8,15 @@ declare esphome_version
|
||||
|
||||
if bashio::config.has_value 'esphome_version'; then
|
||||
esphome_version=$(bashio::config 'esphome_version')
|
||||
full_url="https://github.com/esphome/esphome/archive/${esphome_version}.zip"
|
||||
if [[ $esphome_version == *":"* ]]; then
|
||||
IFS=':' read -r -a array <<< "$esphome_version"
|
||||
username=${array[0]}
|
||||
ref=${array[1]}
|
||||
else
|
||||
username="esphome"
|
||||
ref=$esphome_version
|
||||
fi
|
||||
full_url="https://github.com/${username}/esphome/archive/${ref}.zip"
|
||||
bashio::log.info "Installing esphome version '${esphome_version}' (${full_url})..."
|
||||
pip3 install -U --no-cache-dir "${full_url}" \
|
||||
|| bashio::exit.nok "Failed installing esphome pinned version."
|
||||
|
||||
81
esphome/DOCS.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Home Assistant Community Add-on: ESPHome
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Search for the “ESPHome” add-on in the Supervisor add-on store.
|
||||
2. Press install to download the add-on and unpack it on your machine. This can take some time.
|
||||
3. Optional: If you're using SSL/TLS 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.
|
||||
4. Start the add-on, check the logs of the add-on to see if everything went well.
|
||||
5. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Home Assistant's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables or disables encrypted SSL/TLS (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 Home Assistant
|
||||
|
||||
### 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 Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
Adding this option to the add-on configuration allows you to disable
|
||||
authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the add-on.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames, etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
1
esphome/FILES ARE GENERATED DO NOT EDIT
Normal file
@@ -0,0 +1 @@
|
||||
Any edits should be made to the files in the 'template' directory
|
||||
@@ -1,4 +1,4 @@
|
||||
# ESPHome Hass.io Add-On
|
||||
# ESPHome Home Assistant Add-On
|
||||
|
||||
[](https://esphome.io/)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
## 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
|
||||
directly through Home Assistant **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 ESPHome.
|
||||
|
||||
@@ -17,7 +17,7 @@ handled by ESPHome.
|
||||
<img title="ESPHome dashboard screenshot" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/screenshot.png" width="700px"></img>
|
||||
</p>
|
||||
|
||||
[_View the ESPHome documentation here_](https://esphome.io/)
|
||||
[View the ESPHome documentation](https://esphome.io/)
|
||||
|
||||
## Example
|
||||
|
||||
@@ -32,88 +32,6 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
<img title="ESPHome Home Assistant MQTT discovery" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/temperature-humidity.png" width="600px"></img>
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome 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/esphome/hassio in the "Add new repository by URL" field.
|
||||
2. Now scroll down and select the "ESPHome" 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 ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome docs here: https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### 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: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.10.0: `"esphome_version": "v1.10.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxys like nginx under a relative URl. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
|
||||
[discord-shield]: https://img.shields.io/discord/429907082951524364.svg
|
||||
[dht22]: https://esphome.io/components/sensor/dht.html
|
||||
[discord]: https://discord.gg/KhAMKrd
|
||||
|
||||
@@ -1,17 +1,12 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"i386",
|
||||
"armv7",
|
||||
"aarch64"
|
||||
],
|
||||
"auth_api": true,
|
||||
"auto_uart": true,
|
||||
"boot": "auto",
|
||||
"description": "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices.",
|
||||
"hassio_api": true,
|
||||
"hassio_role": "default",
|
||||
"homeassistant_api": false,
|
||||
"host_network": true,
|
||||
"image": "esphome/esphome-hassio-{arch}",
|
||||
"ingress": true,
|
||||
@@ -21,13 +16,12 @@
|
||||
"config:rw"
|
||||
],
|
||||
"name": "ESPHome",
|
||||
"options": {},
|
||||
"panel_icon": "mdi:chip",
|
||||
"ports": {
|
||||
"6052/tcp": null
|
||||
},
|
||||
"ports_description": {
|
||||
"6052/tcp": "Web interface (Not required for Hass.io Ingress)"
|
||||
"6052/tcp": "Web interface (Not required for Home Assistant Ingress)"
|
||||
},
|
||||
"schema": {
|
||||
"certfile": "str?",
|
||||
@@ -40,8 +34,7 @@
|
||||
"streamer_mode": "bool?"
|
||||
},
|
||||
"slug": "esphome",
|
||||
"startup": "application",
|
||||
"uart": true,
|
||||
"url": "https://esphome.io/",
|
||||
"version": "1.14.2",
|
||||
"webui": "http://[HOST]:[PORT:6052]"
|
||||
"version": "1.18.0"
|
||||
}
|
||||
BIN
esphome/icon.png
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.9 KiB |
BIN
esphome/logo.png
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "ESPHome Hass.io Add-Ons",
|
||||
"name": "ESPHome Home Assistant Add-Ons",
|
||||
"url": "https://github.com/esphome/hassio",
|
||||
"maintainer": "ESPHome <contact@esphome.io>"
|
||||
"maintainer": "ESPHome <esphome@nabucasa.com>"
|
||||
}
|
||||
|
||||
24
script/NOTES.md
Normal file
@@ -0,0 +1,24 @@
|
||||
# Maintainer notes
|
||||
|
||||
This repository is pulled by all Hassio installs and contains
|
||||
the Hassio config for each type of install: latest, beta and dev.
|
||||
|
||||
- `latest` always points to the most recent full release.
|
||||
- `beta` points to the most recent full release or beta release (whichever is newer). This is so that beta image users automatically get upgraded to the stable install once it gets released.
|
||||
- `dev` is an image that Hassio builds itself and contains the latest ESPHome version straigt from dev branch.
|
||||
|
||||
The config.json files are all automatically written with the script in this directory and the `template/addon_config.yaml` file.
|
||||
|
||||
To update one of the images: use
|
||||
|
||||
```bash
|
||||
$ pip3 install -r script/requirements.txt
|
||||
$ python3 script/generate.py [dev|beta|latest]
|
||||
```
|
||||
|
||||
The `esphome-dev/rootfs` folder is shared with the `docker/rootfs` folder in the esphome repo.
|
||||
This could be solved better, but currently `rsync` is used to copy the files over:
|
||||
|
||||
```bash
|
||||
rsync -av ../esphome/docker/rootfs esphome-dev/
|
||||
```
|
||||
90
script/bump-version.py
Executable file
@@ -0,0 +1,90 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import re
|
||||
import subprocess
|
||||
from dataclasses import dataclass
|
||||
import sys
|
||||
import os
|
||||
|
||||
sys.path.append(os.path.dirname(__file__))
|
||||
import generate
|
||||
|
||||
|
||||
@dataclass
|
||||
class Version:
|
||||
major: int
|
||||
minor: int
|
||||
patch: int
|
||||
beta: int = 0
|
||||
dev: bool = False
|
||||
|
||||
def __str__(self):
|
||||
return f'{self.major}.{self.minor}.{self.full_patch}'
|
||||
|
||||
@property
|
||||
def full_patch(self):
|
||||
res = f'{self.patch}'
|
||||
if self.beta > 0:
|
||||
res += f'b{self.beta}'
|
||||
if self.dev:
|
||||
res += '-dev'
|
||||
return res
|
||||
|
||||
@classmethod
|
||||
def parse(cls, value):
|
||||
match = re.match(r'(\d+).(\d+).(\d+)(b\d+)?(-dev)?', value)
|
||||
assert match is not None
|
||||
major = int(match[1])
|
||||
minor = int(match[2])
|
||||
patch = int(match[3])
|
||||
beta = int(match[4][1:]) if match[4] else 0
|
||||
dev = bool(match[5])
|
||||
return Version(
|
||||
major=major, minor=minor, patch=patch,
|
||||
beta=beta, dev=dev
|
||||
)
|
||||
|
||||
|
||||
def sub(path, pattern, repl, expected_count=1):
|
||||
with open(path) as fh:
|
||||
content = fh.read()
|
||||
content, count = re.subn(pattern, repl, content, flags=re.MULTILINE)
|
||||
if expected_count is not None:
|
||||
assert count == expected_count, f"Pattern {pattern} replacement failed!"
|
||||
with open(path, "wt") as fh:
|
||||
fh.write(content)
|
||||
|
||||
|
||||
def write_version(target: str, version: Version):
|
||||
# version: '1.14.5' # BETA
|
||||
# version: '1.14.5' # STABLE
|
||||
sub(
|
||||
'template/addon_config.yaml',
|
||||
r" version: '[^']+' # {}".format(target.upper()),
|
||||
f" version: '{version}' # {target.upper()}"
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('new_version', type=str)
|
||||
args = parser.parse_args()
|
||||
|
||||
version = Version.parse(args.new_version)
|
||||
assert not version.dev
|
||||
|
||||
print(f"Bumping to {version}")
|
||||
if version.beta:
|
||||
write_version('beta', version)
|
||||
generate.main(['beta'])
|
||||
else:
|
||||
assert not version.beta
|
||||
write_version('stable', version)
|
||||
write_version('beta', version)
|
||||
generate.main(['stable', 'beta'])
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
sys.exit(main() or 0)
|
||||
@@ -6,43 +6,52 @@ from pathlib import Path
|
||||
from enum import Enum
|
||||
import json
|
||||
from shutil import copyfile
|
||||
import sys
|
||||
|
||||
class Channel(Enum):
|
||||
stable = 'stable'
|
||||
beta = 'beta'
|
||||
dev = 'dev'
|
||||
|
||||
parser = argparse.ArgumentParser(description='Generate ESPHome Hass.io config.json')
|
||||
parser.add_argument('channels', nargs='+', type=Channel, choices=list(Channel))
|
||||
args = parser.parse_args()
|
||||
|
||||
root = Path(__file__).parent.parent
|
||||
templ = root / 'template'
|
||||
def main(args):
|
||||
parser = argparse.ArgumentParser(description='Generate ESPHome Home Assistant config.json')
|
||||
parser.add_argument('channels', nargs='+', type=Channel, choices=list(Channel))
|
||||
args = parser.parse_args(args)
|
||||
|
||||
with open(templ / "config.yaml", 'r') as f:
|
||||
config = yaml.safe_load(f)
|
||||
root = Path(__file__).parent.parent
|
||||
templ = root / 'template'
|
||||
|
||||
copyf = config['copy_files']
|
||||
with open(templ / "addon_config.yaml", 'r') as f:
|
||||
config = yaml.safe_load(f)
|
||||
|
||||
for channel in args.channels:
|
||||
conf = config[f'esphome-{channel.value}']
|
||||
base_image = conf.pop('base_image')
|
||||
dir_ = root / conf.pop('directory')
|
||||
path = dir_ / 'config.json'
|
||||
with open(path, 'w') as f:
|
||||
json.dump(conf, f, indent=2, sort_keys=True)
|
||||
copyf = config['copy_files']
|
||||
|
||||
for file_, conf_ in copyf.items():
|
||||
copyfile(templ / file_, dir_ / file_)
|
||||
|
||||
if channel == Channel.dev:
|
||||
path = dir_ / 'build.json'
|
||||
build_conf = {
|
||||
'squash': False,
|
||||
"build_from": {arch: base_image.format(arch=arch) for arch in conf['arch']},
|
||||
"args": {}
|
||||
}
|
||||
for channel in args.channels:
|
||||
conf = config[f'esphome-{channel.value}']
|
||||
base_image = conf.pop('base_image')
|
||||
dir_ = root / conf.pop('directory')
|
||||
path = dir_ / 'config.json'
|
||||
with open(path, 'w') as f:
|
||||
json.dump(build_conf, f, indent=2, sort_keys=True)
|
||||
json.dump(conf, f, indent=2, sort_keys=True)
|
||||
|
||||
print(f"Wrote {path}")
|
||||
for file_, conf_ in copyf.items():
|
||||
copyfile(templ / file_, dir_ / file_)
|
||||
|
||||
path = dir_ / 'FILES ARE GENERATED DO NOT EDIT'
|
||||
with open(path, 'w') as f:
|
||||
f.write("Any edits should be made to the files in the 'template' directory")
|
||||
|
||||
if channel == Channel.dev:
|
||||
path = dir_ / 'build.json'
|
||||
build_conf = {
|
||||
"build_from": {arch: base_image.format(arch=arch) for arch in conf['arch']}
|
||||
}
|
||||
with open(path, 'w') as f:
|
||||
json.dump(build_conf, f, indent=2, sort_keys=True)
|
||||
|
||||
print(f"Wrote {path}")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main(sys.argv[1:])
|
||||
|
||||
1
script/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
PyYAML==5.4
|
||||
81
template/DOCS.md
Normal file
@@ -0,0 +1,81 @@
|
||||
# Home Assistant Community Add-on: ESPHome
|
||||
|
||||
## Installation
|
||||
|
||||
The installation of this add-on is pretty straightforward and not different in comparison to installing any other Home Assistant add-on.
|
||||
|
||||
1. Search for the “ESPHome” add-on in the Supervisor add-on store.
|
||||
2. Press install to download the add-on and unpack it on your machine. This can take some time.
|
||||
3. Optional: If you're using SSL/TLS 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.
|
||||
4. Start the add-on, check the logs of the add-on to see if everything went well.
|
||||
5. Click "OPEN WEB UI" to open the ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Home Assistant's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables or disables encrypted SSL/TLS (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 Home Assistant
|
||||
|
||||
### 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 Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
Adding this option to the add-on configuration allows you to disable
|
||||
authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the add-on.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames, etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
@@ -1,4 +1,4 @@
|
||||
# ESPHome Hass.io Add-On
|
||||
# ESPHome Home Assistant Add-On
|
||||
|
||||
[](https://esphome.io/)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
## 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
|
||||
directly through Home Assistant **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 ESPHome.
|
||||
|
||||
@@ -17,7 +17,7 @@ handled by ESPHome.
|
||||
<img title="ESPHome dashboard screenshot" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/screenshot.png" width="700px"></img>
|
||||
</p>
|
||||
|
||||
[_View the ESPHome documentation here_](https://esphome.io/)
|
||||
[View the ESPHome documentation](https://esphome.io/)
|
||||
|
||||
## Example
|
||||
|
||||
@@ -32,88 +32,6 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
<img title="ESPHome Home Assistant MQTT discovery" src="https://raw.githubusercontent.com/esphome/hassio/master/esphome-dev/images/temperature-humidity.png" width="600px"></img>
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome 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/esphome/hassio in the "Add new repository by URL" field.
|
||||
2. Now scroll down and select the "ESPHome" 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 ESPHome dashboard. You will be asked for your Home Assistant credentials - ESPHome uses Hass.io's authentication system to log you in.
|
||||
|
||||
You can view the ESPHome docs here: https://esphome.io/
|
||||
|
||||
## 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"
|
||||
}
|
||||
```
|
||||
|
||||
### 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: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
For example to install the latest development version, use `"esphome_version": "dev"`,
|
||||
or for version 1.10.0: `"esphome_version": "v1.10.0""`.
|
||||
|
||||
Please note that this does not always work and is only meant for testing, usually the
|
||||
ESPHome add-on and dashboard version must match to guarantee a working system.
|
||||
|
||||
### Option: `relative_url`
|
||||
|
||||
Host the ESPHome dashboard under a relative URL, so that it can be integrated
|
||||
into existing web proxys like nginx under a relative URl. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
By default the dashboard uses mDNS to check if nodes are online. This does
|
||||
not work across subnets unless your router supports mDNS forwarding or avahi.
|
||||
|
||||
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.
|
||||
|
||||
### Option: `streamer_mode`
|
||||
|
||||
If set to `true`, this will enable streamer mode, which makes ESPHome hide all
|
||||
potentially private information. So for example WiFi (B)SSIDs (which could be
|
||||
used to find your location), usernames etc. Please note that you need to use
|
||||
the `!secret` tag in your YAML file to also prevent these from showing up
|
||||
while editing and validating.
|
||||
|
||||
[discord-shield]: https://img.shields.io/discord/429907082951524364.svg
|
||||
[dht22]: https://esphome.io/components/sensor/dht.html
|
||||
[discord]: https://discord.gg/KhAMKrd
|
||||
|
||||
@@ -1,20 +1,13 @@
|
||||
---
|
||||
base: &base
|
||||
url: https://esphome.io/
|
||||
webui: 'http://[HOST]:[PORT:6052]'
|
||||
startup: application
|
||||
boot: auto
|
||||
arch:
|
||||
- amd64
|
||||
- i386
|
||||
- armv7
|
||||
- aarch64
|
||||
# Uses Hass.io API (auth)
|
||||
hassio_api: true
|
||||
auth_api: true
|
||||
hassio_role: default
|
||||
# Doesn't use HA API
|
||||
homeassistant_api: false
|
||||
# Host network mode for mDNS
|
||||
host_network: true
|
||||
# Ingress settings
|
||||
@@ -22,11 +15,11 @@ base: &base
|
||||
ingress_port: 0
|
||||
panel_icon: 'mdi:chip'
|
||||
# Automatically add UART devices to addon
|
||||
auto_uart: true
|
||||
uart: true
|
||||
ports:
|
||||
'6052/tcp': null
|
||||
ports_description:
|
||||
'6052/tcp': "Web interface (Not required for Hass.io Ingress)"
|
||||
'6052/tcp': "Web interface (Not required for Home Assistant Ingress)"
|
||||
map:
|
||||
- ssl:ro
|
||||
- config:rw
|
||||
@@ -39,7 +32,7 @@ base: &base
|
||||
streamer_mode: bool?
|
||||
relative_url: str?
|
||||
status_use_ping: bool?
|
||||
base_image: esphome/esphome-hassio-base-{arch}:2.0.1
|
||||
base_image: esphome/esphome-hassio-base-{arch}:3.0.0
|
||||
|
||||
esphome-dev:
|
||||
<<: *base
|
||||
@@ -49,6 +42,7 @@ esphome-dev:
|
||||
slug: esphome-dev
|
||||
description: "Development Version! Manage and program ESP8266/ESP32 microcontrollers through YAML configuration files"
|
||||
url: https://next.esphome.io/
|
||||
stage: experimental
|
||||
options:
|
||||
esphome_version: dev
|
||||
|
||||
@@ -56,24 +50,24 @@ esphome-beta:
|
||||
<<: *base
|
||||
directory: esphome-beta
|
||||
name: ESPHome (beta)
|
||||
version: '1.14.2' # BETA
|
||||
version: '1.18.0' # BETA
|
||||
slug: esphome-beta
|
||||
description: "Beta version of ESPHome Hass.io add-on."
|
||||
url: https://beta.esphome.io/
|
||||
image: esphome/esphome-hassio-{arch}
|
||||
options: {}
|
||||
stage: experimental
|
||||
|
||||
esphome-stable:
|
||||
<<: *base
|
||||
directory: esphome
|
||||
name: ESPHome
|
||||
version: '1.14.2' # STABLE
|
||||
version: '1.18.0' # STABLE
|
||||
slug: esphome
|
||||
description: "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices."
|
||||
image: esphome/esphome-hassio-{arch}
|
||||
options: {}
|
||||
|
||||
copy_files:
|
||||
icon.png:
|
||||
logo.png:
|
||||
README.md:
|
||||
DOCS.md:
|
||||
|
Before Width: | Height: | Size: 2.4 KiB After Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 11 KiB |