20260326
This commit is contained in:
107
esphome/cfg_experimental/Guition_ESP32_S3_480480.yaml
Normal file
107
esphome/cfg_experimental/Guition_ESP32_S3_480480.yaml
Normal file
@@ -0,0 +1,107 @@
|
||||
substitutions:
|
||||
device_name: "display4848"
|
||||
friendly_name: "display lgvl"
|
||||
comment: "esp32-s3"
|
||||
location: "Woonkamer"
|
||||
board: "esp32-s3-devkitc-1"
|
||||
variant: "esp32s3"
|
||||
flashsize: "16MB"
|
||||
framework: "esp-idf"
|
||||
api_password: !secret display_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
wifi_ssid2: !secret wifi_ssid2
|
||||
wifi_password2: !secret wifi_password2
|
||||
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-variant.yaml
|
||||
psram: !include boards/psram.yaml
|
||||
common: !include common/common.yaml
|
||||
connected: !include common/wifi_nosens.yaml
|
||||
display: !include display/guition480480.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
#widgets and pages
|
||||
home: !include widgets/home/home.yaml
|
||||
lights_config: !include widgets/light/lights_config.yaml
|
||||
devices: !include widgets/devices.yaml
|
||||
settings: !include widgets/settings.yaml
|
||||
menu_controls_main: !include widgets/menu_controls_main.yaml
|
||||
loading_page: !include widgets/loading_page.yaml
|
||||
|
||||
|
||||
image: !include widgets/image.yaml
|
||||
font: !include widgets/fonts.yaml
|
||||
color: !include widgets/colors.yaml
|
||||
|
||||
|
||||
http_request:
|
||||
verify_ssl: false
|
||||
|
||||
external_components:
|
||||
- source: github://pr#9972
|
||||
components: [mapping]
|
||||
refresh: 1h
|
||||
|
||||
esphome:
|
||||
# name: display
|
||||
# friendly_name: display
|
||||
includes:
|
||||
- <sstream>
|
||||
- <algorithm>
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
|
||||
lvgl:
|
||||
color_depth: 16
|
||||
byte_order: big_endian
|
||||
displays: my_display
|
||||
touchscreens:
|
||||
- touchscreen_id: my_touchscreen
|
||||
long_press_time: 5000ms
|
||||
long_press_repeat_time: 400ms
|
||||
page_wrap: false
|
||||
|
||||
|
||||
|
||||
|
||||
# interval:
|
||||
# - interval: 60s
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# // Общая информация о памяти
|
||||
# ESP_LOGI("memory", "Free heap: %d bytes", esp_get_free_heap_size());
|
||||
# ESP_LOGI("memory", "Free internal heap: %d bytes", esp_get_free_internal_heap_size());
|
||||
# ESP_LOGI("memory", "Min free heap: %d bytes", esp_get_minimum_free_heap_size());
|
||||
|
||||
# // Детальная статистика кучи
|
||||
# multi_heap_info_t info;
|
||||
# heap_caps_get_info(&info, MALLOC_CAP_INTERNAL);
|
||||
# ESP_LOGI("memory", "SRAM total: %d, free: %d, largest_free: %d",
|
||||
# info.total_free_bytes + info.total_allocated_bytes,
|
||||
# info.total_free_bytes,
|
||||
# info.largest_free_block);
|
||||
|
||||
# // Статистика по PSRAM
|
||||
# heap_caps_get_info(&info, MALLOC_CAP_SPIRAM);
|
||||
# ESP_LOGI("memory", "PSRAM total: %d, free: %d, largest_free: %d",
|
||||
# info.total_free_bytes + info.total_allocated_bytes,
|
||||
# info.total_free_bytes,
|
||||
# info.largest_free_block);
|
||||
|
||||
# - lambda: |-
|
||||
# ESP_LOGI("stack", "Main task free: %d bytes",
|
||||
# uxTaskGetStackHighWaterMark(xTaskGetHandle("loopTask")));
|
||||
# ESP_LOGI("stack", "System event free: %d bytes",
|
||||
# uxTaskGetStackHighWaterMark(xTaskGetHandle("sys_evt")));
|
||||
# ESP_LOGI("stack", "Timer task free: %d bytes",
|
||||
# uxTaskGetStackHighWaterMark(xTaskGetHandle("esp_timer")));
|
||||
|
||||
# - lambda: |-
|
||||
# char* buf = (char*)malloc(1024);
|
||||
# if (buf) {
|
||||
# vTaskList(buf);
|
||||
# ESP_LOGI("stack", "\nTask Name\tState\tPrio\tStack\tNum\n%s", buf);
|
||||
# free(buf);
|
||||
# }
|
||||
1104
esphome/cfg_experimental/deskcontroller.yaml
Normal file
1104
esphome/cfg_experimental/deskcontroller.yaml
Normal file
File diff suppressed because it is too large
Load Diff
117
esphome/cfg_experimental/deurbel.yaml
Normal file
117
esphome/cfg_experimental/deurbel.yaml
Normal file
@@ -0,0 +1,117 @@
|
||||
substitutions:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework: arduino
|
||||
device_name: "deurbel"
|
||||
friendly_name: Deurbel
|
||||
comment: "ESP32-cam-button"
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
api_password: !secret doorcam_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
# Pin define
|
||||
|
||||
#led sk6812-EX20
|
||||
pin_led1: GPIO33
|
||||
|
||||
# Camera esp32-spk
|
||||
pin_cam_d0: GPIO2 # Camera Data pin 0 - cam_Y2
|
||||
pin_cam_d1: GPIO3 # Camera Data pin 1 - cam_Y3
|
||||
pin_cam_d2: GPIO4 # Camera Data pin 2 - cam_Y4
|
||||
pin_cam_d3: GPIO5 # Camera Data pin 3 - cam_Y5
|
||||
pin_cam_d4: GPIO6 # Camera Data pin 4 - cam_Y6
|
||||
pin_cam_d5: GPIO41 # Camera Data pin 5 - cam_Y7
|
||||
pin_cam_d6: GPIO48 # Camera Data pin 6 - cam_Y8
|
||||
pin_cam_d7: GPIO47 # Camera Data pin 7 - cam_Y9
|
||||
pin_cam_vsync: GPIO35 # Camera VSYNC
|
||||
pin_cam_href: GPIO34 # pin_pin_camera HREF
|
||||
pin_cam_pclk: GPIO41 # pin_camera Pixel Clock
|
||||
pin_cam_xclk: GPIO33 # pin_camera External Clock
|
||||
pin_cam_sda: GPIO37 # Camera SDA
|
||||
pin_cam_scl: GPIO36 # pin_camera SCK
|
||||
|
||||
#audio
|
||||
pin_mic_data: GPIO38
|
||||
pin_mic_sck: GPIO39
|
||||
pin_mic_ws: GPIO40
|
||||
pin_amp_ctrl: GPIO46
|
||||
pin_amp_ws: GPIO45
|
||||
pin_amp_bclk: GPIO19
|
||||
pin_amp_data: GPIO9
|
||||
|
||||
#sdcard - SPI
|
||||
pin_D0: GPIO12 #MISO
|
||||
pin_D3: GPIO2 #CS
|
||||
pin_CMD: GPIO3 #mosi
|
||||
pin_SCLK: GPIO11 #CLK
|
||||
|
||||
esphome:
|
||||
name: ${device_name}
|
||||
friendly_name: ${friendly_name}
|
||||
#min_version: 2025.9.0
|
||||
#name_add_mac_suffix: false
|
||||
|
||||
esp32:
|
||||
board: ${board}
|
||||
variant: esp32s3
|
||||
framework:
|
||||
type: ${framework}
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
||||
# Enable Home Assistant API
|
||||
api:
|
||||
|
||||
# Allow Over-The-Air updates
|
||||
ota:
|
||||
- platform: esphome
|
||||
|
||||
wifi:
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
# SPI bus configuratie
|
||||
# spi:
|
||||
# clk_pin: GPIO12
|
||||
# miso_pin: GPIO13
|
||||
# mosi_pin: GPIO11
|
||||
|
||||
# # RC522 configuratie
|
||||
# rc522_spi:
|
||||
# cs_pin: GPIO10
|
||||
# reset_pin: GPIO9
|
||||
# on_tag:
|
||||
# then:
|
||||
# - homeassistant.tag_scanned: !lambda 'return x;'
|
||||
# - logger.log:
|
||||
# format: "Tag gescand: %s"
|
||||
# args: [ 'x.c_str()' ]
|
||||
|
||||
psram:
|
||||
|
||||
i2s_audio:
|
||||
id: i2s_in
|
||||
i2s_lrclk_pin: ${pin_mic_ws}
|
||||
i2s_bclk_pin: ${pin_amp_bclk}
|
||||
|
||||
media_player:
|
||||
- platform: i2s_audio
|
||||
name: "esp_speaker"
|
||||
id: media_player_speaker
|
||||
i2s_audio_id: i2s_in
|
||||
dac_type: external
|
||||
i2s_dout_pin: ${pin_amp_data}
|
||||
mode: mono
|
||||
on_play:
|
||||
- logger.log: "Media playing!"
|
||||
- media_player.volume_set:
|
||||
id: media_player_speaker
|
||||
volume: 100%
|
||||
|
||||
microphone:
|
||||
- platform: i2s_audio
|
||||
id: external_mic
|
||||
adc_type: external
|
||||
i2s_din_pin: ${pin_mic_data}
|
||||
102
esphome/cfg_experimental/deurbelv2.yaml
Normal file
102
esphome/cfg_experimental/deurbelv2.yaml
Normal file
@@ -0,0 +1,102 @@
|
||||
substitutions:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework: esp-idf
|
||||
device_name: esphome-web-0c8784
|
||||
friendly_name: deurbell 2.0
|
||||
comment: "ESP32-cam-button"
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
api_password: !secret doorcam_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
# Pin define
|
||||
|
||||
#led sk6812-EX20
|
||||
pin_led1: GPIO21
|
||||
|
||||
# Camera esp32-spk
|
||||
pin_cam_d0: GPIO7 # Camera Data pin 0 - cam_Y2
|
||||
pin_cam_d1: GPIO5 # Camera Data pin 1 - cam_Y3
|
||||
pin_cam_d2: GPIO4 # Camera Data pin 2 - cam_Y4
|
||||
pin_cam_d3: GPIO6 # Camera Data pin 3 - cam_Y5
|
||||
pin_cam_d4: GPIO8 # Camera Data pin 4 - cam_Y6
|
||||
pin_cam_d5: GPIO42 # Camera Data pin 5 - cam_Y7
|
||||
pin_cam_d6: GPIO48 # Camera Data pin 6 - cam_Y8
|
||||
pin_cam_d7: GPIO47 # Camera Data pin 7 - cam_Y9
|
||||
pin_cam_vsync: GPIO35 # Camera VSYNC
|
||||
pin_cam_href: GPIO34 # pin_pin_camera HREF
|
||||
pin_cam_pclk: GPIO41 # pin_camera Pixel Clock
|
||||
pin_cam_xclk: GPIO33 # pin_camera External Clock
|
||||
pin_cam_sda: GPIO37 # Camera SDA
|
||||
pin_cam_scl: GPIO36 # pin_camera SCK
|
||||
|
||||
#audio
|
||||
pin_mic_data: GPIO38
|
||||
pin_mic_sck: GPIO39
|
||||
pin_mic_ws: GPIO40
|
||||
pin_amp_ctrl: GPIO46
|
||||
pin_amp_lrclk: GPIO45
|
||||
pin_amp_bclk: GPIO10
|
||||
pin_amp_data: GPIO9
|
||||
|
||||
#sdcard - SPI
|
||||
pin_D0: GPIO12 #MISO
|
||||
pin_D3: GPIO2 #CS
|
||||
pin_CMD: GPIO3 #mosi
|
||||
pin_SCLK: GPIO11 #CLK
|
||||
|
||||
#buttons:
|
||||
pin_sw1: GPIO15
|
||||
pin_sw2: GPIO16
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-gen.yaml
|
||||
common: !include common/common.yaml
|
||||
wifi: !include common/wifi.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
time: !include templates/time.yaml
|
||||
audio: !include interfaces/audio.yaml
|
||||
|
||||
psram:
|
||||
|
||||
esp32_camera:
|
||||
name: camera
|
||||
external_clock:
|
||||
pin: $pin_cam_xclk
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda: $pin_cam_sda
|
||||
scl: $pin_cam_scl
|
||||
data_pins: [$pin_cam_d0, $pin_cam_d1, $pin_cam_d2, $pin_cam_d3, $pin_cam_d4, $pin_cam_d5, $pin_cam_d6, $pin_cam_d7]
|
||||
vsync_pin: $pin_cam_vsync
|
||||
href_pin: $pin_cam_href
|
||||
pixel_clock_pin: $pin_cam_pclk
|
||||
vertical_flip: false
|
||||
horizontal_mirror: false
|
||||
# resolution: 320x240
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
pin: ${pin_sw1}
|
||||
name: "sw1"
|
||||
- platform: gpio
|
||||
pin: ${pin_sw2}
|
||||
name: "sw2"
|
||||
|
||||
#SPI bus configuratie
|
||||
spi:
|
||||
clk_pin: GPIO12
|
||||
miso_pin: GPIO13
|
||||
mosi_pin: GPIO11
|
||||
|
||||
# RC522 configuratie
|
||||
rc522_spi:
|
||||
cs_pin: GPIO14
|
||||
reset_pin: GPIO1
|
||||
on_tag:
|
||||
then:
|
||||
- homeassistant.tag_scanned: !lambda 'return x;'
|
||||
- logger.log:
|
||||
format: "Tag gescand: %s"
|
||||
args: [ 'x.c_str()' ]
|
||||
446
esphome/cfg_experimental/display-keuken.yaml
Normal file
446
esphome/cfg_experimental/display-keuken.yaml
Normal file
@@ -0,0 +1,446 @@
|
||||
substitutions:
|
||||
device_name: "esp32-75epaper-keuken"
|
||||
friendly_name: "Epaper display keuken"
|
||||
comment: "7,5inch epaper displau keuken"
|
||||
location: "Keuken"
|
||||
api_password: !secret eink_display_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
wifi_ssid2: !secret wifi_ssid2
|
||||
wifi_password2: !secret wifi_password2
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
ip: !secret eink_display_ip
|
||||
#pins
|
||||
pin_spi_clk: GPIO7
|
||||
pin_spi_mosi: GPIO9
|
||||
pin_ep_cs: GPIO2
|
||||
pin_ep_dc: GPIO4
|
||||
pin_ep_busy: GPIO3
|
||||
pin_ep_reset: GPIO1
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-S3.yaml
|
||||
device_base: !include common/common.yaml
|
||||
connection: !include common/wifi_nosens.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
|
||||
|
||||
#add include
|
||||
esphome:
|
||||
includes:
|
||||
- include/epaper75.h
|
||||
- include/text_utils.h
|
||||
|
||||
external_components:
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/atomicmike/esphome.git
|
||||
# ref: waveshare-color-2022.6
|
||||
# components: [waveshare_epaper]
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/twisterss/esphome-dev.git
|
||||
ref: waveshare-red-black
|
||||
components: [ waveshare_epaper ]
|
||||
#- source: components/waveshare-epaper-c
|
||||
|
||||
sun:
|
||||
latitude: !secret home_latitude
|
||||
longitude: !secret home_longitude
|
||||
|
||||
globals:
|
||||
- id: data_updated
|
||||
type: bool
|
||||
restore_value: no
|
||||
initial_value: 'false'
|
||||
- id: initial_data_received
|
||||
type: bool
|
||||
restore_value: no
|
||||
initial_value: 'false'
|
||||
- id: recorded_display_refresh
|
||||
type: int
|
||||
restore_value: yes
|
||||
initial_value: '0'
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: esptime
|
||||
on_time_sync:
|
||||
- then:
|
||||
- component.update: sunrise
|
||||
- component.update: sunset
|
||||
- logger.log: Time has been set and is valid!
|
||||
on_time:
|
||||
- minutes: 5
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(data_updated) == true;'
|
||||
then:
|
||||
- lambda: 'id(initial_data_received) = true;'
|
||||
- logger.log: "Sensor data updated: Refreshing display..."
|
||||
- component.update: eink_display
|
||||
- lambda: 'id(data_updated) = false;'
|
||||
- lambda: 'id(recorded_display_refresh) += 1;'
|
||||
- lambda: 'id(display_last_update).publish_state(id(esptime).now().timestamp);'
|
||||
else:
|
||||
- logger.log: "No sensors updated - skipping display refresh."
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: "Refresh screen"
|
||||
id: refresh
|
||||
icon: "mdi:emoticon-outline"
|
||||
on_press:
|
||||
- logger.log: "Button pressed"
|
||||
- component.update: eink_display
|
||||
|
||||
# deep_sleep:
|
||||
# run_duration: 15s
|
||||
# sleep_duration: 1min
|
||||
|
||||
# Include custom fonts
|
||||
font:
|
||||
# - file: 'fonts/GothamRnd-Book.ttf'
|
||||
# id: font_small_book
|
||||
# size: 18
|
||||
- file: 'fonts/GothamRnd-Bold.ttf'
|
||||
id: font_large_bold
|
||||
size: 108
|
||||
glyphs: ['-',' ', '°', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'C', 'a', 'n']
|
||||
# - file: 'fonts/GothamRnd-Bold.ttf'
|
||||
# id: font_medium_bold
|
||||
# size: 30
|
||||
# glyphs: [' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'M', 'I', 'N']
|
||||
- file: 'fonts/GothamRnd-Bold.ttf'
|
||||
id: font_small_bold
|
||||
size: 18
|
||||
# glyphs: ['°', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'C', 'M', 'I', 'N']
|
||||
|
||||
# - file: 'fonts/GothamRnd-Bold.ttf'
|
||||
# id: font_time
|
||||
# size: 90
|
||||
# glyphs: [' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':']
|
||||
- file: 'fonts/GothamRnd-Book.ttf'
|
||||
id: font_weekday
|
||||
size: 30
|
||||
glyphs: &default-glyphs
|
||||
['&', '@', '!', ',', '.', '"', '%', '(', ')', '+', '-', '_', ':', '°', '0',
|
||||
'1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E',
|
||||
'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
|
||||
'T', 'U', 'V', 'W', 'X', 'Y', 'Z', ' ', 'a', 'b', 'c', 'd', 'e', 'f',
|
||||
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
|
||||
'u', 'v', 'w', 'x', 'y', 'z','|', '/']
|
||||
|
||||
- file: 'fonts/GothamRnd-Book.ttf'
|
||||
id: font_day
|
||||
size: 65
|
||||
glyphs: [' ', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9']
|
||||
- file: 'fonts/GothamRnd-Bold.ttf'
|
||||
id: font_month
|
||||
size: 40
|
||||
|
||||
|
||||
# Include Material Design Icons font
|
||||
# Thanks to https://community.home-assistant.io/t/display-materialdesign-icons-on-esphome-attached-to-screen/199790/16
|
||||
- file: 'fonts/materialdesignicons-webfont.ttf'
|
||||
id: font_mdi_large
|
||||
size: 96
|
||||
glyphs: &mdi-weather-glyphs
|
||||
- "\U000F0590" # mdi-weather-cloudy
|
||||
- "\U000F0F2F" # mdi-weather-cloudy-alert
|
||||
- "\U000F0E6E" # mdi-weather-cloudy-arrow-right
|
||||
- "\U000F0591" # mdi-weather-fog
|
||||
- "\U000F0592" # mdi-weather-hail
|
||||
- "\U000F0F30" # mdi-weather-hazy
|
||||
- "\U000F0898" # mdi-weather-hurricane
|
||||
- "\U000F0593" # mdi-weather-lightning
|
||||
- "\U000F067E" # mdi-weather-lightning-rainy
|
||||
- "\U000F0594" # mdi-weather-night
|
||||
- "\U000F0F31" # mdi-weather-night-partly-cloudy
|
||||
- "\U000F0595" # mdi-weather-partly-cloudy
|
||||
- "\U000F0F32" # mdi-weather-partly-lightning
|
||||
#- "\U000F0F33" # mdi-weather-partly-rainy
|
||||
#- "\U000F0F34" # mdi-weather-partly-snowy
|
||||
- "\U000F0F35" # mdi-weather-partly-snowy-rainy
|
||||
- "\U000F0596" # mdi-weather-pouring
|
||||
- "\U000F0597" # mdi-weather-rainy
|
||||
- "\U000F0598" # mdi-weather-snowy
|
||||
#- "\U000F0F36" # mdi-weather-snowy-heavy
|
||||
- "\U000F067F" # mdi-weather-snowy-rainy
|
||||
- "\U000F0599" # mdi-weather-sunny
|
||||
- "\U000F0F37" # mdi-weather-sunny-alert
|
||||
- "\U000F14E4" # mdi-weather-sunny-off
|
||||
- "\U000F059A" # mdi-weather-sunset
|
||||
- "\U000F059B" # mdi-weather-sunset-down
|
||||
- "\U000F059C" # mdi-weather-sunset-up
|
||||
#- "\U000F0F38" # mdi-weather-tornado
|
||||
- "\U000F059D" # mdi-weather-windy
|
||||
#- "\U000F059E" # mdi-weather-windy-variant
|
||||
- "\U000f010b" # mdi-car
|
||||
- "\U000f0819" # trash
|
||||
|
||||
- file: 'fonts/materialdesignicons-webfont.ttf'
|
||||
id: font_mdi_medium
|
||||
size: 36
|
||||
glyphs: *mdi-weather-glyphs
|
||||
|
||||
|
||||
sensor:
|
||||
- platform: template
|
||||
name: "${device_name} Last Update"
|
||||
device_class: timestamp
|
||||
id: display_last_update
|
||||
|
||||
- platform: homeassistant
|
||||
entity_id: weather.forecast_home
|
||||
attribute: temperature
|
||||
id: weather_temperature
|
||||
on_value:
|
||||
then:
|
||||
- lambda: 'id(data_updated) = true;'
|
||||
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_0, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_1, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_2, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_temperature_3, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_Best_time, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_ASML_time, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_euretco_time, entity_id: sensor.e_ink_display_data }}
|
||||
|
||||
|
||||
|
||||
- platform: wifi_signal
|
||||
id: sensor_wifi_signal
|
||||
name: "${device_name} WiFi"
|
||||
update_interval: 60s
|
||||
on_value:
|
||||
- component.update: sensor_wifi_signal_percentage
|
||||
|
||||
- platform: template
|
||||
id: sensor_wifi_signal_percentage
|
||||
name: "${device_name} Wi-Fi Signal Percentage"
|
||||
icon: "mdi:wifi"
|
||||
unit_of_measurement: "%"
|
||||
update_interval: never
|
||||
lambda: |-
|
||||
if (id(sensor_wifi_signal).state) {
|
||||
if (id(sensor_wifi_signal).state <= -100 ) {
|
||||
return 0;
|
||||
} else if (id(sensor_wifi_signal).state >= -50) {
|
||||
return 100;
|
||||
} else {
|
||||
return 2 * (id(sensor_wifi_signal).state + 100);
|
||||
}
|
||||
} else {
|
||||
return NAN;
|
||||
}
|
||||
|
||||
- platform: template
|
||||
name: "${device_name} Recorded Display Refresh"
|
||||
lambda: 'return id(recorded_display_refresh);'
|
||||
unit_of_measurement: "refreshes"
|
||||
|
||||
|
||||
text_sensor:
|
||||
# - platform: homeassistant
|
||||
# entity_id: weather.forecast_home
|
||||
# id: weather_state
|
||||
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_now, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_0, entity_id: sensor.e_ink_display_data}}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_0, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_1, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_1, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_2, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_2, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_condition_3, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: weather_timestamp_3, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: afval_today, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: afval_tomorrow, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_Best_name, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_ASML_name, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: travel_euretco_name, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: day_full, entity_id: sensor.e_ink_display_data }}
|
||||
- !include { file: sensors/homeassistant.yaml, vars: { id: datum, entity_id: sensor.e_ink_display_data }}
|
||||
|
||||
# Sunrise
|
||||
- platform: sun
|
||||
type: sunrise
|
||||
id: sun_sunrise
|
||||
format: "%H:%M"
|
||||
on_value:
|
||||
then:
|
||||
- lambda: 'id(data_updated) = true;'
|
||||
# Sunset
|
||||
- platform: sun
|
||||
type: sunset
|
||||
id: sun_sunset
|
||||
format: "%H:%M"
|
||||
on_value:
|
||||
then:
|
||||
- lambda: 'id(data_updated) = true;'
|
||||
|
||||
|
||||
- platform: sun
|
||||
id: sunrise
|
||||
name: Sun Next Sunrise
|
||||
type: sunrise
|
||||
format: "%H:%M"
|
||||
internal: true
|
||||
update_interval: 12h
|
||||
|
||||
- platform: sun
|
||||
id: sunset
|
||||
name: Sun Next Sunset
|
||||
type: sunset
|
||||
format: "%H:%M"
|
||||
internal: true
|
||||
update_interval: 12h
|
||||
|
||||
# Define colors
|
||||
# This design is white on black so this is necessary.
|
||||
color:
|
||||
- id: color_black
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
white: 50%
|
||||
- id: color_white
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
white: 0%
|
||||
- id: COLOR_RED
|
||||
red: 100%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
white: 0%
|
||||
|
||||
|
||||
# Pins for Waveshare ePaper ESP Board
|
||||
spi:
|
||||
clk_pin: ${pin_spi_clk}
|
||||
mosi_pin: ${pin_spi_mosi}
|
||||
|
||||
|
||||
# Now render everything on the ePaper screen.
|
||||
display:
|
||||
- platform: waveshare_epaper
|
||||
cs_pin: ${pin_ep_cs}
|
||||
dc_pin: ${pin_ep_dc}
|
||||
busy_pin:
|
||||
number: ${pin_ep_busy}
|
||||
inverted: True
|
||||
reset_pin: ${pin_ep_reset}
|
||||
reset_duration: 2ms
|
||||
model: 7.50in-bv2-rb
|
||||
#model: 7.50in-bV2
|
||||
update_interval: 30min
|
||||
id: eink_display
|
||||
rotation: 90°
|
||||
lambda: |-
|
||||
int xres = it.get_width();
|
||||
int yres = it.get_height();
|
||||
|
||||
#define x_pad 10 // border padding
|
||||
#define y_pad 10 // border padding
|
||||
|
||||
// int wifi_x_a = xres-x_pad;
|
||||
// int wifi_y_a = yres-y_pad+2;
|
||||
// Fill background in black.
|
||||
it.fill(COLOR_OFF);
|
||||
|
||||
// clock section
|
||||
int clk_yoffset = 50;
|
||||
int clk_xoffset = 50;
|
||||
|
||||
// Print full weekday name
|
||||
it.printf(clk_xoffset, clk_yoffset, id(font_weekday), TextAlign::TOP_LEFT, "%s", id(day_full).state.c_str());
|
||||
int day_size = GetTextWidth(&it, id(font_weekday), "%s", id(day_full).state.c_str());
|
||||
it.printf(clk_xoffset + day_size+10, clk_yoffset, id(font_weekday), TextAlign::TOP_LEFT, "%s", id(datum).state.c_str());
|
||||
|
||||
int sry_offset = 200; //sunrise/set y-offset
|
||||
// Print sunrise
|
||||
it.printf(60, sry_offset, id(font_mdi_medium), COLOR_RED, TextAlign::CENTER_RIGHT, "\U000F059C");
|
||||
if(id(sun_sunrise).has_state ()) {
|
||||
it.printf(65, sry_offset, id(font_small_bold), TextAlign::CENTER_LEFT, "%s", id(sun_sunrise).state.c_str());
|
||||
}
|
||||
// Print sunset
|
||||
it.printf(425, sry_offset, id(font_mdi_medium), COLOR_RED, TextAlign::CENTER_RIGHT, "\U000F059B");
|
||||
if(id(sun_sunset).has_state ()) {
|
||||
it.printf(385, sry_offset, id(font_small_bold), TextAlign::CENTER_RIGHT, "%s", id(sun_sunset).state.c_str());
|
||||
}
|
||||
// Moonphase
|
||||
//it.printf(265, sry_offset, id(font_mdi_medlarge), TextAlign::CENTER, "%s", moon_icon_map[id(moon_phase).state.c_str()].c_str());
|
||||
|
||||
it.line(30, sry_offset+30, 420, sry_offset+30);
|
||||
|
||||
|
||||
// Weather Section
|
||||
int wy_offset = sry_offset + 60; //weather y offset
|
||||
// WEATHER STATE ICON
|
||||
it.printf(80, wy_offset, id(font_mdi_large), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_now).state.c_str()].c_str());
|
||||
// TEMPERATURE
|
||||
it.printf(410, wy_offset, id(font_large_bold), TextAlign::TOP_RIGHT, "%2.0f°C", id(weather_temperature).state);
|
||||
|
||||
int forecast_yoffset = wy_offset+30+108;
|
||||
int fcst_xstart = 90;
|
||||
int fcst_offset = 90;
|
||||
it.printf(fcst_xstart, forecast_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(weather_timestamp_0).state.c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+20, id(font_mdi_medium), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_0).state.c_str()].c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+72, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f°C", id(weather_temperature_0).state);
|
||||
|
||||
fcst_xstart += fcst_offset;
|
||||
it.printf(fcst_xstart, forecast_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(weather_timestamp_1).state.c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+20, id(font_mdi_medium), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_1).state.c_str()].c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+72, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f°C", id(weather_temperature_1).state);
|
||||
|
||||
fcst_xstart += fcst_offset;
|
||||
it.printf(fcst_xstart, forecast_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(weather_timestamp_2).state.c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+20, id(font_mdi_medium), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_2).state.c_str()].c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+72, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f°C", id(weather_temperature_2).state);
|
||||
|
||||
fcst_xstart += fcst_offset;
|
||||
it.printf(fcst_xstart, forecast_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(weather_timestamp_3).state.c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+20, id(font_mdi_medium), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map[id(weather_condition_3).state.c_str()].c_str());
|
||||
it.printf(fcst_xstart, forecast_yoffset+72, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f°C", id(weather_temperature_3).state);
|
||||
|
||||
it.line(30, forecast_yoffset+102, 420, forecast_yoffset+102);
|
||||
|
||||
// //afstand
|
||||
int drvtime_yoffset = forecast_yoffset+132;
|
||||
// int drvtime_xoffset = 40;
|
||||
// it.printf(drvtime_xoffset, drvtime_yoffset, id(font_mdi_medium), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map["car"].c_str());
|
||||
|
||||
// it.printf(drvtime_xoffset+90, drvtime_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(travel_Best_name).state.c_str());
|
||||
// it.printf(drvtime_xoffset+90, drvtime_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f min", id(travel_Best_time).state);
|
||||
|
||||
// it.printf(drvtime_xoffset+210, drvtime_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(travel_ASML_name).state.c_str());
|
||||
// it.printf(drvtime_xoffset+210, drvtime_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f min", id(travel_ASML_time).state);
|
||||
|
||||
// it.printf(drvtime_xoffset+330, drvtime_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(travel_euretco_name).state.c_str());
|
||||
// it.printf(drvtime_xoffset+330, drvtime_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%2.0f min", id(travel_euretco_time).state);
|
||||
|
||||
// it.line(30, drvtime_yoffset+60, 420, drvtime_yoffset+60);
|
||||
|
||||
// afval
|
||||
int waste_yoffset = drvtime_yoffset+90;
|
||||
int waste_xoffset = 60;
|
||||
// it.printf(waste_xoffset, waste_yoffset, id(font_mdi_medium), COLOR_RED, TextAlign::TOP_CENTER, "%s", weather_icon_map["trash"].c_str());
|
||||
|
||||
// it.printf(waste_xoffset+100, waste_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "Vandaag:");
|
||||
// it.printf(waste_xoffset+260, waste_yoffset, id(font_small_bold), TextAlign::TOP_CENTER, "Morgen:");
|
||||
// it.printf(waste_xoffset+95, waste_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(afval_today).state.c_str());
|
||||
// it.printf(waste_xoffset+255, waste_yoffset+30, id(font_small_bold), TextAlign::TOP_CENTER, "%s", id(afval_tomorrow).state.c_str());
|
||||
|
||||
// it.line(30, 400, 440, 400);
|
||||
|
||||
// it.printf(30, 520, id(font_mdi_medium), color_white, TextAlign::TOP_CENTER, "%s", moon_icon_map[id(moon_phace_icon).state.c_str()].c_str());
|
||||
|
||||
|
||||
|
||||
captive_portal:
|
||||
|
||||
232
esphome/cfg_experimental/doorcam.yaml
Normal file
232
esphome/cfg_experimental/doorcam.yaml
Normal file
@@ -0,0 +1,232 @@
|
||||
substitutions:
|
||||
board: esp32-s3-devkitc-1
|
||||
framework: esp-idf
|
||||
device_name: doorcam
|
||||
friendly_name: doorcam
|
||||
comment: "ESP32-cam-button"
|
||||
ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
api_password: !secret doorcam_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
# Pin define
|
||||
# SPI
|
||||
# pin_spi_clk: GPIO21 # Serial Clock
|
||||
# pin_spi_mosi: GPIO19 # Main Out Sub In
|
||||
# pin_spi_miso: GPIO22 # Main In Sub Out
|
||||
|
||||
# tft
|
||||
# pin_dis_cs: GPIO12 # Chip Select
|
||||
# pin_dis_dc: GPIO15 # Data/Command
|
||||
# pin_dis_bk: GPIO2 # Backlight
|
||||
|
||||
# Camera ttgo
|
||||
# pin_cam_d0: GPIO34 # Camera Data pin 0
|
||||
# pin_cam_d1: GPIO13 # Camera Data pin 1
|
||||
# pin_cam_d2: GPIO26 # Camera Data pin 2
|
||||
# pin_cam_d3: GPIO35 # Camera Data pin 3
|
||||
# pin_cam_d4: GPIO39 # Camera Data pin 4
|
||||
# pin_cam_d5: GPIO38 # Camera Data pin 5
|
||||
# pin_cam_d6: GPIO37 # Camera Data pin 6
|
||||
# pin_cam_d7: GPIO36 # Camera Data pin 7
|
||||
# pin_cam_vsync: GPIO5 # Camera VSYNC
|
||||
# pin_cam_href: GPIO27 # pin_pin_camera HREF
|
||||
# pin_cam_pclk: GPIO25 # pin_camera Pixel Clock
|
||||
# pin_cam_xclk: GPIO4 # pin_camera External Clock
|
||||
# pin_cam_sda: GPIO18 # Camera SDA
|
||||
# pin_cam_scl: GPIO23 # pin_camera SCL
|
||||
|
||||
#led sk6812-EX20
|
||||
pin_led1: GPIO33
|
||||
|
||||
# Camera esp32-spk
|
||||
pin_cam_d0: GPIO2 # Camera Data pin 0 - cam_Y2
|
||||
pin_cam_d1: GPIO3 # Camera Data pin 1 - cam_Y3
|
||||
pin_cam_d2: GPIO4 # Camera Data pin 2 - cam_Y4
|
||||
pin_cam_d3: GPIO5 # Camera Data pin 3 - cam_Y5
|
||||
pin_cam_d4: GPIO6 # Camera Data pin 4 - cam_Y6
|
||||
pin_cam_d5: GPIO41 # Camera Data pin 5 - cam_Y7
|
||||
pin_cam_d6: GPIO48 # Camera Data pin 6 - cam_Y8
|
||||
pin_cam_d7: GPIO47 # Camera Data pin 7 - cam_Y9
|
||||
pin_cam_vsync: GPIO35 # Camera VSYNC
|
||||
pin_cam_href: GPIO34 # pin_pin_camera HREF
|
||||
pin_cam_pclk: GPIO41 # pin_camera Pixel Clock
|
||||
pin_cam_xclk: GPIO33 # pin_camera External Clock
|
||||
pin_cam_sda: GPIO37 # Camera SDA
|
||||
pin_cam_scl: GPIO36 # pin_camera SCK
|
||||
|
||||
#audio
|
||||
pin_mic_data: GPIO38
|
||||
pin_mic_sck: GPIO39
|
||||
pin_mic_ws: GPIO40
|
||||
pin_amp_ctrl: GPIO46
|
||||
pin_amp_ws: GPIO45
|
||||
pin_amp_bclk: GPIO19
|
||||
pin_amp_data: GPIO9
|
||||
|
||||
#sdcard - SPI
|
||||
pin_D0: GPIO12 #MISO
|
||||
pin_D3: GPIO2 #CS
|
||||
pin_CMD: GPIO3 #mosi
|
||||
pin_SCLK: GPIO11 #CLK
|
||||
|
||||
# SD Card (TF) CS (CD/DAT3) GPIO2 SPI mode (SD_CS)
|
||||
# DI (CMD/MOSI) GPIO3 SPI MOSI
|
||||
# SCLK (CLK) GPIO11 SPI SCK
|
||||
# DO (DATA0/MISO) GPIO12 SPI MISO
|
||||
# LED SK6812-EX20 DIN GPIO21 Addressable RGB LED
|
||||
# Camera (24-pin)
|
||||
# Y2 GPIO2 - D0
|
||||
# Y3 GPIO3 - D1
|
||||
# Y4 GPIO4 Camera data - D2
|
||||
# Y5 GPIO5 Camera data - D3
|
||||
# Y6 GPIO6 Camera data - D4
|
||||
# Y7 GPIO42 Camera data - D5
|
||||
# Y8 GPIO48 Camera data - D6
|
||||
# MCLK GPIO33 Master clock
|
||||
# Y9 GPIO47 Camera data - D7
|
||||
# HS (HREF/SYNC) GPIO34 Horizontal sync
|
||||
# VS (VSYNC) GPIO35 Vertical sync
|
||||
# SCK (SCCB/I2C) GPIO36 Camera config clock
|
||||
# SDA (SCCB/I2C) GPIO37 Camera config data
|
||||
# Microphones MSM261S SO (data) GPIO38 Both mics, shared line
|
||||
# (MEMS, digital) MSM261S SCK (clk) GPIO39 Clock input
|
||||
# MSM261S WS (sync) GPIO40 Word select
|
||||
# Speaker Amp NS4168 CTRL GPIO46 Amplifier control
|
||||
# Audio Out (I2S) LRCLK GPIO45 I2S word select
|
||||
# BCLK GPIO19 I2S bit clock
|
||||
# SDATA GPIO9 I2S serial data
|
||||
|
||||
|
||||
psram:
|
||||
mode: quad
|
||||
speed: 80MHz
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-gen.yaml
|
||||
common: !include common/common.yaml
|
||||
wifi: !include common/wifi.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
# lcd: !include display/st7789v_t-cameraplus.yaml
|
||||
time: !include templates/time.yaml
|
||||
|
||||
web_server:
|
||||
|
||||
color: !include widgets/colors.yaml
|
||||
|
||||
# I2C Bus Addresses
|
||||
# 0x30 Camera OV2640 2Megapixel
|
||||
# 0x68 MPU6050 Accelerometer/Gyroscope Sensor
|
||||
# 0x75 IP5306 Battery Management
|
||||
i2c:
|
||||
- id: bus_a
|
||||
sda: $pin_cam_sda
|
||||
scl: $pin_cam_scl
|
||||
|
||||
# TTGO Camera Plus
|
||||
# OV2640 2Megapixel
|
||||
esp32_camera:
|
||||
name: camera
|
||||
external_clock:
|
||||
pin: $pin_cam_xclk
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda: $pin_cam_sda
|
||||
scl: $pin_cam_scl
|
||||
data_pins: [$pin_cam_d0, $pin_cam_d1, $pin_cam_d2, $pin_cam_d3, $pin_cam_d4, $pin_cam_d5, $pin_cam_d6, $pin_cam_d7]
|
||||
vsync_pin: $pin_cam_vsync
|
||||
href_pin: $pin_cam_href
|
||||
pixel_clock_pin: $pin_cam_pclk
|
||||
vertical_flip: false
|
||||
horizontal_mirror: false
|
||||
# resolution: 320x240
|
||||
# internal: true
|
||||
|
||||
# Camera Web Server
|
||||
esp32_camera_web_server:
|
||||
- port: 8080
|
||||
mode: stream
|
||||
- port: 8081
|
||||
mode: snapshot
|
||||
|
||||
|
||||
|
||||
# lvgl:
|
||||
# buffer_size: 100%
|
||||
# byte_order: little_endian
|
||||
# displays: my_display
|
||||
# widgets:
|
||||
# - button:
|
||||
# id: button1_btn
|
||||
# x: 20
|
||||
# y: 20
|
||||
# width: 100
|
||||
# height: 100
|
||||
# align: TOP_LEFT
|
||||
# bg_color: color_steel_blue
|
||||
# bg_opa: 20%
|
||||
# shadow_opa: TRANSP
|
||||
# radius: 10
|
||||
# widgets:
|
||||
# - label:
|
||||
# id: light_on
|
||||
# align: CENTER
|
||||
# text_color: color_steel_blue
|
||||
# text_font: icons_90
|
||||
# text: "\U0000e908" # lightbulb
|
||||
# - label:
|
||||
# id: lable_name
|
||||
# align: TOP_MID
|
||||
# text_font: nunito_16
|
||||
# text_color: color_misty_blue
|
||||
# text: "hi"
|
||||
|
||||
|
||||
# font:
|
||||
# - file: "fonts/Nunito-SemiBold.ttf"
|
||||
# id: nunito_16
|
||||
# size: 16
|
||||
# bpp: 4
|
||||
# glyphsets:
|
||||
# - GF_Latin_Core
|
||||
# # - GF_Greek_Core
|
||||
# # - GF_Cyrillic_Core
|
||||
# # - GF_Latin_Vietnamese
|
||||
# # glyphs: "²"
|
||||
# # extras:
|
||||
# # - file: "fonts/Jua-Regular.ttf"
|
||||
# # glyphs: [
|
||||
# # "\U0000C774",
|
||||
# # "\U0000B8E8",
|
||||
# # "\U0000B9C8",
|
||||
# # ]
|
||||
|
||||
# - file: "fonts/icons_v2.ttf"
|
||||
# id: icons_90
|
||||
# size: 90
|
||||
# bpp: 4
|
||||
# glyphs: [
|
||||
# "\U0000e908", # lightbulb
|
||||
# # "\U0000e915", # spotlights_group
|
||||
# # "\U0000e916", # desk_lamp
|
||||
# # "\U0000e917", # pendant_lamp
|
||||
# # "\U0000e918", # ceiling_lamp
|
||||
# # "\U0000e921", # ceiling_lamp_variant
|
||||
# # "\U0000e919", # night_lamp
|
||||
# # "\U0000e91d", # 0 - shutter_closed
|
||||
# # "\U0000e93d", # 10 - shutter
|
||||
# # "\U0000e93e", # 20 - shutter
|
||||
# # "\U0000e93f", # 30 - shutter
|
||||
# # "\U0000e940", # 40 - shutter
|
||||
# # "\U0000e941", # 50 - shutter
|
||||
# # "\U0000e93c", # 60 - shutter
|
||||
# # "\U0000e943", # 70 - shutter
|
||||
# # "\U0000e944", # 80 - shutter
|
||||
# # "\U0000e942", # 90 - shutter
|
||||
# # "\U0000e91e", # 100 - shutter_open
|
||||
# # "\U0000e91b", # music
|
||||
# # "\U0000e91f", # arrow_up
|
||||
# # "\U0000e920", # arrow_down
|
||||
# # "\U0000e922", # vacuum
|
||||
# ]
|
||||
59
esphome/cfg_experimental/esphome-web-0a9174.yaml
Normal file
59
esphome/cfg_experimental/esphome-web-0a9174.yaml
Normal file
@@ -0,0 +1,59 @@
|
||||
esphome:
|
||||
name: thread-repeater
|
||||
friendly_name: Thread-repeater
|
||||
min_version: 2025.9.0
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: !secret ot_ftd_led
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitm-1
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
logger:
|
||||
|
||||
network:
|
||||
enable_ipv6: true
|
||||
|
||||
openthread:
|
||||
device_type: FTD
|
||||
tlv: !secret otbr_tlv
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
pin: GPIO15
|
||||
id: light_output
|
||||
|
||||
light:
|
||||
- platform: binary
|
||||
name: "status_light"
|
||||
output: light_output
|
||||
|
||||
text_sensor:
|
||||
- platform: openthread_info
|
||||
ip_address:
|
||||
name: "IP Address"
|
||||
channel:
|
||||
name: "Channel"
|
||||
role:
|
||||
name: "Device Role"
|
||||
rloc16:
|
||||
name: "RLOC16"
|
||||
ext_addr:
|
||||
name: "Extended Address"
|
||||
eui64:
|
||||
name: "EUI64 Interface ID"
|
||||
network_name:
|
||||
name: "Network Name"
|
||||
network_key:
|
||||
name: "Network Key"
|
||||
pan_id:
|
||||
name: "PAN ID"
|
||||
ext_pan_id:
|
||||
name: "Extended PAN ID"
|
||||
237
esphome/cfg_experimental/guition_esp32_og.yaml
Normal file
237
esphome/cfg_experimental/guition_esp32_og.yaml
Normal file
@@ -0,0 +1,237 @@
|
||||
packages:
|
||||
home: !include widgets/home/home.yaml
|
||||
lights_config: !include widgets/light/lights_config.yaml
|
||||
devices: !include widgets/devices.yaml
|
||||
settings: !include widgets/settings.yaml
|
||||
menu_controls_main: !include widgets/menu_controls_main.yaml
|
||||
loading_page: !include widgets/loading_page.yaml
|
||||
|
||||
|
||||
image: !include widgets/image.yaml
|
||||
font: !include widgets/fonts.yaml
|
||||
color: !include widgets/colors.yaml
|
||||
|
||||
|
||||
http_request:
|
||||
verify_ssl: false
|
||||
|
||||
external_components:
|
||||
- source: github://pr#9972
|
||||
components: [mapping]
|
||||
refresh: 1h
|
||||
|
||||
esphome:
|
||||
name: display
|
||||
friendly_name: display
|
||||
includes:
|
||||
- <sstream>
|
||||
- <algorithm>
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
variant: esp32s3
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: "y"
|
||||
CONFIG_SPIRAM_TRY_ALLOCATE_WIFI_LWIP: y
|
||||
# CONFIG_ESP32S3_DATA_CACHE_64KB: "y"
|
||||
# CONFIG_ESP32S3_DATA_CACHE_LINE_64B: "y"
|
||||
# CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
|
||||
# CONFIG_SPIRAM_RODATA: y
|
||||
# CONFIG_FREERTOS_USE_TRACE_FACILITY: "y"
|
||||
# CONFIG_FREERTOS_USE_STATS_FORMATTING_FUNCTIONS: "y"
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 80MHz
|
||||
|
||||
|
||||
logger:
|
||||
level: debug
|
||||
|
||||
|
||||
api:
|
||||
encryption:
|
||||
key: !secret display_api
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
password: !secret ota_password
|
||||
|
||||
wifi:
|
||||
networks:
|
||||
- ssid: !secret wifi_ssid
|
||||
password: !secret wifi_password
|
||||
|
||||
|
||||
lvgl:
|
||||
color_depth: 16
|
||||
byte_order: big_endian
|
||||
displays: my_display
|
||||
touchscreens:
|
||||
- touchscreen_id: my_touchscreen
|
||||
long_press_time: 5000ms
|
||||
long_press_repeat_time: 400ms
|
||||
page_wrap: false
|
||||
|
||||
|
||||
light:
|
||||
# Backlight
|
||||
- platform: monochromatic
|
||||
output: backlight_output
|
||||
name: Backlight
|
||||
id: display_backlight
|
||||
restore_mode: ALWAYS_ON
|
||||
on_turn_on:
|
||||
- if:
|
||||
condition: lvgl.is_paused
|
||||
then:
|
||||
- logger.log: "LVGL resuming by backlight on"
|
||||
- lvgl.resume:
|
||||
- lvgl.widget.redraw:
|
||||
on_turn_off:
|
||||
- if:
|
||||
condition:
|
||||
lambda: 'return id(display_timeout_number).state >= 0;'
|
||||
then:
|
||||
- logger.log: "Backlight off, pausing LVGL"
|
||||
- lvgl.pause:
|
||||
|
||||
output:
|
||||
# Backlight LED
|
||||
- platform: ledc
|
||||
pin: GPIO38
|
||||
id: backlight_output
|
||||
frequency: 100Hz
|
||||
|
||||
i2c:
|
||||
- id: bus_a
|
||||
sda: GPIO19
|
||||
scl:
|
||||
number: GPIO45
|
||||
ignore_strapping_warning: true
|
||||
frequency: 100kHz
|
||||
|
||||
|
||||
touchscreen:
|
||||
platform: gt911
|
||||
id: my_touchscreen
|
||||
transform:
|
||||
mirror_x: false
|
||||
mirror_y: false
|
||||
display: my_display
|
||||
on_release:
|
||||
- if:
|
||||
condition: lvgl.is_paused
|
||||
then:
|
||||
- logger.log: "LVGL resuming"
|
||||
- lvgl.resume:
|
||||
- lvgl.widget.redraw:
|
||||
- light.turn_on: display_backlight
|
||||
|
||||
# on_touch:
|
||||
# - lambda: |-
|
||||
# ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
|
||||
# touch.x,
|
||||
# touch.y,
|
||||
# touch.x_raw,
|
||||
# touch.y_raw
|
||||
# );
|
||||
|
||||
spi:
|
||||
- id: lcd_spi
|
||||
clk_pin: GPIO48
|
||||
mosi_pin: GPIO47
|
||||
|
||||
display:
|
||||
- platform: st7701s
|
||||
id: my_display
|
||||
update_interval: never
|
||||
auto_clear_enabled: false
|
||||
data_rate: 2MHz
|
||||
spi_mode: MODE3
|
||||
color_order: RGB
|
||||
invert_colors: false
|
||||
dimensions:
|
||||
width: 480
|
||||
height: 480
|
||||
transform:
|
||||
mirror_x: false
|
||||
mirror_y: false
|
||||
cs_pin: 39
|
||||
# reset not defined
|
||||
de_pin: 18
|
||||
hsync_pin: 16
|
||||
vsync_pin: 17
|
||||
pclk_pin: 21
|
||||
init_sequence:
|
||||
- 1
|
||||
- [0xFF, 0x77, 0x01, 0x00, 0x00, 0x10] # CMD2_BKSEL_BK0
|
||||
- [0xCD, 0x00] # disable MDT flag
|
||||
pclk_frequency: 12MHz
|
||||
pclk_inverted: false
|
||||
data_pins:
|
||||
red:
|
||||
- 11 # R1
|
||||
- 12 # R2
|
||||
- 13 # R3
|
||||
- 14 # R4
|
||||
- 0 # R5
|
||||
green:
|
||||
- 8 # G0
|
||||
- 20 # G1
|
||||
- 3 # G2
|
||||
- 46 # G3
|
||||
- 9 # G4
|
||||
- 10 # G5
|
||||
blue:
|
||||
- 4 # B1
|
||||
- 5 # B2
|
||||
- 6 # B3
|
||||
- 7 # B4
|
||||
- 15 # B5
|
||||
|
||||
|
||||
# interval:
|
||||
# - interval: 60s
|
||||
# then:
|
||||
# - lambda: |-
|
||||
# // Общая информация о памяти
|
||||
# ESP_LOGI("memory", "Free heap: %d bytes", esp_get_free_heap_size());
|
||||
# ESP_LOGI("memory", "Free internal heap: %d bytes", esp_get_free_internal_heap_size());
|
||||
# ESP_LOGI("memory", "Min free heap: %d bytes", esp_get_minimum_free_heap_size());
|
||||
|
||||
# // Детальная статистика кучи
|
||||
# multi_heap_info_t info;
|
||||
# heap_caps_get_info(&info, MALLOC_CAP_INTERNAL);
|
||||
# ESP_LOGI("memory", "SRAM total: %d, free: %d, largest_free: %d",
|
||||
# info.total_free_bytes + info.total_allocated_bytes,
|
||||
# info.total_free_bytes,
|
||||
# info.largest_free_block);
|
||||
|
||||
# // Статистика по PSRAM
|
||||
# heap_caps_get_info(&info, MALLOC_CAP_SPIRAM);
|
||||
# ESP_LOGI("memory", "PSRAM total: %d, free: %d, largest_free: %d",
|
||||
# info.total_free_bytes + info.total_allocated_bytes,
|
||||
# info.total_free_bytes,
|
||||
# info.largest_free_block);
|
||||
|
||||
# - lambda: |-
|
||||
# ESP_LOGI("stack", "Main task free: %d bytes",
|
||||
# uxTaskGetStackHighWaterMark(xTaskGetHandle("loopTask")));
|
||||
# ESP_LOGI("stack", "System event free: %d bytes",
|
||||
# uxTaskGetStackHighWaterMark(xTaskGetHandle("sys_evt")));
|
||||
# ESP_LOGI("stack", "Timer task free: %d bytes",
|
||||
# uxTaskGetStackHighWaterMark(xTaskGetHandle("esp_timer")));
|
||||
|
||||
# - lambda: |-
|
||||
# char* buf = (char*)malloc(1024);
|
||||
# if (buf) {
|
||||
# vTaskList(buf);
|
||||
# ESP_LOGI("stack", "\nTask Name\tState\tPrio\tStack\tNum\n%s", buf);
|
||||
# free(buf);
|
||||
# }
|
||||
1087
esphome/cfg_experimental/habbitatcontrollerv2.yaml
Normal file
1087
esphome/cfg_experimental/habbitatcontrollerv2.yaml
Normal file
File diff suppressed because it is too large
Load Diff
50
esphome/cfg_experimental/jaloziev2.yaml
Normal file
50
esphome/cfg_experimental/jaloziev2.yaml
Normal file
@@ -0,0 +1,50 @@
|
||||
substitutions:
|
||||
device_name: "JalozieV2"
|
||||
friendly_name: "JalozieV2"
|
||||
comment: "esp-C6, RGBled, usbPD"
|
||||
api_password: !secret JalozieV2_api
|
||||
ota_password: !secret ota_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
wifi_ssid2: !secret wifi_ssid2
|
||||
wifi_password2: !secret wifi_password2
|
||||
gateway: !secret ip_gateway
|
||||
subnet: !secret ip_subnet
|
||||
ip: !secret JalozieV2_ip
|
||||
location: "slaapkamer"
|
||||
board: "esp32-c6-devkitc-1"
|
||||
framework: esp-idf
|
||||
num_leds: "1"
|
||||
chipset: WS2812
|
||||
is_rgbw: "false"
|
||||
|
||||
#pins
|
||||
pin_led1: GPIO05
|
||||
pin_pd_cfg1: GPIO19
|
||||
pin_pd_cfg2: GPIO20
|
||||
pin_pd_cfg3: GPIO21
|
||||
pin_mot_rst: GPIO3
|
||||
pin_mot_slp: GPIO2
|
||||
pin_mot_dir: GPIO1
|
||||
pin_mot_stp: GPIO0
|
||||
#pin_mot_en:
|
||||
pin_hall_dir: GPIO6
|
||||
pin_hall_stp: GPIO7
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-gen.yaml
|
||||
connection: !include common/wifi.yaml
|
||||
device_base: !include common/common.yaml
|
||||
logger: !include templates/logger.yaml
|
||||
leds: !include templates/light_rgbw_rmt.yaml
|
||||
usbcpd: !include interfaces/CH224K.yaml
|
||||
|
||||
stepper:
|
||||
- platform: a4988
|
||||
id: stepper_motor
|
||||
step_pin: ${pin_mot_stp}
|
||||
dir_pin: ${pin_mot_dir}
|
||||
max_speed: 200
|
||||
sleep_pin: ${pin_mot_slp}
|
||||
acceleration: inf
|
||||
deceleration: inf
|
||||
112
esphome/cfg_experimental/p4-tablet.yaml
Normal file
112
esphome/cfg_experimental/p4-tablet.yaml
Normal file
@@ -0,0 +1,112 @@
|
||||
substitutions:
|
||||
device_name: "esp32p4tablet"
|
||||
friendly_name: "ESP32 P4 tablet"
|
||||
comment: "esp32-P4"
|
||||
api_password: !secret display_api
|
||||
ota_password: !secret wifi_password
|
||||
wifi_ssid: !secret wifi_ssid
|
||||
wifi_password: !secret wifi_password
|
||||
|
||||
#espHosted_pins
|
||||
pin_esph_reset: GPIO54
|
||||
pin_esph_cmd: GPIO19
|
||||
pin_esph_clk: GPIO18
|
||||
pin_esph_d0: GPIO14
|
||||
pin_esph_d1: GPIO15
|
||||
pin_esph_d2: GPIO16
|
||||
pin_esph_d3: GPIO17
|
||||
#lcd_pins
|
||||
pin_lcd_reset: GPIO27
|
||||
pin_lcd_bl: GPIO23
|
||||
pin_touch_sda: GPIO7
|
||||
pin_touch_scl: GPIO8
|
||||
pin_touch_rst: GPIO22
|
||||
pin_touch_irq: GPIO21
|
||||
|
||||
packages:
|
||||
board: !include boards/esp32-P4.yaml
|
||||
common: !include common/common.yaml
|
||||
wifi: !include common/wifi_P4.yaml
|
||||
lcd: !include display/guitionJC8012P4A1.yaml
|
||||
#lvgl widgets
|
||||
home: !include widgets/home/home.yaml
|
||||
lights_config: !include widgets/light/lights_config.yaml
|
||||
devices: !include widgets/devices.yaml
|
||||
settings: !include widgets/settings.yaml
|
||||
menu_controls_main: !include widgets/menu_controls_main.yaml
|
||||
loading_page: !include widgets/loading_page.yaml
|
||||
|
||||
#add includes for lvgl widgets
|
||||
esphome:
|
||||
includes:
|
||||
- <sstream>
|
||||
- <algorithm>
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
level: DEBUG
|
||||
logs:
|
||||
lvgl: INFO
|
||||
display: INFO
|
||||
app: DEBUG
|
||||
|
||||
http_request:
|
||||
verify_ssl: false
|
||||
|
||||
ota:
|
||||
- platform: esphome
|
||||
on_begin:
|
||||
then:
|
||||
- logger.log: "OTA gestart, LVGL pauzeren"
|
||||
- lvgl.pause:
|
||||
on_end:
|
||||
then:
|
||||
- logger.log: "OTA klaar, LVGL hervatten"
|
||||
- lvgl.resume:
|
||||
|
||||
external_components:
|
||||
- source: github://pr#9972
|
||||
components: [mapping]
|
||||
refresh: 1h
|
||||
- source: github://willumpie82/esphome@dev
|
||||
components: [mipi_dsi]
|
||||
- source: github://kvj/esphome@jd9365_gsl3680
|
||||
refresh: 0s
|
||||
components: [gsl3680]
|
||||
- source: github://esphome/esphome@2025.7.1
|
||||
components: [i2c]
|
||||
- source: github://youkorr/sd_image@main
|
||||
components: [storage]
|
||||
refresh: 1min
|
||||
- source: github://youkorr/webdavbox3@main
|
||||
components: [sd_mmc_card]
|
||||
refresh: 10s
|
||||
|
||||
image: !include widgets/image.yaml
|
||||
font: !include widgets/fonts.yaml
|
||||
color: !include widgets/colors.yaml
|
||||
|
||||
# -------------------------------
|
||||
# LVGL Display
|
||||
# -------------------------------
|
||||
lvgl:
|
||||
buffer_size: 100%
|
||||
byte_order: little_endian
|
||||
displays: my_display
|
||||
touchscreens:
|
||||
- touchscreen_id: touchscreen_
|
||||
long_press_time: 5000ms
|
||||
long_press_repeat_time: 400ms
|
||||
page_wrap: false
|
||||
|
||||
|
||||
sd_mmc_card:
|
||||
id: sd_card
|
||||
clk_pin: GPIO43
|
||||
cmd_pin: GPIO44
|
||||
data0_pin: GPIO39
|
||||
data1_pin: GPIO40
|
||||
data2_pin: GPIO41
|
||||
data3_pin: GPIO42
|
||||
mode_1bit: false
|
||||
slot: 0
|
||||
Reference in New Issue
Block a user