Initial configuration with split config files and without .storage. Files with secrets excluded and ignored.
This commit is contained in:
10
esphome/.gitignore
vendored
Normal file
10
esphome/.gitignore
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
# 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/
|
||||
**/.pioenvs/
|
||||
**/.piolibdeps/
|
||||
**/lib/
|
||||
**/src/
|
||||
**/platformio.ini
|
||||
/secrets.yaml
|
42
esphome/aussensensor.yaml
Normal file
42
esphome/aussensensor.yaml
Normal file
@@ -0,0 +1,42 @@
|
||||
esphome:
|
||||
name: aussensensor
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
|
||||
wifi:
|
||||
ssid: "Voltage-legacy"
|
||||
password: !secret voltage_legacy_psk
|
||||
use_address: aussensensor.home
|
||||
power_save_mode: high
|
||||
fast_connect: on
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Aussensensor Fallback Hotspot"
|
||||
password: !secret fallback_psk
|
||||
|
||||
captive_portal:
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
ota:
|
||||
password: !secret ota
|
||||
|
||||
# DHT22 sensor
|
||||
sensor:
|
||||
- platform: dht
|
||||
model: dht22
|
||||
pin: 25
|
||||
temperature:
|
||||
name: "Temperatur außen"
|
||||
humidity:
|
||||
name: "Luftfeuchtigkeit außen"
|
||||
update_interval: 60s
|
||||
# WiFi signal strength
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signalstärke"
|
||||
update_interval: 60s
|
6
esphome/aussensensor/partitions.csv
Normal file
6
esphome/aussensensor/partitions.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
nvs, data, nvs, 0x009000, 0x005000,
|
||||
otadata, data, ota, 0x00e000, 0x002000,
|
||||
app0, app, ota_0, 0x010000, 0x1C0000,
|
||||
app1, app, ota_1, 0x1D0000, 0x1C0000,
|
||||
eeprom, data, 0x99, 0x390000, 0x001000,
|
||||
spiffs, data, spiffs, 0x391000, 0x00F000
|
|
157
esphome/sleepingroom.yaml
Normal file
157
esphome/sleepingroom.yaml
Normal file
@@ -0,0 +1,157 @@
|
||||
esphome:
|
||||
name: sleepingroom
|
||||
platform: ESP32
|
||||
board: nodemcu-32s
|
||||
|
||||
# Dirty hack, because on_value_range does not trigger green if sensor
|
||||
# value is within green range on boot.
|
||||
on_boot:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: led_green
|
||||
level: 58%
|
||||
- output.set_level:
|
||||
id: led_red
|
||||
level: 0%
|
||||
- text_sensor.template.publish:
|
||||
id: co2_warn
|
||||
state: "grün"
|
||||
|
||||
wifi:
|
||||
ssid: "Voltage-legacy"
|
||||
password: !secret voltage_legacy_psk
|
||||
use_address: sleepingroom.home
|
||||
power_save_mode: high
|
||||
fast_connect: on
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Schlafzimmer Fallback Hotspot"
|
||||
password: !secret fallback_psk
|
||||
|
||||
captive_portal:
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
password: !secret api
|
||||
|
||||
# Enable over-the-air updates
|
||||
ota:
|
||||
password: !secret ota
|
||||
|
||||
# Initialize I²C
|
||||
i2c:
|
||||
- id: bus_a
|
||||
sda: 13
|
||||
scl: 16
|
||||
scan: true
|
||||
|
||||
# Initialize LEDC GPIOs
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: GPIO17
|
||||
id: led_red
|
||||
- platform: ledc
|
||||
pin: GPIO18
|
||||
id: led_green
|
||||
|
||||
# Create text sensor to represent CO2 LED warn state (somewhat redundant)
|
||||
text_sensor:
|
||||
- platform: template
|
||||
name: "Schlafzimmer CO2 Warnstufe"
|
||||
id: co2_warn
|
||||
|
||||
sensor:
|
||||
# WiFi signal strength
|
||||
- platform: wifi_signal
|
||||
name: "WiFi Signalstärke"
|
||||
update_interval: 60s
|
||||
# SCD30 CO2 + Temperature + Humidity Sensor
|
||||
# • Luftqualität Kategorie 1: die LEDs leuchten grün (bis 800 ppm)
|
||||
# • Luftqualität Kategorie 2: die LEDs leuchten gelb (900-1200 ppm)
|
||||
# • Luftqualität Kategorie 3: die LEDs leuchten orange (1200 bis 1600ppm)
|
||||
# • Luftqualität Kategorie 4: die LEDs leuchten rot (ab 1600ppm)
|
||||
- platform: scd30
|
||||
i2c_id: bus_a
|
||||
co2:
|
||||
name: "Schlafzimmer CO2"
|
||||
id: co2_value
|
||||
accuracy_decimals: 1
|
||||
on_value_range:
|
||||
- above: 380
|
||||
below: 800
|
||||
then:
|
||||
- output.set_level:
|
||||
id: led_green
|
||||
level: 58%
|
||||
- output.set_level:
|
||||
id: led_red
|
||||
level: 0%
|
||||
- text_sensor.template.publish:
|
||||
id: co2_warn
|
||||
state: "grün"
|
||||
- above: 800
|
||||
below: 1200
|
||||
then:
|
||||
- output.set_level:
|
||||
id: led_green
|
||||
level: 58%
|
||||
- output.set_level:
|
||||
id: led_red
|
||||
level: 80%
|
||||
- text_sensor.template.publish:
|
||||
id: co2_warn
|
||||
state: "gelb"
|
||||
- above: 1200
|
||||
below: 1600
|
||||
then:
|
||||
- output.set_level:
|
||||
id: led_green
|
||||
level: 50%
|
||||
- output.set_level:
|
||||
id: led_red
|
||||
level: 100%
|
||||
- text_sensor.template.publish:
|
||||
id: co2_warn
|
||||
state: "orange"
|
||||
- above: 1600
|
||||
then:
|
||||
- output.set_level:
|
||||
id: led_green
|
||||
level: 0%
|
||||
- output.set_level:
|
||||
id: led_red
|
||||
level: 100%
|
||||
- text_sensor.template.publish:
|
||||
id: co2_warn
|
||||
state: "rot"
|
||||
temperature:
|
||||
name: "Schlafzimmer Temperatur"
|
||||
accuracy_decimals: 2
|
||||
humidity:
|
||||
name: "Schlafzimmer Luftfeuchtigkeit"
|
||||
accuracy_decimals: 1
|
||||
# SCD30 temp sensor is a bit off
|
||||
temperature_offset: 1.5 °C
|
||||
ambient_pressure_compensation: 1
|
||||
automatic_self_calibration: True
|
||||
address: 0x61
|
||||
update_interval: 60s
|
||||
- platform: bmp280
|
||||
i2c_id: bus_a
|
||||
temperature:
|
||||
name: "Schlafzimmer Temperatur alt"
|
||||
oversampling: 16x
|
||||
pressure:
|
||||
name: "Schlafzimmer Luftdruck"
|
||||
address: 0x76
|
||||
update_interval: 60s
|
||||
|
||||
script:
|
||||
- id: startup_animation
|
||||
then:
|
||||
- delay: 5s
|
||||
-
|
6
esphome/sleepingroom/partitions.csv
Normal file
6
esphome/sleepingroom/partitions.csv
Normal file
@@ -0,0 +1,6 @@
|
||||
nvs, data, nvs, 0x009000, 0x005000,
|
||||
otadata, data, ota, 0x00e000, 0x002000,
|
||||
app0, app, ota_0, 0x010000, 0x1C0000,
|
||||
app1, app, ota_1, 0x1D0000, 0x1C0000,
|
||||
eeprom, data, 0x99, 0x390000, 0x001000,
|
||||
spiffs, data, spiffs, 0x391000, 0x00F000
|
|
Reference in New Issue
Block a user