idk
This commit is contained in:
parent
f2b8e8a280
commit
a53fda923c
3 changed files with 278 additions and 64 deletions
22
display.yml
22
display.yml
|
@ -2,7 +2,7 @@ esphome:
|
|||
name: display
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
board: nodemcu-32s
|
||||
framework:
|
||||
type: arduino
|
||||
|
||||
|
@ -28,18 +28,26 @@ wifi:
|
|||
|
||||
captive_portal:
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 80MHz
|
||||
# psram:
|
||||
# mode: octal
|
||||
# speed: 80MHz
|
||||
|
||||
spi:
|
||||
clk_pin: GPIO33
|
||||
mosi_pin: GPIO18
|
||||
miso_pin: GPIO19
|
||||
|
||||
# Example minimal configuration entry
|
||||
display:
|
||||
- platform: ili9xxx
|
||||
model: ili9486
|
||||
dc_pin: GPIOXX
|
||||
reset_pin: GPIOXX
|
||||
model: ili9488
|
||||
dc_pin: GPIO14
|
||||
reset_pin: GPIO16
|
||||
cs_pin: GPIO17
|
||||
invert_colors: false
|
||||
show_test_card: true
|
||||
color_palette: 8BIT
|
||||
data_rate: 80MHz
|
||||
dimensions:
|
||||
height: 320
|
||||
width: 480
|
||||
|
|
|
@ -42,6 +42,9 @@ sensor:
|
|||
temperature:
|
||||
name: "Temperature"
|
||||
id: temperature
|
||||
filters:
|
||||
offset: -1.3
|
||||
oversampling: 16x
|
||||
pressure:
|
||||
name: "Pressure"
|
||||
id: pressure
|
||||
|
|
317
thermostat.yml
317
thermostat.yml
|
@ -2,9 +2,19 @@ esphome:
|
|||
name: thermostat
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
board: esp32-s3-devkitc-1
|
||||
variant: esp32s3
|
||||
framework:
|
||||
type: arduino
|
||||
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
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 80MHz
|
||||
|
||||
# Enable logging
|
||||
logger:
|
||||
|
@ -29,15 +39,15 @@ wifi:
|
|||
captive_portal:
|
||||
|
||||
i2c:
|
||||
sda: GPIO21
|
||||
scl: GPIO22
|
||||
scan: true
|
||||
sda: GPIO08
|
||||
scl: GPIO09
|
||||
scan: True
|
||||
id: bus_a
|
||||
|
||||
uart:
|
||||
tx_pin: GPIO27
|
||||
rx_pin: GPIO26
|
||||
baud_rate: 115200
|
||||
# uart:
|
||||
# tx_pin: GPIO27
|
||||
# rx_pin: GPIO26
|
||||
# baud_rate: 115200
|
||||
|
||||
sensor:
|
||||
- platform: bme280_i2c
|
||||
|
@ -53,61 +63,68 @@ sensor:
|
|||
i2c_id: bus_a
|
||||
address: 0x76
|
||||
|
||||
dfrobot_sen0395:
|
||||
# dfrobot_sen0395:
|
||||
|
||||
binary_sensor:
|
||||
# Information coming from uart bus
|
||||
- platform: dfrobot_sen0395
|
||||
name: Mmwave UART
|
||||
# binary_sensor:
|
||||
# # Information coming from uart bus
|
||||
# - platform: dfrobot_sen0395
|
||||
# id: mmwave_uart
|
||||
# name: Mmwave UART
|
||||
|
||||
# on_...:
|
||||
# - dfrobot_sen0395.settings:
|
||||
# factory_reset: true
|
||||
# detection_segments:
|
||||
# # Define between one and four segments
|
||||
# - [0cm, 3m]
|
||||
# - [5.1m, 6.6m]
|
||||
# output_latency:
|
||||
# delay_after_detect: 0s
|
||||
# delay_after_disappear: 0s
|
||||
# sensitivity: 7
|
||||
# # on_...:
|
||||
# # - dfrobot_sen0395.settings:
|
||||
# # factory_reset: true
|
||||
# # detection_segments:
|
||||
# # # Define between one and four segments
|
||||
# # - [0cm, 3m]
|
||||
# # - [5.1m, 6.6m]
|
||||
# # output_latency:
|
||||
# # delay_after_detect: 0s
|
||||
# # delay_after_disappear: 0s
|
||||
# # sensitivity: 7
|
||||
|
||||
# Information coming from dedicated gpio (IO2)
|
||||
- platform: gpio
|
||||
name: Mmwave GPIO
|
||||
device_class: motion
|
||||
pin:
|
||||
number: GPIO25
|
||||
mode: INPUT_PULLDOWN
|
||||
# # Information coming from dedicated gpio (IO2)
|
||||
# - platform: gpio
|
||||
# name: Mmwave GPIO
|
||||
# device_class: motion
|
||||
# pin:
|
||||
# number: GPIO25
|
||||
# mode: INPUT_PULLDOWN
|
||||
|
||||
switch:
|
||||
# Switch to turn on/off detection
|
||||
- platform: dfrobot_sen0395
|
||||
type: sensor_active
|
||||
name: Mmwave Active
|
||||
# # Switch to turn on/off detection
|
||||
# - platform: dfrobot_sen0395
|
||||
# type: sensor_active
|
||||
# name: Mmwave Active
|
||||
|
||||
- platform: dfrobot_sen0395
|
||||
type: presence_via_uart
|
||||
name: Mmwave UART active
|
||||
restore_mode: always_on
|
||||
# - platform: dfrobot_sen0395
|
||||
# type: presence_via_uart
|
||||
# name: Mmwave UART active
|
||||
# restore_mode: always_on
|
||||
|
||||
- platform: dfrobot_sen0395
|
||||
type: turn_on_led
|
||||
name: Mmwave Led
|
||||
restore_mode: always_on
|
||||
icon: "mdi:led-on"
|
||||
# - platform: dfrobot_sen0395
|
||||
# type: turn_on_led
|
||||
# name: Mmwave Led
|
||||
# restore_mode: always_on
|
||||
# icon: "mdi:led-on"
|
||||
|
||||
- platform: dfrobot_sen0395
|
||||
type: start_after_boot
|
||||
name: Mmwave Start
|
||||
restore_mode: always_on
|
||||
# - platform: dfrobot_sen0395
|
||||
# type: start_after_boot
|
||||
# name: Mmwave Start
|
||||
# restore_mode: always_on
|
||||
# on_turn_on:
|
||||
# then:
|
||||
# - number.set:
|
||||
# id: sensitivity
|
||||
# value: !lambda |-
|
||||
# return id(mmwave_uart).state + 1;
|
||||
|
||||
- platform: gpio
|
||||
pin: 16
|
||||
id: heater
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
- platform: gpio
|
||||
pin: 17
|
||||
pin: 44
|
||||
id: ac
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
- platform: gpio
|
||||
|
@ -115,6 +132,46 @@ switch:
|
|||
id: fan
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
|
||||
# button:
|
||||
# - platform: template
|
||||
# id: inner_button
|
||||
# on_press:
|
||||
# - dfrobot_sen0395.settings:
|
||||
# sensitivity: !lambda |-
|
||||
# return id(sensitivity).state - 1;
|
||||
|
||||
# - platform: template
|
||||
# id: inner_distance
|
||||
# on_press:
|
||||
# - dfrobot_sen0395.settings:
|
||||
# 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
|
||||
# optimistic: true
|
||||
# min_value: 0.0
|
||||
# max_value: 9.0
|
||||
# step: 0.1
|
||||
# mode: slider
|
||||
# set_action:
|
||||
# - button.press:
|
||||
# id: inner_distance
|
||||
|
||||
climate:
|
||||
- platform: thermostat
|
||||
name: "Thermostat"
|
||||
|
@ -143,10 +200,156 @@ climate:
|
|||
default_target_temperature_low: 67 °F
|
||||
default_target_temperature_high: 76 °F
|
||||
|
||||
# display:
|
||||
# - platform: ili9xxx
|
||||
# model: ili9486
|
||||
# dc_pin: GPIOXX
|
||||
# reset_pin: GPIOXX
|
||||
# invert_colors: false
|
||||
# show_test_card: true
|
||||
# Example minimal configuration entry
|
||||
display:
|
||||
- platform: rpi_dpi_rgb
|
||||
id: my_display
|
||||
auto_clear_enabled: false
|
||||
update_interval: never
|
||||
color_order: RGB
|
||||
pclk_frequency: 14MHz
|
||||
dimensions:
|
||||
width: 800
|
||||
height: 480
|
||||
de_pin:
|
||||
number: 5
|
||||
hsync_pin:
|
||||
number: 46
|
||||
ignore_strapping_warning: true
|
||||
vsync_pin:
|
||||
number: 3
|
||||
ignore_strapping_warning: true
|
||||
pclk_pin: 7
|
||||
pclk_inverted: false
|
||||
hsync_back_porch: 10 #30
|
||||
hsync_front_porch: 20 #210
|
||||
hsync_pulse_width: 10 #30
|
||||
vsync_back_porch: 10 #4
|
||||
vsync_front_porch: 10 #4
|
||||
vsync_pulse_width: 10 #4
|
||||
data_pins:
|
||||
red:
|
||||
- 1 #r3
|
||||
- 2 #r4
|
||||
- 42 #r5
|
||||
- 41 #r6
|
||||
- 40 #r7
|
||||
blue:
|
||||
- 14 #b3
|
||||
- 38 #b4
|
||||
- 18 #b5
|
||||
- 17 #b6
|
||||
- 10 #b7
|
||||
green:
|
||||
- 39 #g2
|
||||
- 0 #g3
|
||||
- 45 #g4
|
||||
- 48 #g5
|
||||
- 47 #g6
|
||||
- 21 #g7
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: chu_nano
|
||||
size: 12
|
||||
|
||||
touchscreen:
|
||||
platform: gt911
|
||||
id: my_touch
|
||||
interrupt_pin: GPIO4
|
||||
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
|
||||
);
|
||||
|
||||
lvgl:
|
||||
buffer_size: 25%
|
||||
pages:
|
||||
- id: clock_page
|
||||
widgets:
|
||||
- obj: # Clock container
|
||||
height: size_content
|
||||
width: 800 #240
|
||||
align: CENTER
|
||||
pad_all: 0
|
||||
border_width: 0
|
||||
bg_color: 0xFFFFFF
|
||||
widgets:
|
||||
- meter: # Clock face
|
||||
height: 400 #220
|
||||
width: 400 #220
|
||||
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
|
||||
|
||||
time:
|
||||
- platform: homeassistant
|
||||
id: time_comp
|
||||
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue