2021-10-17 00:03:24 +02:00
Sharing ESPHome devices
=======================
2021-06-15 05:39:41 +02:00
.. seo ::
2021-10-17 00:03:24 +02:00
:description: Information for creating and sharing devices using ESPHome firmware.
2021-06-15 05:39:41 +02:00
2021-10-17 00:03:24 +02:00
We have added configuration options to ESPHome to make it easier
2021-06-15 05:39:41 +02:00
to create, configure, install and distribute devices running ESPHome.
Example configuration
---------------------
.. code-block :: yaml
2021-11-10 08:39:42 +01:00
# These substitutions allow the end user to override certain values
substitutions:
2021-11-29 13:06:07 +01:00
name: "project-template-32"
2021-11-10 08:39:42 +01:00
2021-06-15 05:39:41 +02:00
esphome:
2021-11-10 08:39:42 +01:00
name: "${name}"
2021-06-15 05:39:41 +02:00
# 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 (future) project identification,
# configuration and updates.
project:
2021-11-29 13:06:07 +01:00
name: esphome.project-template
2021-06-15 05:39:41 +02:00
version: "1.0"
2021-11-29 13:06:07 +01:00
# 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:
2021-10-17 00:03:24 +02:00
# This should point to the public location of this yaml file.
dashboard_import:
2021-11-29 13:06:07 +01:00
package_import_url: github://esphome/esphome-project-template/project-template-esp32.yaml@v6
2022-12-08 22:24:37 +01:00
import_full_config: false # or true
2021-10-17 00:03:24 +02:00
2021-06-15 05:39:41 +02:00
wifi:
# Set up a wifi access point
ap:
2021-11-10 08:39:42 +01:00
password: "12345678"
2021-06-15 05:39:41 +02:00
# In combination with the `ap` this allows the user
# to provision wifi credentials to the device.
captive_portal:
2022-10-13 21:58:46 +02:00
# Optionally, preserve provisioned credentials
# over subsequent OTA updates.
keep_user_credentials: true
2021-06-15 05:39:41 +02:00
# Sets up Bluetooth LE (Only on ESP32) to allow the user
# to provision wifi credentials to the device.
esp32_improv:
authorizer: none
2021-11-29 13:06:07 +01:00
# Sets up the improv via serial client for Wi-Fi provisioning
2021-11-10 21:01:30 +01:00
improv_serial:
2021-06-15 05:39:41 +02:00
Relevant Documentation
----------------------
- `` name_add_mac_suffix `` - :ref: `esphome-mac_suffix`
- `` project `` - :ref: `esphome-creators_project`
- `` esp32_improv `` - :doc: `/components/esp32_improv`
- `` captive_portal `` - :doc: `/components/captive_portal`
2022-02-10 23:10:43 +01:00
- `` wifi `` -> `` ap `` allows you to flash a device that will not contain any
2021-06-15 05:39:41 +02:00
credentials and they must be set by the user via either the `` ap `` + `` captive_portal `` or
2022-02-10 23:10:43 +01:00
the `` esp32_improv `` / `` improv_serial `` components.
2022-12-08 22:24:37 +01:00
- `` dashboard_import ``
- `` package_import_url `` - This should point to the public repository containing
2021-10-17 00:03:24 +02:00
the configuration for the device so that the user's ESPHome dashboard can autodetect this device and
create a minimal YAML using :ref: `config-git_packages` .
2022-12-08 22:24:37 +01:00
- `` import_full_config `` - This signals if ESPHome should download the entire YAML file as the user's config YAML instead of referencing the package. Set this to `true` if you are creating a tutorial to let users easily tweak the whole configuration or be able to uncomment follow-up tutorial steps.
2021-11-10 21:01:30 +01:00
- `` improv_serial `` - :doc: `/components/improv_serial`
2021-06-15 05:39:41 +02:00
See Also
--------
- :ghedit: `Edit`