generated from esphome/esphome-project-template
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit a8ce1e3
Showing
12 changed files
with
361 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
|
||
jobs: | ||
ci: | ||
name: Building ${{ matrix.file }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
file: | ||
- project-template-esp32-release.yaml | ||
- project-template-esp32-c3-release.yaml | ||
- project-template-esp32-s3-release.yaml | ||
steps: | ||
- name: Checkout source code | ||
uses: actions/checkout@v4.1.7 | ||
- name: Build ESPHome firmware to verify configuration | ||
uses: esphome/build-action@v3.2.0 | ||
with: | ||
yaml_file: ${{ matrix.file }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: Build and Publish ESPHome firmware and website | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
uses: esphome/workflows/.github/workflows/publish.yml@main | ||
with: | ||
# CHANGEME: Set the filenames of your config files here: | ||
files: project-template-esp32-release.yaml,project-template-esp32-c3-release.yaml,project-template-esp32-s3-release.yaml | ||
# CHANGEME: Set the name of your project here: | ||
name: Template Project |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Gitignore settings for ESPHome | ||
# This is an example and may include too much for your use-case. | ||
# You can modify this file to suit your needs. | ||
/.esphome/ | ||
/secrets.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# ESPHome Project Template | ||
|
||
This repo serves as a template for creating a new ESPHome project. | ||
|
||
It includes a GitHub workflow that will automatically build the configuration(s) and then deploys a simple | ||
website via GitHub pages that utilises [ESP Web Tools](https://esphome.github.io/esp-web-tools/) for users to | ||
easily install your project onto their device. | ||
|
||
## Instructions | ||
|
||
1. Use this repo template to [generate](https://github.com/esphome/esphome-project-template/generate) your own repository. | ||
- Make sure to check `Include all branches` so that GitHub Pages is automatically enabled. | ||
2. Clone your new repository. | ||
3. Add your project specific YAML configuration(s) along with the contents of the `project-template-....yaml` files, taking note of the comments in this template file and name accordingly. | ||
4. | ||
a. Update [.github/workflows/publish.yml](.github/workflows/publish.yml) to contain your own YAML config filename(s). | ||
b. Update [.github/workflows/ci.yml](.github/workflows/ci.yml) to contain your own YAML config filename(s). | ||
5. Update [static/_config.yml](static/_config.yml) to change the title, description and basic theme of the generated website. | ||
6. Add more content to the [static/index.md](static/index.md) file to explain your project. | ||
Make sure to leave the installation code tags in place so users get the install button. | ||
7. Add permission to github-actions[bot] | ||
a. go to your project Settings, under the Actions collapsible, click on General. | ||
b. scroll down until you find Workflow permissions and mark the option Read and write permissions. | ||
c. Hit the save button | ||
8. Push your changes to the repository and GitHub Actions will automatically build and deploy your project. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
esphome: | ||
name: project-template | ||
friendly_name: Project Template | ||
# Automatically add the mac address to the name | ||
# so you can use a single firmware for all devices | ||
name_add_mac_suffix: true | ||
|
||
# This will allow for project identification, | ||
# configuration and updates. | ||
project: | ||
name: esphome.project-template | ||
version: "1.0" | ||
|
||
esp32: | ||
board: esp32dev | ||
framework: | ||
type: esp-idf | ||
|
||
# To be able to get logs from the device via serial and api. | ||
logger: | ||
|
||
# API is a requirement of the dashboard import. | ||
api: | ||
|
||
# OTA is required for Over-the-Air updating | ||
ota: | ||
- platform: esphome | ||
|
||
wifi: | ||
# Set up a wifi access point using the device name above | ||
ap: | ||
|
||
# In combination with the `ap` this allows the user | ||
# to provision wifi credentials to the device. | ||
captive_portal: | ||
|
||
########################################################## | ||
# Most projects should not remove anything from above here | ||
# and should just modify the name, project name/version | ||
# and git url for the dashboard_import | ||
########################################################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
esphome: | ||
name: project-template | ||
friendly_name: Project Template | ||
# Automatically add the mac address to the name | ||
# so you can use a single firmware for all devices | ||
name_add_mac_suffix: true | ||
|
||
# This will allow for project identification, | ||
# configuration and updates. | ||
project: | ||
name: esphome.project-template | ||
version: "1.0" | ||
|
||
esp32: | ||
board: esp32-c3-devkitm-1 | ||
framework: | ||
type: esp-idf | ||
|
||
# To be able to get logs from the device via serial and api. | ||
logger: | ||
|
||
# API is a requirement of the dashboard import. | ||
api: | ||
|
||
# OTA is required for Over-the-Air updating | ||
ota: | ||
- platform: esphome | ||
|
||
wifi: | ||
# Set up a wifi access point using the device name above | ||
ap: | ||
|
||
# In combination with the `ap` this allows the user | ||
# to provision wifi credentials to the device. | ||
captive_portal: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
esphome: | ||
name: project-template | ||
friendly_name: Project Template | ||
# Automatically add the mac address to the name | ||
# so you can use a single firmware for all devices | ||
name_add_mac_suffix: true | ||
|
||
# This will allow for project identification, | ||
# configuration and updates. | ||
project: | ||
name: esphome.project-template | ||
version: "1.0" | ||
|
||
esp32: | ||
board: esp32-c3-devkitm-1 | ||
framework: | ||
type: esp-idf | ||
|
||
# To be able to get logs from the device via serial and api. | ||
logger: | ||
|
||
# API is a requirement of the dashboard import. | ||
api: | ||
|
||
# OTA is required for Over-the-Air updating | ||
ota: | ||
- platform: esphome | ||
|
||
# This should point to the public location of this yaml file. | ||
dashboard_import: | ||
package_import_url: github://esphome/esphome-project-template/project-template-esp32-c3-adopt.yaml@main | ||
|
||
wifi: | ||
# Set up a wifi access point using the device name above | ||
ap: | ||
|
||
# In combination with the `ap` this allows the user | ||
# to provision wifi credentials to the device. | ||
captive_portal: | ||
|
||
########################################################## | ||
# Most projects should not remove anything from above here | ||
# and should just modify the name, project name/version | ||
# and git url for the dashboard_import | ||
########################################################## | ||
|
||
|
||
# Sets up Bluetooth LE (Only on ESP32) to allow the user | ||
# to provision wifi credentials to the device. | ||
esp32_improv: | ||
authorizer: none | ||
|
||
# Sets up the improv via serial client for Wi-Fi provisioning. | ||
# Handy if your device has a usb port for the user to add credentials when they first get it. | ||
improv_serial: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
esphome: | ||
name: project-template | ||
friendly_name: Project Template | ||
# Automatically add the mac address to the name | ||
# so you can use a single firmware for all devices | ||
name_add_mac_suffix: true | ||
|
||
# This will allow for project identification, | ||
# configuration and updates. | ||
project: | ||
name: esphome.project-template | ||
version: "1.0" | ||
|
||
esp32: | ||
board: esp32dev | ||
framework: | ||
type: esp-idf | ||
|
||
# To be able to get logs from the device via serial and api. | ||
logger: | ||
|
||
# API is a requirement of the dashboard import. | ||
api: | ||
|
||
# OTA is required for Over-the-Air updating | ||
ota: | ||
- platform: esphome | ||
|
||
# This should point to the public location of this yaml file. | ||
dashboard_import: | ||
package_import_url: github://esphome/esphome-project-template/project-template-esp32-adopt.yaml@main | ||
|
||
wifi: | ||
# Set up a wifi access point using the device name above | ||
ap: | ||
|
||
# In combination with the `ap` this allows the user | ||
# to provision wifi credentials to the device. | ||
captive_portal: | ||
|
||
########################################################## | ||
# Most projects should not remove anything from above here | ||
# and should just modify the name, project name/version | ||
# and git url for the dashboard_import | ||
########################################################## | ||
|
||
|
||
# Sets up Bluetooth LE (Only on ESP32) to allow the user | ||
# to provision wifi credentials to the device. | ||
esp32_improv: | ||
authorizer: none | ||
|
||
# Sets up the improv via serial client for Wi-Fi provisioning. | ||
# Handy if your device has a usb port for the user to add credentials when they first get it. | ||
improv_serial: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
esphome: | ||
name: project-template | ||
friendly_name: Project Template | ||
# Automatically add the mac address to the name | ||
# so you can use a single firmware for all devices | ||
name_add_mac_suffix: true | ||
|
||
# This will allow for project identification, | ||
# configuration and updates. | ||
project: | ||
name: esphome.project-template | ||
version: "1.0" | ||
|
||
esp32: | ||
board: esp32-s3-devkitc-1 | ||
variant: esp32s3 | ||
framework: | ||
type: esp-idf | ||
|
||
# To be able to get logs from the device via serial and api. | ||
logger: | ||
|
||
# API is a requirement of the dashboard import. | ||
api: | ||
|
||
# OTA is required for Over-the-Air updating | ||
ota: | ||
- platform: esphome | ||
|
||
wifi: | ||
# Set up a wifi access point using the device name above | ||
ap: | ||
|
||
# In combination with the `ap` this allows the user | ||
# to provision wifi credentials to the device. | ||
captive_portal: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
esphome: | ||
name: project-template | ||
friendly_name: Project Template | ||
# Automatically add the mac address to the name | ||
# so you can use a single firmware for all devices | ||
name_add_mac_suffix: true | ||
|
||
# This will allow for project identification, | ||
# configuration and updates. | ||
project: | ||
name: esphome.project-template | ||
version: "1.0" | ||
|
||
esp32: | ||
board: esp32-s3-devkitc-1 | ||
variant: esp32s3 | ||
framework: | ||
type: esp-idf | ||
|
||
# To be able to get logs from the device via serial and api. | ||
logger: | ||
|
||
# API is a requirement of the dashboard import. | ||
api: | ||
|
||
# OTA is required for Over-the-Air updating | ||
ota: | ||
- platform: esphome | ||
|
||
# This should point to the public location of this yaml file. | ||
dashboard_import: | ||
package_import_url: github://esphome/esphome-project-template/project-template-esp32-s3-adopt.yaml@main | ||
|
||
wifi: | ||
# Set up a wifi access point using the device name above | ||
ap: | ||
|
||
# In combination with the `ap` this allows the user | ||
# to provision wifi credentials to the device. | ||
captive_portal: | ||
|
||
########################################################## | ||
# Most projects should not remove anything from above here | ||
# and should just modify the name, project name/version | ||
# and git url for the dashboard_import | ||
########################################################## | ||
|
||
|
||
# Sets up Bluetooth LE (Only on ESP32) to allow the user | ||
# to provision wifi credentials to the device. | ||
esp32_improv: | ||
authorizer: none | ||
|
||
# Sets up the improv via serial client for Wi-Fi provisioning. | ||
# Handy if your device has a usb port for the user to add credentials when they first get it. | ||
improv_serial: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# CHANGEME: Set these variable to your liking | ||
title: ESPHome Project Template | ||
description: Powered by ESPHome and ESP Web Tools | ||
theme: jekyll-theme-slate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# About | ||
|
||
Add some information about your project here. | ||
|
||
# Installation | ||
|
||
You can use the button below to install the pre-built firmware directly to your device via USB from the browser. | ||
|
||
<esp-web-install-button manifest="./manifest.json"></esp-web-install-button> | ||
|
||
<script type="module" src="https://unpkg.com/esp-web-tools@9/dist/web/install-button.js?module"></script> |