plants2 + logs
This commit is contained in:
9
logs.sh
Executable file
9
logs.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/bash
|
||||
if [ -z "$1" ]; then
|
||||
echo "usage: logs.sh <config.yaml> [/dev/tty-usb-device]"
|
||||
elif [ -z "$2" ]; then
|
||||
podman run --rm --privileged -v "${PWD}":/config -it ghcr.io/esphome/esphome logs $1
|
||||
else
|
||||
podman run --rm --privileged -v "${PWD}":/config --device=$2 -it ghcr.io/esphome/esphome logs $1
|
||||
fi
|
||||
|
||||
154
plants2.yaml
Normal file
154
plants2.yaml
Normal file
@@ -0,0 +1,154 @@
|
||||
esphome:
|
||||
name: esp-plants
|
||||
friendly_name: ESP-PLANTS
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
level: verbose
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
encryption:
|
||||
key: !secret api_key
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid4
|
||||
password: !secret wifi_password4
|
||||
|
||||
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
||||
ap:
|
||||
ssid: "Esp32S3N16R8 Fallback Hotspot"
|
||||
password: "v41VUZA7A1VA"
|
||||
|
||||
mqtt:
|
||||
broker: mqtt.hadow.fr
|
||||
port: 18832
|
||||
username: fire
|
||||
password: !secret mqtt_password
|
||||
topic_prefix: "esp_plants"
|
||||
|
||||
i2c:
|
||||
- id: bus_i2c_air_sensor
|
||||
scl: 21
|
||||
sda: 20
|
||||
scan: true
|
||||
|
||||
# temperature probes
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: GPIO6
|
||||
id: probe0
|
||||
- platform: gpio
|
||||
pin: GPIO7
|
||||
id: probe1
|
||||
- platform: gpio
|
||||
pin: GPIO15
|
||||
id: probe2
|
||||
- platform: gpio
|
||||
pin: GPIO16
|
||||
id: probe3
|
||||
- platform: gpio
|
||||
pin: GPIO17
|
||||
id: probe4
|
||||
- platform: gpio
|
||||
pin: GPIO18
|
||||
id: probe5
|
||||
- platform: gpio
|
||||
pin: GPIO8
|
||||
id: probe6
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
pin: GPIO5
|
||||
id: pwm_output1
|
||||
frequency: 25000Hz
|
||||
|
||||
fan:
|
||||
- platform: speed
|
||||
output: pwm_output1
|
||||
name: "12V pump"
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe0
|
||||
name: "temperature 0"
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe1
|
||||
name: "temperature 1"
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe2
|
||||
name: "temperature 2"
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe3
|
||||
name: "temperature 3"
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe4
|
||||
name: "temperature 4"
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe5
|
||||
name: "temperature 5"
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
one_wire_id: probe6
|
||||
name: "temperature 6"
|
||||
update_interval: 30s
|
||||
- platform: adc
|
||||
pin: GPIO4
|
||||
name: "soil moisture sensor, analog"
|
||||
update_interval: 30s
|
||||
attenuation: auto
|
||||
- platform: aht10
|
||||
variant: AHT20
|
||||
i2c_id: bus_i2c_air_sensor
|
||||
temperature:
|
||||
name: "AHT21 Temperature"
|
||||
id: aht21_temperature
|
||||
humidity:
|
||||
name: "AHT21 Humidity"
|
||||
id: aht21_humidity
|
||||
address: 0x38
|
||||
update_interval: 30s
|
||||
- platform: ens160_i2c
|
||||
i2c_id: bus_i2c_air_sensor
|
||||
eco2:
|
||||
name: "ENS160 eCO2"
|
||||
tvoc:
|
||||
name: "ENS160 Total Volatile Organic Compounds"
|
||||
aqi:
|
||||
id: ens160_air_quality_index
|
||||
name: "ENS160 Air Quality Index"
|
||||
compensation:
|
||||
temperature: aht21_temperature
|
||||
humidity: aht21_humidity
|
||||
address: 0x53
|
||||
update_interval: 30s
|
||||
|
||||
text_sensor:
|
||||
- platform: template
|
||||
name: "ENS160 Air Quality Rating"
|
||||
lambda: |-
|
||||
switch ( (int) (id(ens160_air_quality_index).state) ) {
|
||||
case 1: return {"Excellent"};
|
||||
case 2: return {"Good"};
|
||||
case 3: return {"Moderate"};
|
||||
case 4: return {"Poor"};
|
||||
case 5: return {"Unhealthy"};
|
||||
default: return {"Not Available"};
|
||||
}
|
||||
|
||||
captive_portal:
|
||||
Reference in New Issue
Block a user