mirror of
https://github.com/randybb/esphome-configs.git
synced 2026-03-03 07:14:10 +01:00
Migrate from Boards to Variant, remove hardcoded versions, remove customn directories and some cleanup
This commit is contained in:
@@ -12,17 +12,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
# board: m5stamp-pico
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.12
|
||||
# version: 5.3.1
|
||||
# platform_version: 6.9.0
|
||||
|
||||
# external_components:
|
||||
# - source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
166
mcu-atoms3.yaml
166
mcu-atoms3.yaml
@@ -9,8 +9,6 @@ esphome:
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
board_build.flash_mode: dio
|
||||
# on_boot:
|
||||
# - priority: 800
|
||||
# then:
|
||||
@@ -20,17 +18,13 @@ esphome:
|
||||
# id(display_tft).disable();
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
# board: m5stack-atoms3
|
||||
variant: esp32s3
|
||||
flash_size: 8MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: dev
|
||||
# version: 5.1.2
|
||||
# platform_version: 6.6.0
|
||||
version: 5.3.3
|
||||
platform_version: 53.03.12
|
||||
# type: arduino
|
||||
|
||||
ota:
|
||||
- platform: web_server
|
||||
|
||||
pcf8574:
|
||||
- id: 'pcf8574_hub'
|
||||
@@ -55,16 +49,16 @@ web_server:
|
||||
port: 80
|
||||
version: 3
|
||||
|
||||
light:
|
||||
- platform: esp32_rmt_led_strip
|
||||
name: LED
|
||||
id: neo
|
||||
rgb_order: GRB
|
||||
pin: 2
|
||||
num_leds: 1
|
||||
# rmt_channel: 0
|
||||
chipset: ws2812
|
||||
restore_mode: ALWAYS_OFF
|
||||
# light:
|
||||
# - platform: esp32_rmt_led_strip
|
||||
# name: LED
|
||||
# id: neo
|
||||
# rgb_order: GRB
|
||||
# pin: 2
|
||||
# num_leds: 1
|
||||
# # rmt_channel: 0
|
||||
# chipset: ws2812
|
||||
# restore_mode: ALWAYS_OFF
|
||||
|
||||
text:
|
||||
- platform: template
|
||||
@@ -179,10 +173,10 @@ i2c:
|
||||
# strong_pullup: false # enables a strong pullup used to provide the needed current for temperature reading without vcc connected
|
||||
# bus_sleep: true # power down the bus when no transaction is in progres
|
||||
|
||||
one_wire:
|
||||
- platform: gpio
|
||||
pin: 1
|
||||
id: hub_1
|
||||
# one_wire:
|
||||
# - platform: gpio
|
||||
# pin: 1
|
||||
# id: hub_1
|
||||
# - platform: gpio
|
||||
# pin: 2
|
||||
# id: hub_2
|
||||
@@ -205,7 +199,37 @@ m5stack_4relay:
|
||||
# wifi:
|
||||
# use_address: 10.17.240.52
|
||||
|
||||
output:
|
||||
- platform: gpio
|
||||
id: motor_in1
|
||||
pin: 1
|
||||
- platform: gpio
|
||||
id: motor_in2
|
||||
pin: 2
|
||||
|
||||
|
||||
switch:
|
||||
- platform: template
|
||||
name: "Motor Forward"
|
||||
optimistic: true
|
||||
turn_on_action:
|
||||
- output.turn_on: motor_in1
|
||||
- output.turn_off: motor_in2
|
||||
turn_off_action:
|
||||
- output.turn_off: motor_in1
|
||||
- output.turn_off: motor_in2
|
||||
|
||||
- platform: template
|
||||
name: "Motor Back"
|
||||
optimistic: true
|
||||
turn_on_action:
|
||||
- output.turn_off: motor_in1
|
||||
- output.turn_on: motor_in2
|
||||
turn_off_action:
|
||||
- output.turn_off: motor_in1
|
||||
- output.turn_off: motor_in2
|
||||
|
||||
# switch:
|
||||
- platform: m5stack_4relay
|
||||
name: Relay 1
|
||||
id: relay_1
|
||||
@@ -221,7 +245,7 @@ switch:
|
||||
# interlock_wait_time: 1s
|
||||
m5stack_4relay_id: m5stack_relay_1
|
||||
- platform: m5stack_4relay
|
||||
name: elay 3
|
||||
name: Relay 3
|
||||
id: relay_3
|
||||
channel: 3
|
||||
# interlock: &interlock_group_2 [relay_3, relay_4]
|
||||
@@ -391,34 +415,34 @@ display:
|
||||
# it.rectangle(0, 0, 128, 64);
|
||||
|
||||
sensor:
|
||||
- platform: sht3xd
|
||||
i2c_id: i2c_main
|
||||
address: 0x44
|
||||
temperature:
|
||||
name: TEST Temperature
|
||||
humidity:
|
||||
name: TEST Humidity
|
||||
update_interval: 10s
|
||||
- platform: mpu6886
|
||||
address: 0x68
|
||||
i2c_id: i2c_main
|
||||
# accel_x:
|
||||
# name: "${name} MPU6886 Accel X"
|
||||
# accel_y:
|
||||
# name: "${name} MPU6886 Accel Y"
|
||||
# accel_z:
|
||||
# name: "${name} MPU6886 Accel z"
|
||||
# gyro_x:
|
||||
# name: "${name} MPU6886 Gyro X"
|
||||
# gyro_y:
|
||||
# name: "${name} MPU6886 Gyro Y"
|
||||
# gyro_z:
|
||||
# name: "${name} MPU6886 Gyro z"
|
||||
temperature:
|
||||
name: Temperature
|
||||
id: blabla
|
||||
# - platform: sht3xd
|
||||
# i2c_id: i2c_main
|
||||
# address: 0x44
|
||||
# temperature:
|
||||
# name: TEST Temperature
|
||||
# humidity:
|
||||
# name: TEST Humidity
|
||||
# update_interval: 10s
|
||||
# - platform: mpu6886
|
||||
# address: 0x68
|
||||
# i2c_id: i2c_main
|
||||
# # accel_x:
|
||||
# # name: "${name} MPU6886 Accel X"
|
||||
# # accel_y:
|
||||
# # name: "${name} MPU6886 Accel Y"
|
||||
# # accel_z:
|
||||
# # name: "${name} MPU6886 Accel z"
|
||||
# # gyro_x:
|
||||
# # name: "${name} MPU6886 Gyro X"
|
||||
# # gyro_y:
|
||||
# # name: "${name} MPU6886 Gyro Y"
|
||||
# # gyro_z:
|
||||
# # name: "${name} MPU6886 Gyro z"
|
||||
# temperature:
|
||||
# name: Temperature
|
||||
# id: blabla
|
||||
- platform: homeassistant
|
||||
id: test_humidity
|
||||
id: test_humidity_ha
|
||||
entity_id: sensor.humidity_158d0001c2a1d1
|
||||
# - platform: ds248x
|
||||
# address: 0x8b0516b39804ff28
|
||||
@@ -436,25 +460,25 @@ sensor:
|
||||
# address: 0x810516b3c69fff28
|
||||
# name: "${name} Dallas Temp 4"
|
||||
# resolution: 12
|
||||
- platform: dallas_temp
|
||||
address: 0xdb041750eae2ff28
|
||||
name: Dallas Temp 1
|
||||
one_wire_id: hub_1
|
||||
update_interval: 10s
|
||||
- platform: dallas_temp
|
||||
address: 0xb2041750cf1aff28
|
||||
name: Dallas Temp 2
|
||||
one_wire_id: hub_1
|
||||
update_interval: 30s
|
||||
- platform: dallas_temp
|
||||
address: 0xcd01191eb8b07128
|
||||
name: Dallas Temp 3
|
||||
one_wire_id: hub_1
|
||||
update_interval: 45s
|
||||
- platform: dallas_temp
|
||||
address: 0x5a01191ef3375b28
|
||||
name: Dallas Temp 4
|
||||
one_wire_id: hub_1
|
||||
# - platform: dallas_temp
|
||||
# address: 0xdb041750eae2ff28
|
||||
# name: Dallas Temp 1
|
||||
# one_wire_id: hub_1
|
||||
# update_interval: 10s
|
||||
# - platform: dallas_temp
|
||||
# address: 0xb2041750cf1aff28
|
||||
# name: Dallas Temp 2
|
||||
# one_wire_id: hub_1
|
||||
# update_interval: 30s
|
||||
# - platform: dallas_temp
|
||||
# address: 0xcd01191eb8b07128
|
||||
# name: Dallas Temp 3
|
||||
# one_wire_id: hub_1
|
||||
# update_interval: 45s
|
||||
# - platform: dallas_temp
|
||||
# address: 0x5a01191ef3375b28
|
||||
# name: Dallas Temp 4
|
||||
# one_wire_id: hub_1
|
||||
|
||||
time:
|
||||
- !include common/time/homeassistant.yaml
|
||||
|
||||
@@ -12,11 +12,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
sdkconfig_options:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
advanced:
|
||||
|
||||
@@ -12,11 +12,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
sdkconfig_options:
|
||||
CONFIG_FREERTOS_UNICORE: y
|
||||
advanced:
|
||||
|
||||
@@ -36,13 +36,12 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitc-1
|
||||
variant: esp32c6
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# version: 5.4.2
|
||||
# platform_version: 54.03.21
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
|
||||
@@ -36,13 +36,12 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: esp32-c6-devkitc-1
|
||||
variant: esp32c6
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# version: 5.4.2
|
||||
# platform_version: 54.03.21
|
||||
|
||||
logger:
|
||||
hardware_uart: USB_SERIAL_JTAG
|
||||
|
||||
@@ -11,30 +11,30 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32cam
|
||||
# board: esp32cam
|
||||
variant: esp32
|
||||
framework:
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
# version: 2.0.14
|
||||
# platform_version: 6.5.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
# external_components:
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/MichaKersloot/esphome_custom_components
|
||||
# components: [ esp32_camera ]
|
||||
i2c:
|
||||
id: i2c_bus
|
||||
sda: 26
|
||||
scl: 27
|
||||
scan: true
|
||||
|
||||
psram:
|
||||
mode: quad
|
||||
speed: 40MHz
|
||||
|
||||
esp32_camera:
|
||||
name: Camera
|
||||
external_clock:
|
||||
pin: 0
|
||||
frequency: 20MHz
|
||||
i2c_pins:
|
||||
sda: 26
|
||||
scl: 27
|
||||
i2c_id: i2c_bus
|
||||
data_pins: [5, 18, 19, 21, 36, 39, 34, 35]
|
||||
vsync_pin: 25
|
||||
href_pin: 23
|
||||
@@ -44,7 +44,7 @@ esp32_camera:
|
||||
switch:
|
||||
- platform: gpio
|
||||
pin: 32
|
||||
# restore_mode: ALWAYS_ON
|
||||
restore_mode: ALWAYS_ON
|
||||
# id: "cam_power_down"
|
||||
name: Enable
|
||||
|
||||
|
||||
@@ -11,11 +11,11 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.11
|
||||
# version: 5.4.2
|
||||
# platform_version: 54.03.21
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen@dev
|
||||
|
||||
@@ -11,11 +11,11 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.11
|
||||
version: 5.4.2
|
||||
platform_version: 54.03.21
|
||||
|
||||
external_components:
|
||||
- source: github://mrk-its/esphome-canopen@dev
|
||||
|
||||
@@ -11,19 +11,19 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
# - source: github://pr#3017
|
||||
# components: [hdmi_cec]
|
||||
# refresh: 1h
|
||||
- source: github://Palakis/esphome-hdmi-cec
|
||||
refresh: 1h
|
||||
# - source: github://Palakis/esphome-hdmi-cec
|
||||
# refresh: 1h
|
||||
- source: github://pr#9189
|
||||
components: [hdmi_cec]
|
||||
refresh: 0min
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -131,6 +131,9 @@ hdmi_cec:
|
||||
physical_address: 0x4000
|
||||
pin: 26
|
||||
on_message:
|
||||
- opcode: 0x36 # opcode for "Standby"
|
||||
then:
|
||||
logger.log: "Got Standby command"
|
||||
- opcode: 0xC3 # Request ARC start
|
||||
then:
|
||||
- hdmi_cec.send: # Report ARC started
|
||||
|
||||
@@ -13,12 +13,11 @@ esphome:
|
||||
board_build.flash_mode: dio
|
||||
|
||||
esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.3
|
||||
platform_version: 53.03.12
|
||||
# version: 5.4.2
|
||||
# platform_version: 54.03.21
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
substitutions:
|
||||
device: clock-living-room
|
||||
name: Living room Clock
|
||||
area: Living Room / Kitchen
|
||||
area: Living Room & Kitchen
|
||||
comment: "${area}: TV Rack Clock"
|
||||
|
||||
esphome:
|
||||
@@ -11,11 +11,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.12
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
|
||||
@@ -11,17 +11,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
# external_components:
|
||||
# - source: github://pr#7958
|
||||
# refresh: 0s
|
||||
# components:
|
||||
# - rotary_encoder
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -31,24 +31,97 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.12
|
||||
|
||||
external_components:
|
||||
- source: github://pr#7072
|
||||
components: ac_dimmer
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
# fan:
|
||||
# - platform: speed
|
||||
# output: fan_dimmer1
|
||||
# id: fan1
|
||||
# name: Exercise Room
|
||||
# speed_count: 5
|
||||
# preset_modes:
|
||||
# - 50%
|
||||
# - 60%
|
||||
# - 70%
|
||||
# - 80%
|
||||
# - 90%
|
||||
# - 100%
|
||||
# on_preset_set:
|
||||
# then:
|
||||
# - fan.turn_on:
|
||||
# id: fan1
|
||||
# speed: !lambda |-
|
||||
# return x.c_str();
|
||||
# # default_transition_length: 10s
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: Exercise Room Fan 50 %
|
||||
on_press:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dimmer1
|
||||
level: 50%
|
||||
- platform: template
|
||||
name: Exercise Room Fan 60 %
|
||||
on_press:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dimmer1
|
||||
level: 60%
|
||||
- platform: template
|
||||
name: Exercise Room Fan 70 %
|
||||
on_press:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dimmer1
|
||||
level: 70%
|
||||
- platform: template
|
||||
name: Exercise Room Fan 80 %
|
||||
on_press:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dimmer1
|
||||
level: 80%
|
||||
- platform: template
|
||||
name: Exercise Room Fan 90 %
|
||||
on_press:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dimmer1
|
||||
level: 90%
|
||||
- platform: template
|
||||
name: Exercise Room Fan 100 %
|
||||
on_press:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dimmer1
|
||||
level: 100%
|
||||
- platform: template
|
||||
name: Exercise Room Fan +10 %
|
||||
on_press:
|
||||
then:
|
||||
- light.dim_relative:
|
||||
id: fan_dimmer1
|
||||
relative_brightness: 10%
|
||||
- platform: template
|
||||
name: Exercise Room Fan -10 %
|
||||
on_press:
|
||||
then:
|
||||
- light.dim_relative:
|
||||
id: fan_dimmer1
|
||||
relative_brightness: -10%
|
||||
|
||||
light:
|
||||
- platform: monochromatic
|
||||
output: dimmer1
|
||||
id: fan_dimmer1
|
||||
name: Exercise Room Fan
|
||||
default_transition_length: 10s
|
||||
- platform: esp32_rmt_led_strip
|
||||
|
||||
@@ -12,7 +12,7 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: arduino
|
||||
# version: 2.0.14
|
||||
@@ -83,7 +83,6 @@ light:
|
||||
rgb_order: GRB
|
||||
pin: 27
|
||||
num_leds: 1
|
||||
rmt_channel: 0
|
||||
chipset: ws2812
|
||||
|
||||
# output:
|
||||
|
||||
129
mcu-echo.yaml
129
mcu-echo.yaml
@@ -12,34 +12,22 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
# - source:
|
||||
# type: git
|
||||
# url: https://github.com/gnumpi/esphome_audio
|
||||
# ref: dev-next
|
||||
# components: [ adf_pipeline, i2s_audio ]
|
||||
# refresh: 0s
|
||||
|
||||
packages:
|
||||
common: !include common/common_esp8266.yaml
|
||||
common: !include common/common.yaml
|
||||
|
||||
# api:
|
||||
# services:
|
||||
# # https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h
|
||||
# - service: play_rtttl
|
||||
# variables:
|
||||
# song: string
|
||||
# then:
|
||||
# - rtttl.play:
|
||||
# rtttl: !lambda 'return song;'
|
||||
api:
|
||||
services:
|
||||
# https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h
|
||||
- service: play_rtttl
|
||||
variables:
|
||||
song: string
|
||||
then:
|
||||
- rtttl.play:
|
||||
rtttl: !lambda 'return song;'
|
||||
|
||||
i2c:
|
||||
sda: 26
|
||||
@@ -101,19 +89,24 @@ output:
|
||||
allow_other_uses: true
|
||||
|
||||
i2s_audio:
|
||||
i2s_lrclk_pin: 33
|
||||
i2s_bclk_pin: 19
|
||||
- id: speaker_bus
|
||||
i2s_lrclk_pin: 33
|
||||
i2s_bclk_pin: 19
|
||||
|
||||
speaker:
|
||||
- platform: i2s_audio
|
||||
id: speaker_id
|
||||
i2s_audio_id: speaker_bus
|
||||
dac_type: external
|
||||
i2s_dout_pin: 22
|
||||
channel: mono
|
||||
sample_rate: 48000
|
||||
buffer_duration: 100ms # Smaller buffer
|
||||
- platform: mixer
|
||||
id: mixer_speaker_id
|
||||
output_speaker: speaker_id
|
||||
num_channels: 1
|
||||
task_stack_in_psram: false
|
||||
source_speakers:
|
||||
- id: announcement_spk_mixer_input
|
||||
- id: media_spk_mixer_input
|
||||
@@ -132,10 +125,17 @@ media_player:
|
||||
- platform: speaker
|
||||
id: media_out
|
||||
name: Player
|
||||
codec_support_enabled: false
|
||||
media_pipeline:
|
||||
speaker: media_spk_resampling_input
|
||||
speaker: media_spk_resampling_input
|
||||
# format: WAV
|
||||
# num_channels: 1
|
||||
# sample_rate: 8000 # Lower sample rate
|
||||
announcement_pipeline:
|
||||
speaker: announcement_spk_resampling_input
|
||||
speaker: announcement_spk_resampling_input
|
||||
# format: WAV
|
||||
# num_channels: 1
|
||||
# sample_rate: 8000 # Lower sample rate
|
||||
on_play:
|
||||
- light.turn_on: led_light
|
||||
on_idle:
|
||||
@@ -145,6 +145,81 @@ rtttl:
|
||||
id: my_rtttl
|
||||
speaker: rtttl_spk_resampling_input
|
||||
|
||||
button:
|
||||
- platform: template
|
||||
name: "Jump Sound"
|
||||
on_press:
|
||||
- if:
|
||||
condition:
|
||||
lambda: return !id(speaker_id)->is_running();
|
||||
then:
|
||||
- lambda: id(speaker_id)->start();
|
||||
- delay: 50ms
|
||||
- lambda: |-
|
||||
static std::vector<int16_t> buffer;
|
||||
const int duration_ms = 300;
|
||||
const int samples = (16000 * duration_ms) / 1000;
|
||||
buffer.resize(samples);
|
||||
for (int i = 0; i < samples; i++) {
|
||||
float progress = i / (float)samples;
|
||||
float bounce = sin(progress * M_PI * 3) * 0.3;
|
||||
float pitch_freq = 400 + (600 * progress) + (bounce * 200);
|
||||
float envelope = exp(-progress * 4);
|
||||
float phase = (i * pitch_freq * 2 * M_PI) / 16000;
|
||||
buffer[i] = (int16_t)(1024 * sin(phase) * envelope);
|
||||
}
|
||||
id(speaker_id)->play((uint8_t*)buffer.data(), buffer.size() * 2);
|
||||
id(speaker_id)->finish();
|
||||
- platform: template
|
||||
name: "Coin Sound"
|
||||
on_press:
|
||||
- if:
|
||||
condition:
|
||||
lambda: return !id(speaker_id)->is_running();
|
||||
then:
|
||||
- lambda: id(speaker_id)->start();
|
||||
- delay: 50ms
|
||||
- lambda: |-
|
||||
static std::vector<int16_t> buffer;
|
||||
const int duration_ms = 100;
|
||||
const int samples = (16000 * duration_ms) / 1000;
|
||||
buffer.resize(samples);
|
||||
float phase = 0;
|
||||
for (int i = 0; i < samples; i++) {
|
||||
float progress = i / (float)samples;
|
||||
float freq = (progress < 0.5) ? 988 : 1319;
|
||||
float envelope = 1.0 - (progress * 0.7);
|
||||
phase += (freq * 2 * M_PI) / 16000;
|
||||
float square = (sin(phase) > 0) ? 1.0 : -1.0;
|
||||
buffer[i] = (int16_t)(2048 * square * envelope);
|
||||
}
|
||||
id(speaker_id)->play((uint8_t*)buffer.data(), buffer.size() * 2);
|
||||
id(speaker_id)->finish();
|
||||
- platform: template
|
||||
name: "Fireball Sound"
|
||||
on_press:
|
||||
- if:
|
||||
condition:
|
||||
lambda: return !id(speaker_id)->is_running();
|
||||
then:
|
||||
- lambda: id(speaker_id)->start();
|
||||
- delay: 50ms
|
||||
- lambda: |-
|
||||
static std::vector<int16_t> buffer;
|
||||
const int duration_ms = 300;
|
||||
const int samples = (16000 * duration_ms) / 1000;
|
||||
buffer.resize(samples);
|
||||
for (int i = 0; i < samples; i++) {
|
||||
float progress = i / (float)samples;
|
||||
float pitch_freq = 800 * exp(-progress * 3);
|
||||
float noise = (rand() % 100) / 100.0 * 0.3;
|
||||
float envelope = exp(-progress * 2);
|
||||
float phase = (i * pitch_freq * 2 * M_PI) / 16000;
|
||||
buffer[i] = (int16_t)(1024 * (sin(phase) * 0.7 + noise) * envelope);
|
||||
}
|
||||
id(speaker_id)->play((uint8_t*)buffer.data(), buffer.size() * 2);
|
||||
id(speaker_id)->finish();
|
||||
|
||||
# microphone:
|
||||
# - platform: i2s_audio
|
||||
# i2s_din_pin: 23
|
||||
|
||||
@@ -11,12 +11,9 @@ esphome:
|
||||
board_build.flash_mode: dio
|
||||
|
||||
esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -142,7 +139,7 @@ binary_sensor:
|
||||
mode: INPUT
|
||||
inverted: false
|
||||
- platform: gpio
|
||||
name: "PCF8574 Pin #15"
|
||||
name: "PCF8574 Pin #16"
|
||||
pin:
|
||||
pcf8574: pcf8574_hub
|
||||
number: 14
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
substitutions:
|
||||
device: fireplace
|
||||
name: Heating Fireplace
|
||||
area: Living Room / Kitchen
|
||||
area: Living Room & Kitchen
|
||||
comment: "${area}, Fireplace | Fireplace monitoring for heating"
|
||||
|
||||
esphome:
|
||||
@@ -11,15 +11,17 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: github://mknjc/esphome@ds248x
|
||||
components: ds248x
|
||||
# - source: github://pr#12717
|
||||
# components: [ds248x]
|
||||
# refresh: 1h
|
||||
- source: github://pr#13534
|
||||
components: [ds2482, ds2484, ds248x_base]
|
||||
refresh: 1h
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -55,13 +57,32 @@ i2c:
|
||||
scl: 21
|
||||
scan: true #false
|
||||
|
||||
ds248x:
|
||||
# i2c_id: i2c_main
|
||||
address: 0x18 # should be the default
|
||||
# sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress
|
||||
active_pullup: true # adds a active pullup which should improve signal integrity
|
||||
strong_pullup: false # enables a strong pullup used to provide the needed current for temperature reading without vcc connected
|
||||
bus_sleep: true # power down the bus when no transaction is in progres
|
||||
# ds248x:
|
||||
# # i2c_id: i2c_main
|
||||
# address: 0x18 # should be the default
|
||||
# # sleep_pin: 32 # remove if not needed, if set the ds248x sleeps when no transaction is in progress
|
||||
# active_pullup: true # adds a active pullup which should improve signal integrity
|
||||
# strong_pullup: false # enables a strong pullup used to provide the needed current for temperature reading without vcc connected
|
||||
# bus_sleep: true # power down the bus when no transaction is in progres
|
||||
|
||||
# one_wire:
|
||||
# id: one_wire_bus
|
||||
# platform: ds2484
|
||||
# active_pullup: true
|
||||
|
||||
# ds248x:
|
||||
# id: ds2484_module
|
||||
# address: 0x18
|
||||
|
||||
# one_wire:
|
||||
# - platform: ds248x
|
||||
# ds248x_id: ds2484_module
|
||||
# id: one_wire_bus
|
||||
|
||||
one_wire:
|
||||
id: one_wire_bus
|
||||
platform: ds2482
|
||||
active_pullup: true
|
||||
|
||||
pca9554:
|
||||
- id: pca9554_module
|
||||
@@ -102,7 +123,8 @@ binary_sensor:
|
||||
- delayed_off: 300ms
|
||||
|
||||
sensor:
|
||||
- platform: ds248x
|
||||
# - platform: ds248x
|
||||
- platform: dallas_temp
|
||||
address: 0x6203168B32A7FF28
|
||||
# index: 0
|
||||
name: Temperature
|
||||
@@ -117,3 +139,6 @@ sensor:
|
||||
# id: 'kitchen_humidity'
|
||||
# update_interval: 60s
|
||||
# model: si7021
|
||||
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
|
||||
@@ -11,14 +11,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -11,28 +11,18 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: esp32doit-devkit-v1
|
||||
variant: esp32
|
||||
framework:
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
type: esp-idf
|
||||
|
||||
external_components:
|
||||
- source: github://pr#8457
|
||||
components: ethernet
|
||||
# - source: github://pr#4080
|
||||
# components: [lcd_pcf8574, lcd_base]
|
||||
# - source: github://pr#3564
|
||||
# refresh: 0s
|
||||
# components:
|
||||
# - esp32
|
||||
# - ethernet_info
|
||||
# - ethernet
|
||||
# # - wifi
|
||||
# - source: github://pr#2112
|
||||
# components: ["m5stack_4relay"]
|
||||
# refresh: 1h
|
||||
# - source: components
|
||||
# Ethernet LLDP 802.1AB transmitter
|
||||
- source: github://pr#11760
|
||||
components: [ethernet]
|
||||
refresh: 1h
|
||||
- source: github://pr#2112
|
||||
components: ["m5stack_4relay"]
|
||||
refresh: 1h
|
||||
|
||||
packages:
|
||||
# common: !include common/common.yaml
|
||||
@@ -59,6 +49,23 @@ i2c:
|
||||
scl: 16
|
||||
scan: true
|
||||
|
||||
ethernet:
|
||||
lldp:
|
||||
# Enable LLDP transmission
|
||||
#enabled: true
|
||||
# Optional: override default port
|
||||
port: "test-port"
|
||||
# Optional: override default system name
|
||||
system_name: "test-system"
|
||||
# Optional: override default system description
|
||||
system_description: "test-description"
|
||||
# Optional: override default "fast mode" burst packet count
|
||||
tx_fast_count: 4
|
||||
# Optional: override default LLDP frame transmission interval
|
||||
tx_interval: 30
|
||||
# Optional: override default hold count, used in conjuction with tx_interval to calculate overall TTL
|
||||
tx_hold: 4
|
||||
|
||||
# ethernet:
|
||||
# type: LAN8720
|
||||
# mdc_pin: 23
|
||||
@@ -200,6 +207,12 @@ esp32_ble_tracker:
|
||||
interval: 1100ms
|
||||
window: 1100ms
|
||||
active: true
|
||||
on_ble_advertise:
|
||||
- mac_address:
|
||||
- D5:63:3C:12:E6:07
|
||||
then:
|
||||
- lambda: |-
|
||||
ESP_LOGV("ble_adv", "Detected HPA250B");
|
||||
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
substitutions:
|
||||
device: kitchen
|
||||
name: Kitchen
|
||||
area: Living Room / Kitchen
|
||||
area: Living Room & Kitchen
|
||||
comment: "${area} | Kitchen Worktop and Stove Lights"
|
||||
|
||||
esphome:
|
||||
@@ -29,11 +29,9 @@ esphome:
|
||||
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -124,8 +122,8 @@ light:
|
||||
id: light_3
|
||||
default_transition_length: 200ms
|
||||
restore_mode: ALWAYS_ON
|
||||
cold_white: pwm_ww_3
|
||||
warm_white: pwm_cw_3
|
||||
cold_white: pwm_cw_3
|
||||
warm_white: pwm_ww_3
|
||||
cold_white_color_temperature: 6536 K
|
||||
warm_white_color_temperature: 2000 K
|
||||
# - platform: cwww
|
||||
@@ -205,3 +203,6 @@ power_supply:
|
||||
# name: "${name} Relay Spare"
|
||||
# id: relay_2
|
||||
# pin: 19
|
||||
|
||||
bluetooth_proxy:
|
||||
active: true
|
||||
|
||||
@@ -12,12 +12,9 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
# board: m5stamp-pico
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.1
|
||||
platform_version: 6.9.0
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
|
||||
@@ -9,36 +9,17 @@ esphome:
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
platformio_options:
|
||||
upload_speed: 921600
|
||||
build_unflags: -Werror=all
|
||||
board_build.flash_mode: dio
|
||||
board_build.f_flash: 80000000L
|
||||
board_build.f_cpu: 240000000L
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
variant: esp32s3
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
|
||||
CONFIG_ESP32S3_DATA_CACHE_64KB: y
|
||||
CONFIG_ESP32S3_DATA_CACHE_LINE_64B: y
|
||||
CONFIG_SPIRAM_FETCH_INSTRUCTIONS: y
|
||||
CONFIG_SPIRAM_RODATA: y
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
external_components:
|
||||
#- source: github://buglloc/esphome-components
|
||||
#- source: github://Garag/esphome-components
|
||||
- source: github://clowrey/esphome-components
|
||||
components: [axs15231]
|
||||
refresh: 10min
|
||||
# external_components:
|
||||
|
||||
i2c:
|
||||
sda: 4
|
||||
@@ -116,8 +97,14 @@ globals:
|
||||
type: Color
|
||||
initial_value: "Color::random_color()"
|
||||
|
||||
power_supply:
|
||||
id: main_backlight
|
||||
pin: 1
|
||||
enable_on_boot: true
|
||||
|
||||
display:
|
||||
- platform: axs15231
|
||||
- platform: qspi_dbi
|
||||
model: axs15231
|
||||
data_rate: 40MHz #20mhz is default
|
||||
#spi_mode: MODE2
|
||||
id: main_display
|
||||
@@ -126,10 +113,7 @@ display:
|
||||
height: 480
|
||||
width: 320
|
||||
cs_pin: 45
|
||||
backlight_pin: 1
|
||||
brightness: 50
|
||||
transform:
|
||||
swap_xy: false
|
||||
rotation: 90
|
||||
auto_clear_enabled: false
|
||||
show_test_card: true
|
||||
|
||||
289
mcu-lvgl-trainer.yaml
Normal file
289
mcu-lvgl-trainer.yaml
Normal file
@@ -0,0 +1,289 @@
|
||||
substitutions:
|
||||
device: lvgl-trainer
|
||||
name: Trainer Display
|
||||
area: Basement
|
||||
comment: "${area} | Pain Cave"
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
variant: esp32s3
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
i2c:
|
||||
- id: touchscreen_bus
|
||||
sda: 4
|
||||
scl: 8
|
||||
|
||||
psram:
|
||||
mode: octal
|
||||
speed: 80MHz
|
||||
|
||||
spi:
|
||||
id: display_qspi
|
||||
type: quad
|
||||
clk_pin: 47
|
||||
data_pins: [21, 48, 40, 39]
|
||||
|
||||
color:
|
||||
- id: my_red
|
||||
red: 100%
|
||||
green: 0%
|
||||
blue: 0%
|
||||
- id: my_orange
|
||||
red: 100%
|
||||
green: 50%
|
||||
blue: 0%
|
||||
- id: my_yellow
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- id: my_green
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 0%
|
||||
- id: my_blue
|
||||
red: 0%
|
||||
green: 0%
|
||||
blue: 100%
|
||||
- id: my_teal
|
||||
red: 0%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
- id: my_gray
|
||||
red: 70%
|
||||
green: 70%
|
||||
blue: 70%
|
||||
- id: my_white
|
||||
red: 100%
|
||||
green: 100%
|
||||
blue: 100%
|
||||
|
||||
font:
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_48
|
||||
size: 48
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_36
|
||||
size: 36
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_24
|
||||
size: 24
|
||||
- file: "gfonts://Roboto"
|
||||
id: Roboto_12
|
||||
size: 12
|
||||
- file: "gfonts://Roboto"
|
||||
id: font_std
|
||||
size: 40
|
||||
glyphs: "!\"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz/\\[]|&@#'"
|
||||
- file: "gfonts://Roboto@700"
|
||||
id: font_title
|
||||
size: 40
|
||||
glyphs: "!\"%()+=,-_.:°0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz/\\[]|&@#'"
|
||||
|
||||
globals:
|
||||
- id: bgcolor
|
||||
type: Color
|
||||
initial_value: "Color::random_color()"
|
||||
|
||||
# power_supply:
|
||||
# id: main_backlight
|
||||
# pin: 1
|
||||
# enable_on_boot: true
|
||||
|
||||
output:
|
||||
- platform: ledc
|
||||
id: gpio_backlight_pwm
|
||||
pin: 1
|
||||
|
||||
light:
|
||||
- id: display_backlight
|
||||
name: Backlight
|
||||
platform: monochromatic
|
||||
output: gpio_backlight_pwm
|
||||
restore_mode: ALWAYS_ON
|
||||
default_transition_length: 500ms
|
||||
|
||||
display:
|
||||
- platform: qspi_dbi
|
||||
model: axs15231
|
||||
data_rate: 40MHz #20mhz is default
|
||||
#spi_mode: MODE2
|
||||
id: main_display
|
||||
spi_id: display_qspi
|
||||
dimensions:
|
||||
height: 480
|
||||
width: 320
|
||||
cs_pin: 45
|
||||
brightness: 50
|
||||
rotation: 90
|
||||
auto_clear_enabled: false
|
||||
# show_test_card: true
|
||||
# lambda: |-
|
||||
# it.fill(id(bgcolor));
|
||||
# it.print(it.get_width()/2, it.get_height()/2-20, id(font_title), TextAlign::CENTER, "ESPHome");
|
||||
# it.print(it.get_width()/2, it.get_height()/2+20, id(font_std), TextAlign::CENTER, "@UTBDK");
|
||||
|
||||
touchscreen:
|
||||
- platform: axs15231
|
||||
id: main_touch
|
||||
display: main_display
|
||||
i2c_id: touchscreen_bus
|
||||
update_interval: 100ms
|
||||
# interrupt_pin:
|
||||
# number: 3
|
||||
# ignore_strapping_warning: true
|
||||
calibration:
|
||||
x_min: 0
|
||||
x_max: 479
|
||||
y_min: 0
|
||||
y_max: 319
|
||||
transform:
|
||||
swap_xy: true
|
||||
mirror_x: false
|
||||
mirror_y: true
|
||||
# on_touch:
|
||||
# - lambda: |-
|
||||
# Color newColor;
|
||||
# do { newColor = Color::random_color(); } while (newColor == id(bgcolor));
|
||||
# id(bgcolor) = newColor;
|
||||
|
||||
# ESP_LOGI("cal", "x=%d, y=%d, x_raw=%d, y_raw=%0d",
|
||||
# touch.x,
|
||||
# touch.y,
|
||||
# touch.x_raw,
|
||||
# touch.y_raw
|
||||
# );
|
||||
on_release:
|
||||
- if:
|
||||
condition: lvgl.is_paused
|
||||
then:
|
||||
- lvgl.resume:
|
||||
- lvgl.widget.redraw:
|
||||
- light.turn_on:
|
||||
id: display_backlight
|
||||
transition_length: 300ms
|
||||
|
||||
uart:
|
||||
- id: ext_uart
|
||||
tx_pin: 43
|
||||
rx_pin: 44
|
||||
baud_rate: 115200
|
||||
stop_bits: 1
|
||||
parity: NONE
|
||||
|
||||
binary_sensor:
|
||||
- platform: homeassistant
|
||||
id: exercise_room_light
|
||||
entity_id: light.exercise_room
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
then:
|
||||
lvgl.widget.update:
|
||||
id: exercise_room_light_btn
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
- platform: homeassistant
|
||||
id: exercise_room_fan
|
||||
entity_id: light.mcu_dimmer_exercise_room_fan
|
||||
publish_initial_state: true
|
||||
on_state:
|
||||
then:
|
||||
lvgl.widget.update:
|
||||
id: exercise_room_fan_btn
|
||||
state:
|
||||
checked: !lambda return x;
|
||||
|
||||
lvgl:
|
||||
buffer_size: 100%
|
||||
log_level: WARN
|
||||
color_depth: 16
|
||||
default_font: montserrat_18
|
||||
# on_idle:
|
||||
# - timeout: !lambda "return (id(display_timeout).state * 1000);"
|
||||
# then:
|
||||
# - logger.log: "LVGL is idle"
|
||||
# - light.turn_off:
|
||||
# id: display_backlight
|
||||
# transition_length: 2500ms
|
||||
# - lvgl.pause:
|
||||
top_layer:
|
||||
widgets:
|
||||
- buttonmatrix:
|
||||
align: bottom_mid
|
||||
# styles: header_footer
|
||||
pad_all: 0
|
||||
outline_width: 0
|
||||
id: top_layer
|
||||
# items:
|
||||
# styles: header_footer
|
||||
rows:
|
||||
- buttons:
|
||||
- id: page_prev
|
||||
text: "\uF053"
|
||||
on_press:
|
||||
then:
|
||||
lvgl.page.previous:
|
||||
- id: page_home
|
||||
text: "\uF015"
|
||||
on_press:
|
||||
then:
|
||||
lvgl.page.show: main_page
|
||||
- id: page_next
|
||||
text: "\uF054"
|
||||
on_press:
|
||||
then:
|
||||
lvgl.page.next:
|
||||
pages:
|
||||
- id: main_page
|
||||
widgets:
|
||||
- label:
|
||||
text: "ESPHome LVGL Display"
|
||||
align: CENTER
|
||||
text_align: CENTER
|
||||
text_color: 0xFFFFFF
|
||||
- id: excercise_page
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: 'Hello World!'
|
||||
- button:
|
||||
id: exercise_room_light_btn
|
||||
align: TOP_LEFT
|
||||
width: 100
|
||||
height: 70
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: 'Light'
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.exercise_room
|
||||
- button:
|
||||
id: exercise_room_fan_btn
|
||||
align: TOP_RIGHT
|
||||
width: 100
|
||||
height: 70
|
||||
checkable: true
|
||||
widgets:
|
||||
- label:
|
||||
align: CENTER
|
||||
text: 'Fan'
|
||||
on_click:
|
||||
- homeassistant.action:
|
||||
action: light.toggle
|
||||
data:
|
||||
entity_id: light.mcu_dimmer_exercise_room_fan
|
||||
@@ -14,13 +14,10 @@ esphome:
|
||||
includes: ota.h
|
||||
|
||||
esp32:
|
||||
board: esp32-s3-devkitc-1
|
||||
variant: esp32s3
|
||||
flash_size: 16MB
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# Required to achieve sufficient PSRAM bandwidth
|
||||
sdkconfig_options:
|
||||
CONFIG_ESP32S3_DEFAULT_CPU_FREQ_240: y
|
||||
|
||||
@@ -6,38 +6,19 @@ substitutions:
|
||||
|
||||
esphome:
|
||||
name: mcu-${device}
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-core2
|
||||
variant: esp32
|
||||
framework:
|
||||
# type: arduino
|
||||
type: esp-idf
|
||||
|
||||
psram:
|
||||
|
||||
external_components:
|
||||
# - source: github://pr#4027
|
||||
# refresh: 0s
|
||||
# components:
|
||||
# # - bm8563
|
||||
# - gt911
|
||||
# - it8951e
|
||||
# - m5paper
|
||||
# - spi
|
||||
- source:
|
||||
type: git
|
||||
url: https://github.com/Passific/m5paper_esphome
|
||||
ref: main
|
||||
components:
|
||||
- bm8563
|
||||
- gt911
|
||||
- it8951e
|
||||
- m5paper
|
||||
- spi
|
||||
# external_components:
|
||||
# - source: components
|
||||
- source: github://Passific/m5paper_esphome
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -55,9 +36,9 @@ time:
|
||||
m5paper:
|
||||
battery_power_pin: GPIO5
|
||||
main_power_pin: GPIO2
|
||||
update_interval: 10s
|
||||
battery_voltage:
|
||||
name: "${name} Battery"
|
||||
# update_interval: 10s
|
||||
# battery_voltage:
|
||||
# name: "${name} Battery"
|
||||
|
||||
# 0x44 SHT30
|
||||
# 0x50
|
||||
@@ -142,7 +123,7 @@ font:
|
||||
display:
|
||||
- platform: it8951e
|
||||
id: m5paper_display
|
||||
display_cs_pin: GPIO15
|
||||
cs_pin: GPIO15
|
||||
reset_pin: GPIO23
|
||||
busy_pin: GPIO27
|
||||
rotation: 90
|
||||
@@ -169,10 +150,10 @@ touchscreen:
|
||||
sensor:
|
||||
- platform: sht3xd
|
||||
temperature:
|
||||
name: "${name} Temperature"
|
||||
name: Temperature
|
||||
id: current_temperature
|
||||
humidity:
|
||||
name: "${name} Humidity"
|
||||
name: Humidity
|
||||
address: 0x44
|
||||
update_interval: 60s
|
||||
|
||||
|
||||
@@ -21,9 +21,11 @@ esphome:
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
@@ -31,10 +33,6 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -31,11 +31,11 @@ esphome:
|
||||
# entity_id: automation.nspanel_send_weather_to_nspanel
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
advanced:
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
external_components:
|
||||
# - source:
|
||||
@@ -48,12 +48,9 @@ external_components:
|
||||
type: git
|
||||
url: https://github.com/olicooper/esphome-nspanel-lovelace-native
|
||||
ref: dev
|
||||
refresh: 3h
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
components: [nspanel_lovelace]
|
||||
# - source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -64,6 +61,8 @@ packages:
|
||||
# local: true
|
||||
|
||||
api:
|
||||
homeassistant_services: true
|
||||
homeassistant_states: true
|
||||
services:
|
||||
# https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h
|
||||
- service: play_rtttl
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
substitutions:
|
||||
device: nspanel-fireplace
|
||||
name: Fireplace NSPanel
|
||||
area: Living Room / Kitchen
|
||||
area: Living Room & Kitchen
|
||||
comment: "${area}, Fireplace | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
@@ -19,9 +19,11 @@ esphome:
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
@@ -29,10 +31,6 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -190,14 +188,28 @@ binary_sensor:
|
||||
inverted: true
|
||||
on_click:
|
||||
# - switch.toggle: relay_1
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.living_room
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
- min_length: 50ms
|
||||
max_length: 350ms
|
||||
then:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.living_room
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
- min_length: 500ms
|
||||
max_length: 2000ms
|
||||
then:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.worktop_lights
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_kitchen,button";
|
||||
|
||||
- platform: gpio
|
||||
name: Right Button
|
||||
@@ -206,15 +218,28 @@ binary_sensor:
|
||||
inverted: true
|
||||
on_click:
|
||||
# - switch.toggle: relay_2
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.dining_table
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
|
||||
- min_length: 50ms
|
||||
max_length: 350ms
|
||||
then:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.dining_table
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_main,button";
|
||||
- min_length: 500ms
|
||||
max_length: 2000ms
|
||||
then:
|
||||
- homeassistant.service:
|
||||
service: light.toggle
|
||||
data:
|
||||
entity_id: light.mcu_kitchen_stove
|
||||
- mqtt.publish_json:
|
||||
topic: $panel_recv_topic
|
||||
payload: |-
|
||||
root["CustomRecv"] = "event,buttonPress2,navigate.cardGrid_kitchen,button";
|
||||
output:
|
||||
- platform: ledc
|
||||
id: buzzer_out
|
||||
|
||||
@@ -20,9 +20,11 @@ esphome:
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
@@ -30,10 +32,6 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
@@ -255,6 +253,7 @@ light:
|
||||
name: Light
|
||||
id: light_1
|
||||
output: relay_1
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
# # - platform: binary
|
||||
# # name: Relay 2
|
||||
# # output: relay_2
|
||||
|
||||
@@ -20,11 +20,12 @@ esphome:
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
wifi:
|
||||
use_address: 10.17.241.212
|
||||
advanced:
|
||||
enable_lwip_mdns_queries: true
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
@@ -32,17 +33,27 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: github://pr#8325
|
||||
components: mqtt
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
script:
|
||||
- id: geiger_click
|
||||
mode: restart
|
||||
then:
|
||||
- output.turn_on: buzzer_out
|
||||
- output.ledc.set_frequency:
|
||||
id: buzzer_out
|
||||
frequency: 4000Hz
|
||||
- output.set_level:
|
||||
id: buzzer_out
|
||||
level: 50%
|
||||
- delay: 1ms
|
||||
- output.turn_off: buzzer_out
|
||||
- delay: !lambda |-
|
||||
return esphome::random_uint32() % 450 + 50;
|
||||
- script.execute: geiger_click
|
||||
|
||||
api:
|
||||
# https://github.com/granadaxronos/120-SONG_NOKIA_RTTTL_RINGTONE_PLAYER_FOR_ARDUINO_UNO/blob/master/RTTTL_PLAYER/songs.h
|
||||
#
|
||||
@@ -72,6 +83,7 @@ api:
|
||||
|
||||
- service: update_tft
|
||||
then:
|
||||
- logger.log: "tft updating from: ${tft_url}"
|
||||
- lambda: |-
|
||||
id(nspanel_id).upload_tft("${tft_url}");
|
||||
|
||||
@@ -281,6 +293,7 @@ light:
|
||||
name: Light
|
||||
id: light_1
|
||||
output: relay_1
|
||||
restore_mode: RESTORE_DEFAULT_OFF
|
||||
# # - platform: binary
|
||||
# # name: Relay 2
|
||||
# # output: relay_2
|
||||
@@ -304,6 +317,13 @@ switch:
|
||||
number: 4
|
||||
inverted: true
|
||||
restore_mode: ALWAYS_ON
|
||||
- platform: template
|
||||
name: "Geiger Counter"
|
||||
optimistic: True
|
||||
turn_on_action:
|
||||
- script.execute: geiger_click
|
||||
turn_off_action:
|
||||
- script.stop: geiger_click
|
||||
|
||||
rtttl:
|
||||
id: buzzer
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
substitutions:
|
||||
device: nspanel-patio
|
||||
name: Patio NSPanel
|
||||
area: Living Room / Kitchen
|
||||
area: Living Room & Kitchen
|
||||
comment: "${area}, Patio | NSPanel"
|
||||
panel_recv_topic: "tele/${device}/RESULT"
|
||||
panel_send_topic: "cmnd/${device}/CustomSend"
|
||||
@@ -19,9 +19,11 @@ esphome:
|
||||
- switch.turn_on: screen_power
|
||||
|
||||
esp32:
|
||||
board: nodemcu-32s
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
advanced:
|
||||
minimum_chip_revision: "3.0"
|
||||
|
||||
external_components:
|
||||
- source:
|
||||
@@ -29,9 +31,6 @@ external_components:
|
||||
url: https://github.com/sairon/esphome-nspanel-lovelace-ui
|
||||
ref: dev
|
||||
components: [nspanel_lovelace]
|
||||
- source: github://pr#7942
|
||||
components: adc
|
||||
refresh: 0s
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
|
||||
@@ -14,12 +14,9 @@ esphome:
|
||||
|
||||
|
||||
esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -29,11 +29,9 @@ esphome:
|
||||
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.1
|
||||
platform_version: 6.9.0
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -11,11 +11,11 @@ esphome:
|
||||
comment: ${comment}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# version: 5.4.2
|
||||
# platform_version: 54.03.21
|
||||
|
||||
packages:
|
||||
common: !include common/common.yaml
|
||||
|
||||
@@ -14,8 +14,7 @@ esphome:
|
||||
|
||||
|
||||
esp32:
|
||||
board: esp32-c3-devkitm-1
|
||||
variant: ESP32C3
|
||||
variant: esp32c3
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
|
||||
@@ -81,15 +81,11 @@ esphome:
|
||||
# state: ON
|
||||
|
||||
esp32:
|
||||
board: esp32dev
|
||||
# framework:
|
||||
# type: arduino
|
||||
# version: 2.0.14
|
||||
# platform_version: 6.5.0
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.11
|
||||
|
||||
## TESTING
|
||||
|
||||
@@ -101,6 +97,8 @@ external_components:
|
||||
components: [ axp192 ]
|
||||
- source: github://pr#6721
|
||||
components: [ network, modem ]
|
||||
- source: github://pr#9802
|
||||
components: [ modem ]
|
||||
- source: components
|
||||
|
||||
# packages:
|
||||
@@ -159,6 +157,17 @@ binary_sensor:
|
||||
# name: Cellular Ready
|
||||
|
||||
sensor:
|
||||
- platform: modem
|
||||
rssi:
|
||||
name: rssi
|
||||
ber:
|
||||
name: ber
|
||||
latitude:
|
||||
name: Latitude
|
||||
longitude:
|
||||
name: Longitude
|
||||
altitude:
|
||||
name: Altitude
|
||||
|
||||
switch:
|
||||
- platform: gpio
|
||||
@@ -179,8 +188,17 @@ switch:
|
||||
id: gnss_enable
|
||||
# name: GNSS Enable
|
||||
port: LDO3
|
||||
- platform: modem
|
||||
gnss:
|
||||
name: GNSS
|
||||
restore_mode: ALWAYS_ON
|
||||
|
||||
text_sensor:
|
||||
- platform: modem
|
||||
network_type:
|
||||
name: network type
|
||||
signal_strength:
|
||||
name: Signal strength
|
||||
# - platform: template
|
||||
# name: "cgpaddr"
|
||||
# update_interval: 25s
|
||||
|
||||
@@ -34,7 +34,7 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
|
||||
@@ -9,6 +9,13 @@ esphome:
|
||||
friendly_name: ${name}
|
||||
area: ${area}
|
||||
comment: ${comment}
|
||||
on_boot:
|
||||
then:
|
||||
- if:
|
||||
condition:
|
||||
- binary_sensor.is_off: button
|
||||
then:
|
||||
- wifi.disable:
|
||||
on_loop:
|
||||
then:
|
||||
lambda: |-
|
||||
@@ -34,27 +41,27 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
version: 5.3.2
|
||||
platform_version: 53.03.11
|
||||
# version: 5.3.2
|
||||
# platform_version: 53.03.11
|
||||
|
||||
external_components:
|
||||
- source: components
|
||||
|
||||
packages:
|
||||
# wifi: !include common/wifi.yaml
|
||||
wifi: !include common/wifi.yaml
|
||||
logger: !include common/logger.yaml
|
||||
# api: !include common/api.yaml
|
||||
# ota: !include common/ota.yaml
|
||||
ota: !include common/ota.yaml
|
||||
# common: !include common/common.yaml
|
||||
|
||||
# api:
|
||||
# reboot_timeout: 0s
|
||||
|
||||
# wifi:
|
||||
# reboot_timeout: 0s
|
||||
# enable_on_boot: false
|
||||
|
||||
# debug:
|
||||
|
||||
@@ -73,6 +80,13 @@ packages:
|
||||
# 1-WIRE G22
|
||||
# NC G19
|
||||
|
||||
binary_sensor:
|
||||
- platform: gpio
|
||||
id: button
|
||||
filters:
|
||||
- invert:
|
||||
pin: 39
|
||||
|
||||
esp32_ble_beacon:
|
||||
type: iBeacon
|
||||
uuid: !secret ble_beacon_toyota_auris_uuid
|
||||
|
||||
@@ -34,7 +34,7 @@ esphome:
|
||||
}
|
||||
|
||||
esp32:
|
||||
board: m5stack-atom
|
||||
variant: esp32
|
||||
framework:
|
||||
type: esp-idf
|
||||
|
||||
|
||||
Reference in New Issue
Block a user