-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathatom-echo.yaml
More file actions
203 lines (187 loc) · 4.17 KB
/
atom-echo.yaml
File metadata and controls
203 lines (187 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
esphome:
name: audio-reactive
friendly_name: Audio Reactive Sensor
esp32:
board: m5stack-atom
framework:
type: esp-idf
wifi:
improv_serial:
api:
logger:
level: INFO
external_components:
- source: components
components: [audio_reactive]
i2s_audio:
i2s_lrclk_pin: GPIO33
i2s_bclk_pin: GPIO19
microphone:
- platform: i2s_audio
id: mic
adc_type: external
i2s_din_pin: GPIO23
pdm: true
sample_rate: 22050
bits_per_sample: 16bit
channel: right
audio_reactive:
id: audio_analysis
microphone: mic
update_interval: 50ms
beat_sensitivity: 50
squelch: 10
sample_rate: 22050
debug_logging: false
on_mute_changed:
- if:
condition:
switch.is_on: mic_mute
then:
- light.turn_on:
id: status_led
red: 1
green: 0
blue: 0
brightness: 100%
else:
- light.turn_off: status_led
on_quiet_calibration_started:
- light.turn_on:
id: status_led
red: 0
green: 1
blue: 0
brightness: 50%
effect: pulse
on_quiet_calibration_complete:
- light.turn_on:
id: status_led
red: 0
green: 1
blue: 0
brightness: 100%
effect: none
- delay: 1s
- light.turn_off: status_led
on_music_calibration_started:
- light.turn_on:
id: status_led
red: 0
green: 0
blue: 1
brightness: 50%
effect: pulse
on_music_calibration_complete:
- light.turn_on:
id: status_led
red: 0
green: 0
blue: 1
brightness: 100%
effect: none
- delay: 1s
- light.turn_off: status_led
sensor:
- platform: audio_reactive
audio_reactive_id: audio_analysis
bass_energy:
name: "Bass Energy"
mid_energy:
name: "Mid Energy"
high_energy:
name: "High Energy"
amplitude:
name: "Amplitude"
bpm:
name: "BPM"
centroid:
name: "Spectral Centroid"
rolloff:
name: "Spectral Rolloff"
beat_confidence:
name: "Beat Confidence"
beat_phase:
name: "Beat Phase"
onset_strength:
name: "Onset Strength"
binary_sensor:
- platform: audio_reactive
audio_reactive_id: audio_analysis
onset_detected:
name: "Audio Sensor"
silence:
name: "Silence"
- platform: gpio
pin:
number: GPIO39
inverted: true
name: "Device Button"
id: device_button
on_multi_click:
# Double click: calibrate quiet room
- timing:
- ON for at most 0.5s
- OFF for at most 0.5s
- ON for at most 0.5s
- OFF for at least 0.3s
then:
- button.press: calibrate_quiet_btn
# Triple click: calibrate music level
- timing:
- ON for at most 0.5s
- OFF for at most 0.5s
- ON for at most 0.5s
- OFF for at most 0.5s
- ON for at most 0.5s
- OFF for at least 0.3s
then:
- button.press: calibrate_music_btn
# Long press (>= 1s): toggle mute
- timing:
- ON for at least 1s
then:
- switch.toggle: mic_mute
number:
- platform: audio_reactive
audio_reactive_id: audio_analysis
beat_sensitivity:
name: "Beat Sensitivity"
squelch:
name: "Squelch"
select:
- platform: audio_reactive
audio_reactive_id: audio_analysis
detection_mode:
name: "Detection Mode"
switch:
- platform: audio_reactive
audio_reactive_id: audio_analysis
microphone_mute:
name: "Microphone Mute"
id: mic_mute
button:
- platform: audio_reactive
audio_reactive_id: audio_analysis
reset_agc:
name: "Reset AGC"
id: reset_agc_btn
calibrate_quiet:
name: "Calibrate Quiet Room"
id: calibrate_quiet_btn
calibrate_music:
name: "Calibrate Music Level"
id: calibrate_music_btn
light:
- platform: esp32_rmt_led_strip
id: status_led
rgb_order: GRB
chipset: SK6812
pin: GPIO27
num_leds: 1
name: "Status LED"
effects:
- pulse:
name: pulse
transition_length: 500ms
update_interval: 500ms