Compare commits
31 Commits
75
.github/workflows/bump-version.yml
vendored
Normal file
75
.github/workflows/bump-version.yml
vendored
Normal file
@@ -0,0 +1,75 @@
|
||||
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 contact@esphome.io
|
||||
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:
|
||||
- if: ${{ contains(github.event.inputs.version, 'b') }}
|
||||
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 }}
|
||||
3
.gitignore
vendored
Normal file
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/
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,17 +34,17 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome add-on repository
|
||||
To install this Home Assistant 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.
|
||||
1. Add the ESPHome add-ons repository to your Home Assistant instance. You can do this by navigating to the "Add-on store" tab in the Supervisor panel and then entering https://github.com/esphome/hassio in the "Add repository" field after selecting "Repositories" from the top-right menu.
|
||||
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.
|
||||
4. 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.
|
||||
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.
|
||||
6. 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 docs here: https://esphome.io/
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -62,7 +62,7 @@ Example add-on configuration:
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on.
|
||||
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/)
|
||||
@@ -72,13 +72,13 @@ or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certi
|
||||
|
||||
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
|
||||
**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 Hass.io
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
@@ -87,9 +87,13 @@ authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
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.10.0: `"esphome_version": "v1.10.0""`.
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
|
||||
|
||||
This can also be used to specify a branch of a fork of the esphome repository.
|
||||
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
|
||||
This usage assumes the forked repository is named `esphome`.
|
||||
|
||||
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.
|
||||
@@ -97,7 +101,7 @@ 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 `/`.
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
@@ -110,7 +114,7 @@ Setting this to `true` will make ESPHome use ICMP ping requests to get the node
|
||||
|
||||
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
|
||||
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,7 +1,6 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"i386",
|
||||
"armv7",
|
||||
"aarch64"
|
||||
],
|
||||
@@ -27,7 +26,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?",
|
||||
@@ -40,8 +39,9 @@
|
||||
"streamer_mode": "bool?"
|
||||
},
|
||||
"slug": "esphome-beta",
|
||||
"stage": "experimental",
|
||||
"startup": "application",
|
||||
"url": "https://beta.esphome.io/",
|
||||
"version": "1.14.2",
|
||||
"version": "1.15.2",
|
||||
"webui": "http://[HOST]:[PORT:6052]"
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -34,17 +34,17 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome add-on repository
|
||||
To install this Home Assistant 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.
|
||||
1. Add the ESPHome add-ons repository to your Home Assistant instance. You can do this by navigating to the "Add-on store" tab in the Supervisor panel and then entering https://github.com/esphome/hassio in the "Add repository" field after selecting "Repositories" from the top-right menu.
|
||||
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.
|
||||
4. 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.
|
||||
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.
|
||||
6. 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 docs here: https://esphome.io/
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -62,7 +62,7 @@ Example add-on configuration:
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on.
|
||||
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/)
|
||||
@@ -72,13 +72,13 @@ or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certi
|
||||
|
||||
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
|
||||
**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 Hass.io
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
@@ -87,9 +87,13 @@ authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
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.10.0: `"esphome_version": "v1.10.0""`.
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
|
||||
|
||||
This can also be used to specify a branch of a fork of the esphome repository.
|
||||
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
|
||||
This usage assumes the forked repository is named `esphome`.
|
||||
|
||||
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.
|
||||
@@ -97,7 +101,7 @@ 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 `/`.
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
@@ -110,7 +114,7 @@ Setting this to `true` will make ESPHome use ICMP ping requests to get the node
|
||||
|
||||
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
|
||||
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,10 +1,9 @@
|
||||
{
|
||||
"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"
|
||||
"aarch64": "esphome/esphome-hassio-base-aarch64:2.5.0",
|
||||
"amd64": "esphome/esphome-hassio-base-amd64:2.5.0",
|
||||
"armv7": "esphome/esphome-hassio-base-armv7:2.5.0"
|
||||
},
|
||||
"squash": false
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"i386",
|
||||
"armv7",
|
||||
"aarch64"
|
||||
],
|
||||
@@ -28,7 +27,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,6 +40,7 @@
|
||||
"streamer_mode": "bool?"
|
||||
},
|
||||
"slug": "esphome-dev",
|
||||
"stage": "experimental",
|
||||
"startup": "application",
|
||||
"url": "https://next.esphome.io/",
|
||||
"version": "dev",
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 50 KiB After Width: | Height: | Size: 20 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."
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -34,17 +34,17 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome add-on repository
|
||||
To install this Home Assistant 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.
|
||||
1. Add the ESPHome add-ons repository to your Home Assistant instance. You can do this by navigating to the "Add-on store" tab in the Supervisor panel and then entering https://github.com/esphome/hassio in the "Add repository" field after selecting "Repositories" from the top-right menu.
|
||||
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.
|
||||
4. 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.
|
||||
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.
|
||||
6. 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 docs here: https://esphome.io/
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -62,7 +62,7 @@ Example add-on configuration:
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on.
|
||||
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/)
|
||||
@@ -72,13 +72,13 @@ or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certi
|
||||
|
||||
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
|
||||
**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 Hass.io
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
@@ -87,9 +87,13 @@ authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
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.10.0: `"esphome_version": "v1.10.0""`.
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
|
||||
|
||||
This can also be used to specify a branch of a fork of the esphome repository.
|
||||
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
|
||||
This usage assumes the forked repository is named `esphome`.
|
||||
|
||||
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.
|
||||
@@ -97,7 +101,7 @@ 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 `/`.
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
@@ -110,7 +114,7 @@ Setting this to `true` will make ESPHome use ICMP ping requests to get the node
|
||||
|
||||
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
|
||||
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,7 +1,6 @@
|
||||
{
|
||||
"arch": [
|
||||
"amd64",
|
||||
"i386",
|
||||
"armv7",
|
||||
"aarch64"
|
||||
],
|
||||
@@ -27,7 +26,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?",
|
||||
@@ -40,8 +39,9 @@
|
||||
"streamer_mode": "bool?"
|
||||
},
|
||||
"slug": "esphome",
|
||||
"stage": "stable",
|
||||
"startup": "application",
|
||||
"url": "https://esphome.io/",
|
||||
"version": "1.14.2",
|
||||
"version": "1.15.2",
|
||||
"webui": "http://[HOST]:[PORT:6052]"
|
||||
}
|
||||
@@ -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>"
|
||||
}
|
||||
|
||||
24
script/NOTES.md
Normal file
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/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
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/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,50 @@ 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 / "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_)
|
||||
|
||||
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": {}
|
||||
}
|
||||
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
1
script/requirements.txt
Normal file
@@ -0,0 +1 @@
|
||||
PyYAML==5.3.1
|
||||
@@ -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
|
||||
|
||||
@@ -34,17 +34,17 @@ Then just click UPLOAD and the sensor will magically appear in Home Assistant:
|
||||
|
||||
## Installation
|
||||
|
||||
To install this Hass.io add-on you need to add the ESPHome add-on repository
|
||||
To install this Home Assistant 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.
|
||||
1. Add the ESPHome add-ons repository to your Home Assistant instance. You can do this by navigating to the "Add-on store" tab in the Supervisor panel and then entering https://github.com/esphome/hassio in the "Add repository" field after selecting "Repositories" from the top-right menu.
|
||||
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.
|
||||
4. 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.
|
||||
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.
|
||||
6. 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 docs here: https://esphome.io/
|
||||
You can view the ESPHome documentation at https://esphome.io/
|
||||
|
||||
## Configuration
|
||||
|
||||
@@ -62,7 +62,7 @@ Example add-on configuration:
|
||||
|
||||
### Option: `ssl`
|
||||
|
||||
Enables/Disables encrypted SSL (HTTPS) connections to the web server of this add-on.
|
||||
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/)
|
||||
@@ -72,13 +72,13 @@ or [Self-signed certificates](https://www.home-assistant.io/docs/ecosystem/certi
|
||||
|
||||
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
|
||||
**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 Hass.io
|
||||
**Note**: The file MUST be stored in `/ssl/`, which is the default for Home Assistant
|
||||
|
||||
### Option: `leave_front_door_open`
|
||||
|
||||
@@ -87,9 +87,13 @@ authentication by setting it to `true`.
|
||||
|
||||
### Option: `esphome_version`
|
||||
|
||||
Manually override which ESPHome version to use in the addon.
|
||||
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.10.0: `"esphome_version": "v1.10.0""`.
|
||||
or for version 1.14.0: `"esphome_version": "v1.14.0"`.
|
||||
|
||||
This can also be used to specify a branch of a fork of the esphome repository.
|
||||
For example to install the test_new_component branch of a fork made by user123, use `"user123:test_new_component"`.
|
||||
This usage assumes the forked repository is named `esphome`.
|
||||
|
||||
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.
|
||||
@@ -97,7 +101,7 @@ 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 `/`.
|
||||
into existing web proxies like NGINX under a relative URL. Defaults to `/`.
|
||||
|
||||
### Option: `status_use_ping`
|
||||
|
||||
@@ -110,7 +114,7 @@ Setting this to `true` will make ESPHome use ICMP ping requests to get the node
|
||||
|
||||
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
|
||||
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.
|
||||
|
||||
|
||||
@@ -6,7 +6,6 @@ base: &base
|
||||
boot: auto
|
||||
arch:
|
||||
- amd64
|
||||
- i386
|
||||
- armv7
|
||||
- aarch64
|
||||
# Uses Hass.io API (auth)
|
||||
@@ -26,7 +25,7 @@ base: &base
|
||||
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 +38,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}:2.5.0
|
||||
|
||||
esphome-dev:
|
||||
<<: *base
|
||||
@@ -49,6 +48,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,21 +56,23 @@ esphome-beta:
|
||||
<<: *base
|
||||
directory: esphome-beta
|
||||
name: ESPHome (beta)
|
||||
version: '1.14.2' # BETA
|
||||
version: '1.15.2' # BETA
|
||||
slug: esphome-beta
|
||||
description: "Beta version of ESPHome Hass.io add-on."
|
||||
url: https://beta.esphome.io/
|
||||
image: esphome/esphome-hassio-{arch}
|
||||
stage: experimental
|
||||
options: {}
|
||||
|
||||
esphome-stable:
|
||||
<<: *base
|
||||
directory: esphome
|
||||
name: ESPHome
|
||||
version: '1.14.2' # STABLE
|
||||
version: '1.15.2' # STABLE
|
||||
slug: esphome
|
||||
description: "ESPHome Hass.io add-on for intelligently managing all your ESP8266/ESP32 devices."
|
||||
image: esphome/esphome-hassio-{arch}
|
||||
stage: stable
|
||||
options: {}
|
||||
|
||||
copy_files:
|
||||
|
||||
Reference in New Issue
Block a user