-
Notifications
You must be signed in to change notification settings - Fork 0
/
flow3r.yaml
275 lines (255 loc) · 4.91 KB
/
flow3r.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
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
esphome:
name: flow3r
platform: ESP32
board: esp32s3box
includes:
# /!\ WARNING /!\
# This is some very ugly copy&pasted code at the completely wrong place
# TODO: understand this code and put it into a proper component
- max98091.h
wifi:
ssid: !secret wifi_ssid
password: !secret wifi_password
mqtt:
broker: 10.42.0.1
discovery: False
# Enable logging
logger:
# Enable Home Assistant API
api:
encryption:
key: !secret flow3r_api
ota:
password: !secret flow3r_ota
i2c:
sda: GPIO2
scl: GPIO1
scan: true
id: i2c_bus
spi:
clk_pin: GPIO41
mosi_pin: GPIO42
id: spi_bus
font:
- file: "gfonts://Roboto"
id: roboto
size: 20
display:
- platform: gc9a01
reset_pin:
max7321: max7321_1
number: 2
mode:
output: true
cs_pin: GPIO40
dc_pin: GPIO38
rotation: 270
lambda: |-
it.print(0, 120, id(roboto), "Hello world!");
max7321:
# bottom in schematics
- id: max7321_1
address: 0x6D
i2c_id: i2c_bus
# top in schematics
- id: max7321_2
address: 0x6E
i2c_id: i2c_bus
power_supply:
- id: led_power_en
pin:
max7321: max7321_1
number: 1
mode:
output: true
output:
- platform: ledc
id: lcd_bl
pin: GPIO46
binary_sensor:
- platform: custom
lambda: |-
auto my_sensor = new MAX98091();
App.register_component(my_sensor);
return {my_sensor};
binary_sensors:
name: "MAX98091"
- platform: gpio
pin: GPIO0
name: "SW1"
- platform: gpio
pin: GPIO3
name: "SW2"
- platform: gpio
id: "max1_pin1"
name: "SW1_R"
pin:
max7321: max7321_1
number: 0
mode:
input: true
- platform: gpio
id: "max1_pin8"
name: "SW1_L"
pin:
max7321: max7321_1
number: 7
mode:
input: true
- platform: gpio
id: "max1_pin5"
name: "SW2_L"
pin:
max7321: max7321_1
number: 4
mode:
input: true
- platform: gpio
id: "max1_pin6"
name: "SW2_R"
pin:
max7321: max7321_1
number: 5
mode:
input: true
- platform: gpio
id: "max1_pin3"
name: "Charging"
device_class: "BATTERY_CHARGING"
pin:
max7321: max7321_1
number: 2
inverted: true
mode:
input: true
- platform: gpio
id: "max1_pin7"
name: "Microphone"
device_class: "CONNECTIVITY"
pin:
max7321: max7321_1
number: 6
inverted: true
mode:
input: true
# - platform: gpio
# id: "max2_pin1"
# name: "max2_pin1"
# pin:
# max7321: max7321_2
# number: 1
# mode:
# input: true
# - platform: gpio
# id: "max2_pin2"
# name: "max2_pin2"
# pin:
# max7321: max7321_2
# number: 2
# mode:
# input: true
# - platform: gpio
# id: "max2_pin3"
# name: "max2_pin3"
# pin:
# max7321: max7321_2
# number: 3
# mode:
# input: true
# - platform: gpio
# id: "max2_pin4"
# name: "max2_pin4"
# pin:
# max7321: max7321_2
# number: 4
# mode:
# input: true
# - platform: gpio
# id: "max2_pin5"
# name: "max2_pin5"
# pin:
# max7321: max7321_2
# number: 5
# mode:
# input: true
# - platform: gpio
# id: "max2_pin6"
# name: "max2_pin6"
# pin:
# max7321: max7321_2
# number: 6
# mode:
# input: true
# - platform: gpio
# id: "max2_pin7"
# name: "max2_pin7"
# pin:
# max7321: max7321_2
# number: 7
# mode:
# input: true
# - platform: gpio
# id: "max2_pin8"
# name: "max2_pin8"
# pin:
# max7321: max7321_2
# number: 8
# mode:
# input: true
i2s_audio:
i2s_lrclk_pin: GPIO11
i2s_bclk_pin: GPIO10
i2s_mclk_pin: GPIO18
# works!
media_player:
- platform: i2s_audio
name: I2S Media Player
dac_type: external
i2s_dout_pin: GPIO12
mode: stereo
i2s_comm_fmt: lsb
# untested
microphone:
- platform: i2s_audio
id: i2s_microphone
adc_type: external
i2s_din_pin: GPIO13
pdm: False
sensor:
- platform: adc
pin: GPIO9
id: bat_sense
name: Battery
update_interval: 1s
attenuation: 11dB
filters:
- multiply: 2.0
# cannot connect via i2c, according to schematics it is connected to bmi270 which is not supported by esphome yet
# - platform: bmp581
# address: 0x68
# temperature:
# name: "Flow3r Temperature"
# pressure:
# name: "Flow3r Pressure"
# works!
light:
- platform: monochromatic
name: "LCD Backlight"
output: lcd_bl
- platform: esp32_rmt_led_strip
rgb_order: GRB
pin: GPIO14
num_leds: 40
rmt_channel: 0
chipset: ws2812
name: "flow3r"
id: "flower"
power_supply: led_power_en
effects:
- addressable_rainbow:
- addressable_color_wipe:
- addressable_scan:
- addressable_twinkle:
- addressable_random_twinkle:
- addressable_fireworks:
- addressable_flicker: