-
Notifications
You must be signed in to change notification settings - Fork 1
/
eth_dmx.yaml
528 lines (478 loc) · 10.8 KB
/
eth_dmx.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
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
esphome:
name: eth-dmx
platform: ESP32
board: nodemcu-32s
#platformio_options:
#upload_speed: 115200
includes:
- audio-reactive-led-strip/audio-reactive-led-strip
- audio-reactive-led-strip/esphome-music-leds
on_boot:
priority: 100
then:
- output.set_level:
id: dmx_ch1_brightness
level: 100%
- output.set_level:
id: dmx_ch2_brightness
level: 100%
- output.set_level:
id: dmx_ch3_brightness
level: 100%
- output.set_level:
id: dmx_ch4_brightness
level: 100%
- output.set_level:
id: dmx_ch1_mode
level: 0%
- output.set_level:
id: dmx_ch2_mode
level: 0%
- output.set_level:
id: dmx_ch3_mode
level: 0%
- output.set_level:
id: dmx_ch4_mode
level: 0%
#wifi:
# ssid: !secret wifi-east
# password: !secret wifi-pwd
#
# use_address: rgb_mainframe.ak-online.be
#
# # Enable fallback hotspot (captive portal) in case wifi connection fails
# ap:
# ssid: "RGB Mainframe Fallback Hotspot"
# password: !secret fallback-password
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO16
use_address: esp-dmx.ak-online.be
# manual_ip:
# static_ip: 172.16.2.50
# gateway: 172.16.0.1
# subnet: 255.255.252.0
# dns1: 172.16.0.1
# dns2: 172.16.0.253
#captive_portal:
mdns:
disabled: true
# Enable logging
logger:
# important: disable serial logging, UARTs are taken by eth nic
baud_rate: 0
logs:
dmx512: INFO
MusicLeds: INFO
# Enable Home Assistant API
#api:
mqtt:
broker: mqtt.ak-online.be
discovery: true
topic_prefix: esphome/dmx
ota:
web_server:
port: 80
include_internal: true
button:
- platform: restart
name: restart
wled:
external_components:
- source: github://andyboeh/esphome-dmx512
uart:
id: uart_bus
baud_rate: 250000
tx_pin:
number: 17
allow_other_uses: true
stop_bits: 2
dmx512:
id: dmx
uart_id: uart_bus
enable_pin: 5
tx_pin:
number: 17
allow_other_uses: true
uart_num: 1
output:
- platform: gpio
pin: GPIO02
id: out_led
- platform: dmx512
universe: dmx
channel: 1
id: dmxbar_ch1_red
- platform: dmx512
universe: dmx
channel: 2
id: dmxbar_ch1_green
- platform: dmx512
universe: dmx
channel: 3
id: dmxbar_ch1_blue
- platform: dmx512
universe: dmx
channel: 4
id: dmxbar_ch2_red
- platform: dmx512
universe: dmx
channel: 5
id: dmxbar_ch2_green
- platform: dmx512
universe: dmx
channel: 6
id: dmxbar_ch2_blue
- platform: dmx512
universe: dmx
channel: 7
id: dmxbar_ch3_red
- platform: dmx512
universe: dmx
channel: 8
id: dmxbar_ch3_green
- platform: dmx512
universe: dmx
channel: 9
id: dmxbar_ch3_blue
- platform: dmx512
universe: dmx
channel: 10
id: dmxbar_ch4_red
- platform: dmx512
universe: dmx
channel: 11
id: dmxbar_ch4_green
- platform: dmx512
universe: dmx
channel: 12
id: dmxbar_ch4_blue
- platform: dmx512
universe: dmx
channel: 13
id: dmxbar_ch5_red
- platform: dmx512
universe: dmx
channel: 14
id: dmxbar_ch5_green
- platform: dmx512
universe: dmx
channel: 15
id: dmxbar_ch5_blue
- platform: dmx512
universe: dmx
channel: 16
id: dmxbar_ch6_red
- platform: dmx512
universe: dmx
channel: 17
id: dmxbar_ch6_green
- platform: dmx512
universe: dmx
channel: 18
id: dmxbar_ch6_blue
- platform: dmx512
universe: dmx
channel: 19
id: dmxbar_ch7_red
- platform: dmx512
universe: dmx
channel: 20
id: dmxbar_ch7_green
- platform: dmx512
universe: dmx
channel: 21
id: dmxbar_ch7_blue
- platform: dmx512
universe: dmx
channel: 22
id: dmxbar_ch8_red
- platform: dmx512
universe: dmx
channel: 23
id: dmxbar_ch8_green
- platform: dmx512
universe: dmx
channel: 24
id: dmxbar_ch8_blue
- platform: dmx512
universe: dmx
channel: 25
id: dmx_ch1_brightness
- platform: dmx512
universe: dmx
channel: 26
id: dmx_ch1_red
- platform: dmx512
universe: dmx
channel: 27
id: dmx_ch1_green
- platform: dmx512
universe: dmx
channel: 28
id: dmx_ch1_blue
- platform: dmx512
universe: dmx
channel: 30
id: dmx_ch1_mode
- platform: dmx512
universe: dmx
channel: 32
id: dmx_ch2_brightness
- platform: dmx512
universe: dmx
channel: 33
id: dmx_ch2_red
- platform: dmx512
universe: dmx
channel: 34
id: dmx_ch2_green
- platform: dmx512
universe: dmx
channel: 35
id: dmx_ch2_blue
- platform: dmx512
universe: dmx
channel: 37
id: dmx_ch2_mode
- platform: dmx512
universe: dmx
channel: 39
id: dmx_ch3_brightness
- platform: dmx512
universe: dmx
channel: 40
id: dmx_ch3_red
- platform: dmx512
universe: dmx
channel: 41
id: dmx_ch3_green
- platform: dmx512
universe: dmx
channel: 42
id: dmx_ch3_blue
- platform: dmx512
universe: dmx
channel: 44
id: dmx_ch3_mode
- platform: dmx512
universe: dmx
channel: 46
id: dmx_ch4_brightness
- platform: dmx512
universe: dmx
channel: 47
id: dmx_ch4_red
- platform: dmx512
universe: dmx
channel: 48
id: dmx_ch4_green
- platform: dmx512
universe: dmx
channel: 49
id: dmx_ch4_blue
- platform: dmx512
universe: dmx
channel: 51
id: dmx_ch4_mode
light:
- platform: rgb
name: "Growlight 01 - Bar 1"
internal: true
id: dmxbar_bar_1
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch1_red
green: dmxbar_ch1_green
blue: dmxbar_ch1_blue
- platform: rgb
name: "Growlight 02 - Bar 2"
internal: true
id: dmxbar_bar_2
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch2_red
green: dmxbar_ch2_green
blue: dmxbar_ch2_blue
- platform: rgb
name: "Growlight 03 - Bar 3"
internal: true
id: dmxbar_bar_3
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch3_red
green: dmxbar_ch3_green
blue: dmxbar_ch3_blue
- platform: rgb
name: "Growlight 04 - Bar 4"
internal: true
id: dmxbar_bar_4
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch4_red
green: dmxbar_ch4_green
blue: dmxbar_ch4_blue
- platform: rgb
name: "Growlight 05 - Bar 5"
internal: true
id: dmxbar_bar_5
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch5_red
green: dmxbar_ch5_green
blue: dmxbar_ch5_blue
- platform: rgb
name: "Growlight 06 - Bar 6"
internal: true
id: dmxbar_bar_6
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch6_red
green: dmxbar_ch6_green
blue: dmxbar_ch6_blue
- platform: rgb
name: "Growlight 07 - Bar 7"
internal: true
id: dmxbar_bar_7
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch7_red
green: dmxbar_ch7_green
blue: dmxbar_ch7_blue
- platform: rgb
name: "Growlight 08 - Bar 8"
internal: true
id: dmxbar_bar_8
gamma_correct: 1.0
default_transition_length: 0s
red: dmxbar_ch8_red
green: dmxbar_ch8_green
blue: dmxbar_ch8_blue
- platform: rgb
name: "Growlight 09 - Light 25"
internal: true
id: dmx_light_addr1
gamma_correct: 1.0
default_transition_length: 0s
red: dmx_ch1_red
green: dmx_ch1_green
blue: dmx_ch1_blue
- platform: rgb
name: "Growlight 10 - Light 32"
internal: true
id: dmx_light_addr8
gamma_correct: 1.0
default_transition_length: 0s
red: dmx_ch2_red
green: dmx_ch2_green
blue: dmx_ch2_blue
- platform: rgb
name: "Growlight 11 - Light 39"
internal: true
id: dmx_light_addr15
gamma_correct: 1.0
default_transition_length: 0s
red: dmx_ch3_red
green: dmx_ch3_green
blue: dmx_ch3_blue
- platform: rgb
name: "Growlight 12 - Light 46"
internal: true
id: dmx_light_addr27
gamma_correct: 1.0
default_transition_length: 0s
red: dmx_ch4_red
green: dmx_ch4_green
blue: dmx_ch4_blue
- platform: partition
name: "DMX Growlights"
gamma_correct: 1.0
segments:
- single_light_id: dmxbar_bar_1
- single_light_id: dmxbar_bar_2
- single_light_id: dmxbar_bar_3
- single_light_id: dmxbar_bar_4
- single_light_id: dmxbar_bar_5
- single_light_id: dmxbar_bar_6
- single_light_id: dmxbar_bar_7
- single_light_id: dmxbar_bar_8
- single_light_id: dmx_light_addr1
- single_light_id: dmx_light_addr8
- single_light_id: dmx_light_addr15
- single_light_id: dmx_light_addr27
effects:
- wled:
- addressable_rainbow:
- addressable_color_wipe:
- addressable_scan:
- addressable_twinkle:
#- !include effects/ColorShimmerEffect.yaml
- addressable_lambda:
name: Scroll with Music
update_interval: 0s
lambda: |-
((MusicLeds*) id(music_leds))->ShowFrame(MODE_SCROLL, &it);
- addressable_lambda:
name: Energy with Music
update_interval: 0s
lambda: |-
((MusicLeds*) id(music_leds))->ShowFrame(MODE_ENERGY, &it);
- addressable_lambda:
name: Spectrum with Music
update_interval: 0s
lambda: |-
((MusicLeds*) id(music_leds))->ShowFrame(MODE_SPECTRUM, &it);
- platform: binary
id: status
output: out_led
- platform: monochromatic
name: "Growlight 09 - Light 25 Mode"
internal: true
id: dmx_mode_light_addr1
gamma_correct: 1.0
default_transition_length: 0s
output: dmx_ch1_mode
- platform: monochromatic
name: "Growlight 10 - Light 32 Mode"
internal: true
id: dmx_mode_light_addr8
gamma_correct: 1.0
default_transition_length: 0s
output: dmx_ch2_mode
- platform: monochromatic
name: "Growlight 11 - Light 39 Mode"
internal: true
id: dmx_mode_light_addr15
gamma_correct: 1.0
default_transition_length: 0s
output: dmx_ch3_mode
- platform: monochromatic
name: "Growlight 12 - Light 46 Mode"
internal: true
id: dmx_mode_light_addr27
gamma_correct: 1.0
default_transition_length: 0s
output: dmx_ch4_mode
- platform: fastled_clockless
chipset: WS2811
pin: GPIO12
num_leds: 1
rgb_order: BRG
name: "Fake FastLED WS2811 Light"
internal: true
custom_component:
- lambda: |-
auto my_music_leds = new MusicLeds(
12, /* num of pixels */
0.0035, /* threshold */
15, /* ws pin */
14 /* data piG */
);
App.register_component(my_music_leds);
return {my_music_leds};
components:
- id: music_leds