1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-08 04:04:42 +02:00

update esphome

This commit is contained in:
kevin 2024-01-03 21:46:43 +08:00
parent 85ba705e1b
commit ec60b138bc
3 changed files with 40 additions and 9 deletions

View File

@ -38,9 +38,21 @@ INFO Successfully uploaded program.
INFO Starting log output from /dev/ttyACM0 with baud rate 115200
^C
>>> ping esphome-esp32c3-ibeacon.lan
^C
>>> exit
$ curl http://esphome-esp32c3-ibeacon.lan/
$ curl -X POST 'http://esphome-esp32c3-ibeacon.lan/light/neopixel_light/turn_on?brightness=255&r=255&g=192&b=203&white_value=0&effect=None'
$ curl http://esphome-esp32c3-ibeacon.lan/light/neopixel_light
{
"id": "light-neopixel_light",
"state": "ON",
"color_mode": "rgb",
"brightness": 255,
"color": {
"r": 255,
"g": 192,
"b": 203
}
}
```
[1]: https://esphome.io/

View File

@ -2,6 +2,8 @@
# See:
# - https://esphome.io/components/esp32.html
# - https://esphome.io/components/esp32_ble_beacon.html
# - https://esphome.io/components/web_server.html
# - https://esphome.io/web-api/
# - https://registry.platformio.org/platforms/platformio/espressif32/boards
#
@ -21,21 +23,25 @@ ota:
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
domain: .lan
domain: !secret wifi_domain
ap:
ssid: "ESPHome"
password: "configesp"
ssid: !secret wifi_ap_ssid
password: !secret wifi_ap_password
captive_portal:
web_server:
port: 80
version: 2
auth:
username: !secret web_server_username
password: !secret web_server_password
mqtt:
broker: broker.hivemq.com
port: 1883
#username: !secret mqtt_username
#password: !secret mqtt_password
#mqtt:
# broker: broker.hivemq.com
# port: 1883
# username: !secret mqtt_username
# password: !secret mqtt_password
esp32_ble_beacon:
type: iBeacon
@ -46,3 +52,11 @@ esp32_ble_beacon:
max_interval: 100ms
measured_power: -59
tx_power: 3
light:
- name: "NeoPixel Light"
platform: neopixelbus
type: GRB
variant: WS2812
pin: GPIO8
num_leds: 1

View File

@ -2,5 +2,10 @@ api_password: secret
ota_password: secret
wifi_ssid: OpenWrt
wifi_password: secret
wifi_domain: .lan
wifi_ap_ssid: ESPHome
wifi_ap_password: configesp
web_server_username: esphome
web_server_password: secret
mqtt_username: esphome
mqtt_password: secret