142 lines
3.3 KiB
YAML
142 lines
3.3 KiB
YAML
esphome:
|
|
name: ds220-lcd-panel
|
|
friendly_name: DS220+ LCD Panel
|
|
|
|
esp32:
|
|
board: esp32-s3-devkitc-1
|
|
framework:
|
|
type: esp-idf
|
|
variant: esp32s3
|
|
|
|
# Enable logging
|
|
logger:
|
|
|
|
# Enable Home Assistant API
|
|
api:
|
|
encryption:
|
|
key: "eVupNko2fMCA58CbMcMY6cACQHVi8VZbMLYX7A5z/r4="
|
|
|
|
ota:
|
|
- platform: esphome
|
|
password: "916dad427f4df26e1fb4d6cd96a5b9bc"
|
|
|
|
wifi:
|
|
ssid: "REALM_NETWORK"
|
|
password: "EineAlteDummeGanzHatEier"
|
|
|
|
manual_ip:
|
|
static_ip: 192.168.0.109
|
|
gateway: 192.168.0.1
|
|
subnet: 255.255.255.0
|
|
|
|
# Enable fallback hotspot (captive portal) in case wifi connection fails
|
|
ap:
|
|
ssid: "Esp32-S3-Lcd Fallback Hotspot"
|
|
password: "H4OqsZnugvps"
|
|
|
|
captive_portal:
|
|
|
|
time:
|
|
- platform: sntp
|
|
id: sntp_time
|
|
|
|
# HTTPS-Client für DSM-API
|
|
http_request:
|
|
useragent: esphome/ds220-panel
|
|
timeout: 10s
|
|
verify_ssl: false # bei selbstsigniertem DSM-Zertifikat; mit gültigem Zertifikat auf true
|
|
|
|
# --------- Display (Waveshare ESP32-S3-LCD-1.47 / ST7789 172x320) ----------
|
|
spi:
|
|
clk_pin: GPIO40
|
|
mosi_pin: GPIO45
|
|
|
|
display:
|
|
- platform: st7789v
|
|
model: "Waveshare 1.47in 172X320"
|
|
cs_pin: GPIO42
|
|
dc_pin: GPIO41
|
|
reset_pin: GPIO39
|
|
backlight_pin: GPIO48
|
|
rotation: 180
|
|
id: lcd
|
|
lambda: |-
|
|
it.printf(4, 4, id(f16b), COLOR_CYAN, "Synology DS220+");
|
|
if (id(sntp_time).now().is_valid()) {
|
|
it.strftime(4, 26, id(f12), COLOR_SILVER, "%d.%m. %H:%M:%S", id(sntp_time).now());
|
|
}
|
|
it.printf(4, 52, id(f12), COLOR_SILVER, "Quelle: Home Assistant");
|
|
|
|
it.printf(4, 84, id(f14), COLOR_WHITE, "CPU: %5.1f %%", id(cpu_total).state);
|
|
it.printf(4, 106, id(f14), COLOR_WHITE, "RAM: %5.1f %%", id(mem_used).state);
|
|
it.printf(4, 128, id(f14), COLOR_WHITE, "Vol1: %5.1f %%", id(volume1_used).state);
|
|
|
|
if (!isnan(id(sys_temp).state)) {
|
|
it.printf(4, 150, id(f14), COLOR_WHITE, "Temp: %4.1f °C", id(sys_temp).state);
|
|
}
|
|
|
|
# Fonts
|
|
font:
|
|
- file: "gfonts://Roboto Mono"
|
|
id: f12
|
|
size: 12
|
|
- file: "gfonts://Roboto Mono"
|
|
id: f14
|
|
size: 14
|
|
- file: "gfonts://Roboto Mono"
|
|
id: f16b
|
|
size: 16
|
|
glyphs: " !\"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzÄÖÜäöüß"
|
|
|
|
color:
|
|
- id: COLOR_CYAN
|
|
red: 0.0000
|
|
green: 1.0000
|
|
blue: 1.0000
|
|
white: 0.0000
|
|
- id: COLOR_SILVER
|
|
red: 0.7529
|
|
green: 0.7529
|
|
blue: 0.7529
|
|
white: 0.0000
|
|
- id: COLOR_WHITE
|
|
red: 1.0000
|
|
green: 1.0000
|
|
blue: 1.0000
|
|
white: 0.0000
|
|
- id: COLOR_RED
|
|
red: 1.0000
|
|
green: 0.0000
|
|
blue: 0.0000
|
|
white: 0.0000
|
|
- id: COLOR_GREEN
|
|
red: 0.0000
|
|
green: 0.5020
|
|
blue: 0.0000
|
|
white: 0.0000
|
|
|
|
# -------- Daten aus HA importieren (ESPHome liest HA-States) --------
|
|
sensor:
|
|
- platform: homeassistant
|
|
id: cpu_total
|
|
entity_id: sensor.realmdrive_cpu_utilization_total
|
|
unit_of_measurement: "%"
|
|
accuracy_decimals: 1
|
|
|
|
- platform: homeassistant
|
|
id: mem_used
|
|
entity_id: sensor.realmdrive_memory_usage_real
|
|
unit_of_measurement: "%"
|
|
accuracy_decimals: 1
|
|
|
|
- platform: homeassistant
|
|
id: volume1_used
|
|
entity_id: sensor.realmdrive_volume_1_volume_used
|
|
unit_of_measurement: "%"
|
|
accuracy_decimals: 1
|
|
|
|
- platform: homeassistant
|
|
id: sys_temp
|
|
entity_id: sensor.realmdrive_temperature
|
|
unit_of_measurement: "°C"
|
|
accuracy_decimals: 1 |