-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlouderesp32.yaml
88 lines (74 loc) · 1.8 KB
/
louderesp32.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
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
#############################################################################
### ESPHome config for the Louder ESP32 Hi-Fi Class-D audio amplifier ###
### Check out our blog article at: https://www.espthings.io/louder-esp32 ###
#############################################################################
substitutions:
devicename: "louder-esp32"
long_devicename: "Speakers bedroom"
pcb_version: "12/23 REV E"
esphome:
name: "${devicename}"
name_add_mac_suffix: false
comment: "${long_devicename} Louder ESP32 ${pcb_version}"
includes:
- louderesp32.h
platformio_options:
lib_deps: "Wire"
on_boot:
priority: 800
then:
## Set a volume limit just to be safe...
- media_player.volume_set:
id: louderesp32
volume: 10%
esp32:
board: mhetesp32minikit
wifi:
ssid: !secret esphome_wifi_ssid
password: !secret esphome_wifi_password
ap:
ssid: "$devicename Fallback Hotspot"
password: !secret esphome_ap_password
captive_portal:
### Optional if you want ethernet (then remove all wifi config) ###
#ethernet:
# type: W5500
# clk_pin: GPIO18
# mosi_pin: GPIO23
# miso_pin: GPIO19
# cs_pin: GPIO05
# interrupt_pin: GPIO35
# reset_pin: GPIO14
logger:
level: DEBUG
api:
encryption:
key: !secret esphome_api_key
ota:
password: !secret esphome_ota_password
psram:
mode: octal
speed: 80MHz
switch:
- platform: custom
lambda: |-
auto tas5805 = new TAS5805();
App.register_component(tas5805);
return {tas5805};
switches:
name: "Enable Amp"
i2c:
sda: GPIO21
scl: GPIO27
scan: True
id: i2c_component
i2s_audio:
i2s_lrclk_pin: GPIO25
i2s_bclk_pin: GPIO26
media_player:
- platform: i2s_audio
name: $long_devicename
id: louderesp32
dac_type: external
i2s_dout_pin: GPIO22
mode: stereo