-
Notifications
You must be signed in to change notification settings - Fork 14
/
minimal-example-config.yaml
62 lines (53 loc) · 1.8 KB
/
minimal-example-config.yaml
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
---
esphome:
name: sound-level-meter
external_components:
- source: github://stas-sl/esphome-sound-level-meter
esp32:
board: esp32dev
framework:
type: arduino
logger:
level: DEBUG
i2s:
bck_pin: 23
ws_pin: 18
din_pin: 19
sample_rate: 48000 # default: 48000
bits_per_sample: 32 # default: 32
# right shift samples.
# for example if mic has 24 bit resolution, and i2s configured as 32 bits,
# then audio data will be aligned left (MSB) and LSB will be padded with
# zeros, so you might want to shift them right by 8 bits
bits_shift: 8 # default: 0
sound_level_meter:
# update_interval specifies over which interval to aggregate audio data
# you can specify default update_interval on top level, but you can also
# override it further by specifying it on sensor level
update_interval: 1s # default: 60s
# buffer_size is in samples (not bytes), so for float data type
# number of bytes will be buffer_size * 4
buffer_size: 1024 # default: 1024
# see your mic datasheet to find sensitivity and reference SPL.
# those are used to convert dB FS to db SPL
mic_sensitivity: -26dB # default: empty
mic_sensitivity_ref: 94dB # default: empty
# for flexibility sensors are organized hierarchically into groups.
# each group can have any number of filters, sensors and nested groups.
# for examples if there is a top level group A with filter A and nested
# group B with filter B, then for sensors inside group B filters A
# and then B will be applied:
# groups:
# # group A
# - filters:
# - filter A
# groups:
# # group B
# - filters:
# - filter B
# sensors:
# - sensor X
groups:
- sensors:
- type: eq
name: Leq_1s