From 96732ec6aefcf4617146ba86ab2d10c084808771 Mon Sep 17 00:00:00 2001 From: Chris Cochrun Date: Wed, 2 Jul 2025 17:05:57 -0500 Subject: [PATCH] yup --- thermostat.yml | 234 ++++++++++++++++++++++++++----------------------- 1 file changed, 122 insertions(+), 112 deletions(-) diff --git a/thermostat.yml b/thermostat.yml index 68e5b9c..1695944 100644 --- a/thermostat.yml +++ b/thermostat.yml @@ -1,16 +1,39 @@ esphome: name: thermostat +# esp32: +# board: esp32-s3-devkitc-1 +# variant: esp32s3 +# framework: +# type: esp-idf +# sdkconfig_options: +# CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y +# CONFIG_ESP32S3_DATA_CACHE_64KB: y +# CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y +# CONFIG_SPIRAM_RODATA: y + esp32: board: esp32-s3-devkitc-1 variant: esp32s3 + flash_size: 8MB framework: type: esp-idf + version: latest sdkconfig_options: - CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y - CONFIG_ESP32S3_DATA_CACHE_64KB: y + CONFIG_IDF_TARGET: "esp32s3" + CONFIG_ESP_DEFAULT_CPU_FREQ_MHZ_240: y + CONFIG_ESPTOOLPY_FLASHMODE_QIO: y + CONFIG_ESPTOOLPY_FLASHFREQ_80M: y + CONFIG_ESPTOOLPY_FLASHSIZE_8MB: y + CONFIG_IDF_EXPERIMENTAL_FEATURES: y CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y + CONFIG_SPIRAM: y + CONFIG_SPIRAM_MODE_OCT: y CONFIG_SPIRAM_RODATA: y + CONFIG_SPIRAM_SPEED_80M: y + CONFIG_FREERTOS_HZ: "1000" + CONFIG_ESP32S3_DATA_CACHE_LINE_64B: y + COMPILER_OPTIMIZATION_SIZE: y psram: mode: octal @@ -19,6 +42,9 @@ psram: # Enable logging logger: +ch422g: + # address: 0x24 + # Enable Home Assistant API api: password: "" @@ -28,8 +54,11 @@ ota: password: "" wifi: - ssid: "Cochrun" - password: "GreasyChicken784" + # ssid: "Cochrun" + # password: "GreasyChicken784" + + ssid: "TFC" + password: "Disciple77" # Enable fallback hotspot (captive portal) in case wifi connection fails ap: @@ -39,10 +68,20 @@ wifi: captive_portal: i2c: - sda: GPIO08 - scl: GPIO09 - scan: True - id: bus_a + - id: bus_a + sda: GPIO08 + scl: GPIO09 + scan: True + # - id: bus_b + # sda: + # pin: + # ch422g: + # number: 6 + # scl: + # pin: + # ch422g: + # number: 5 + # scan: True # uart: # tx_pin: GPIO27 @@ -50,18 +89,15 @@ i2c: # baud_rate: 115200 sensor: - - platform: bme280_i2c + - platform: aht10 + variant: AHT20 temperature: name: "Temperature" id: temperature - pressure: - name: "Pressure" - id: pressure humidity: name: "Humidity" id: humidity - i2c_id: bus_a - address: 0x76 + # address: 0x76 # dfrobot_sen0395: @@ -147,19 +183,6 @@ switch: # detection_segments: # - [0cm, 3.3m] -# number: -# - platform: template -# id: sensitivity -# name: Mmwave sensitivity -# optimistic: true -# min_value: 1 -# max_value: 10 -# step: 1 -# mode: slider -# set_action: -# - button.press: -# id: inner_button - # - platform: template # id: distance # name: Mmwave distance @@ -251,14 +274,17 @@ display: font: - file: "gfonts://Roboto" id: chu_nano - size: 12 + size: 18 touchscreen: - platform: gt911 - id: my_touch - interrupt_pin: GPIO4 - on_touch: - - lambda: |- + - platform: gt911 + id: my_touchscreen + interrupt_pin: 4 + reset_pin: + ch422g: + number: 1 + on_touch: + - lambda: |- ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d", touch.x, touch.y, @@ -266,90 +292,74 @@ touchscreen: touch.y_raw ); +color: + - id: bg + hex: 282A36 + lvgl: buffer_size: 25% + default_font: chu_nano pages: - - id: clock_page + - id: page + bg_color: 0x282A36 widgets: - - obj: # Clock container - height: size_content - width: 800 #240 - align: CENTER - pad_all: 0 - border_width: 0 - bg_color: 0xFFFFFF + - obj: + align: top_mid + width: 800 widgets: - - meter: # Clock face - height: 400 #220 - width: 400 #220 + - slider: # Clock container + pad_top: 30px + align: top_mid + width: 600 + id: heat_id + value: 76 + min_value: 50 + max_value: 100 + - label: + pad_top: 40px align: center - bg_opa: TRANSP - text_color: 0x000000 - scales: - - ticks: # minutes scale - width: 1 - count: 61 - length: 10 - color: 0x000000 - range_from: 0 - range_to: 60 - angle_range: 360 - rotation: 270 - indicators: - - line: - id: minute_hand - width: 3 - color: 0xa6a6a6 - r_mod: -4 - value: 0 - - ticks: # hours scale - width: 1 - count: 12 - length: 1 - major: - stride: 1 - width: 4 - length: 8 - color: 0xC0C0C0 - label_gap: 12 - angle_range: 330 - rotation: 300 - range_from: 1 - range_to: 12 - - indicators: - - line: - id: hour_hand - width: 5 - color: 0xa6a6a6 - r_mod: -30 - value: 0 - angle_range: 360 - rotation: 270 - range_from: 0 - range_to: 720 + text: "Hello World" + text_color: 0xE2E4E5 + - slider: # Clock container + pad_top: 60px + align: top_mid + width: 600 + id: cool_id + value: 68 + min_value: 50 + max_value: 100 + - label: + pad_top: 70px + align: center + text: "Hello World" + text_color: 0xE2E4E5 + - label: + align: center + text: "Hello World" + text_color: 0xE2E4E5 + +# time: +# - platform: homeassistant +# id: time_comp -time: - - platform: homeassistant - id: time_comp +# interval: +# - interval: 30s +# then: +# if: +# condition: +# time.has_time: +# then: +# - script.execute: time_update -interval: - - interval: 30s - then: - if: - condition: - time.has_time: - then: - - script.execute: time_update - -script: - - id: time_update - then: - - lvgl.indicator.update: - id: minute_hand - value: !lambda |- - return id(time_comp).now().minute; - - lvgl.indicator.update: - id: hour_hand - value: !lambda |- - auto now = id(time_comp).now(); - return std::fmod(now.hour, 12) * 60 + now.minute; +# script: +# - id: time_update +# then: +# - lvgl.indicator.update: +# id: minute_hand +# value: !lambda |- +# return id(time_comp).now().minute; +# - lvgl.indicator.update: +# id: hour_hand +# value: !lambda |- +# auto now = id(time_comp).now(); +# return std::fmod(now.hour, 12) * 60 + now.minute;