mirror of
https://github.com/nekorevend/esphome-emporia-vue-utility.git
synced 2026-01-08 20:40:39 -07:00
Clarify docs and make example yamls consistent. (#12)
This commit is contained in:
12
docs/faq.md
12
docs/faq.md
@@ -41,10 +41,11 @@ api:
|
|||||||
key: "M3d8zXcnwM4Uo2fRybLjFUNVs+mnlC1XbEfnlvUNI2c="
|
key: "M3d8zXcnwM4Uo2fRybLjFUNVs+mnlC1XbEfnlvUNI2c="
|
||||||
```
|
```
|
||||||
|
|
||||||
- Just a security measure. It’s a shared secret between your device and Home Assistant.
|
- This key is a shared secret between your device and Home Assistant.
|
||||||
- Ensures all ESPHome API traffic (state updates, commands, etc.) is encrypted and authenticated.
|
- Ensures all ESPHome API traffic (state updates, commands, etc.) is encrypted and authenticated.
|
||||||
- Without it, someone on your LAN could spoof commands to the device.
|
- Without it, someone on your LAN could spoof commands to the device.
|
||||||
- To generate one manually:
|
- The [official documentation](https://esphome.io/components/api/#configuration-variables) can generate a key. Find it under "If you need a key, you can use the key below; it is randomly generated by your browser each time this page loads:"
|
||||||
|
- Or, to generate one manually:
|
||||||
|
|
||||||
```
|
```
|
||||||
python3 -c "import base64, os; print(base64.b64encode(os.urandom(32)).decode())"
|
python3 -c "import base64, os; print(base64.b64encode(os.urandom(32)).decode())"
|
||||||
@@ -57,12 +58,13 @@ python3 -c "import base64, os; print(base64.b64encode(os.urandom(32)).decode())"
|
|||||||
Looks like this in the YAML:
|
Looks like this in the YAML:
|
||||||
```
|
```
|
||||||
ota:
|
ota:
|
||||||
|
platform: esphome
|
||||||
password: "blah"
|
password: "blah"
|
||||||
```
|
```
|
||||||
- Just a security measure. It’s a shared secret between your device and Home Assistant.
|
- This password is a shared secret between your device and ESPHome.
|
||||||
- Used only when flashing new firmware over Wi-Fi (OTA updates).
|
- Other instances of ESPHome would need to know this password in order to update your device with a new firmware.
|
||||||
- Prevents anyone on your LAN from pushing firmware to the device without authorization.
|
- Prevents anyone on your LAN from pushing firmware to the device without authorization.
|
||||||
- ESPHome generates one the first time if you don’t set it yourself.
|
- The `password:` is optional, but `ota:` is **required** if you want the ability to deploy firmware updates wirelessly.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|||||||
@@ -15,14 +15,15 @@ external_components:
|
|||||||
logger:
|
logger:
|
||||||
|
|
||||||
# Enable Home Assistant API
|
# Enable Home Assistant API
|
||||||
# Encryption secures it. Any password will work. See FAQ.
|
|
||||||
api:
|
api:
|
||||||
|
# Encrypt the API communication with the given key. Must be a 32-byte base64-encoded string. See FAQ.
|
||||||
encryption:
|
encryption:
|
||||||
key: "some_password"
|
key: "eU79n2aex33uRofF9yvNIP5gwEFCi5GsVi2Rr3OydjY="
|
||||||
|
|
||||||
# Secures OTA Updates. Any password will work. See FAQ.
|
# Secures OTA Updates.
|
||||||
ota:
|
ota:
|
||||||
platform: esphome
|
platform: esphome
|
||||||
|
# Any password will work. See FAQ.
|
||||||
password: "some_password"
|
password: "some_password"
|
||||||
|
|
||||||
wifi:
|
wifi:
|
||||||
|
|||||||
@@ -15,20 +15,28 @@ external_components:
|
|||||||
type: git
|
type: git
|
||||||
url: https://github.com/nekorevend/esphome-emporia-vue-utility
|
url: https://github.com/nekorevend/esphome-emporia-vue-utility
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
# Encrypt the API communication with the given key. Must be a 32-byte base64-encoded string. See FAQ.
|
||||||
|
encryption:
|
||||||
|
key: "eU79n2aex33uRofF9yvNIP5gwEFCi5GsVi2Rr3OydjY="
|
||||||
|
|
||||||
|
# Secures OTA Updates.
|
||||||
|
ota:
|
||||||
|
platform: esphome
|
||||||
|
# Any password will work. See FAQ.
|
||||||
|
password: "some_password"
|
||||||
|
|
||||||
# Add your own wifi credentials
|
# Add your own wifi credentials
|
||||||
wifi:
|
wifi:
|
||||||
ssid: !secret wifi_ssid
|
ssid: !secret wifi_ssid
|
||||||
password: !secret wifi_password
|
password: !secret wifi_password
|
||||||
|
|
||||||
ota:
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
logs:
|
logs:
|
||||||
# Change to DEBUG / INFO / WARN / ERROR as desired
|
# Change to DEBUG / INFO / WARN / ERROR as desired
|
||||||
Vue: DEBUG
|
Vue: DEBUG
|
||||||
|
|
||||||
api:
|
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: !secret mqtt_broker
|
broker: !secret mqtt_broker
|
||||||
id: vue_utility
|
id: vue_utility
|
||||||
|
|||||||
@@ -15,20 +15,28 @@ external_components:
|
|||||||
type: git
|
type: git
|
||||||
url: https://github.com/nekorevend/esphome-emporia-vue-utility
|
url: https://github.com/nekorevend/esphome-emporia-vue-utility
|
||||||
|
|
||||||
|
# Enable Home Assistant API
|
||||||
|
api:
|
||||||
|
# Encrypt the API communication with the given key. Must be a 32-byte base64-encoded string. See FAQ.
|
||||||
|
encryption:
|
||||||
|
key: "eU79n2aex33uRofF9yvNIP5gwEFCi5GsVi2Rr3OydjY="
|
||||||
|
|
||||||
|
# Secures OTA Updates.
|
||||||
|
ota:
|
||||||
|
platform: esphome
|
||||||
|
# Any password will work. See FAQ.
|
||||||
|
password: "some_password"
|
||||||
|
|
||||||
# Add your own wifi credentials
|
# Add your own wifi credentials
|
||||||
wifi:
|
wifi:
|
||||||
ssid: !secret wifi_ssid
|
ssid: !secret wifi_ssid
|
||||||
password: !secret wifi_password
|
password: !secret wifi_password
|
||||||
|
|
||||||
ota:
|
|
||||||
|
|
||||||
logger:
|
logger:
|
||||||
logs:
|
logs:
|
||||||
# Change to DEBUG / INFO / WARN / ERROR as desired
|
# Change to DEBUG / INFO / WARN / ERROR as desired
|
||||||
Vue: DEBUG
|
Vue: DEBUG
|
||||||
|
|
||||||
api:
|
|
||||||
|
|
||||||
mqtt:
|
mqtt:
|
||||||
broker: !secret mqtt_broker
|
broker: !secret mqtt_broker
|
||||||
id: vue_utility
|
id: vue_utility
|
||||||
|
|||||||
Reference in New Issue
Block a user