-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheth_tobi_stripcontroller.yaml
231 lines (210 loc) · 5.23 KB
/
eth_tobi_stripcontroller.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
esphome:
friendly_name: Tobi Stripcontroller
name: tobi-stripcontroller
platform: ESP32
board: wt32-eth01
#platformio_options:
#upload_speed: 115200
includes:
- audio-reactive-led-strip/audio-reactive-led-strip
- audio-reactive-led-strip/esphome-music-leds
ethernet:
type: LAN8720
mdc_pin: GPIO23
mdio_pin: GPIO18
clk_mode: GPIO0_IN
phy_addr: 1
power_pin: GPIO16
use_address: tobi-stripcontroller.ak-online.be
mdns:
disabled: true
# Enable logging
logger:
# # important: disable serial logging, UARTs are taken by eth nic
# baud_rate: 0
logs:
MusicLeds: INFO
# Enable Home Assistant API
#api:
mqtt:
broker: mqtt.ak-online.be
discovery: true
topic_prefix: esphome/tobi-stripcontroller
ota:
web_server:
port: 80
include_internal: true
wled:
e131:
method: unicast
light:
- platform: fastled_clockless
id: tobi_teststrip
chipset: WS2812B
pin: GPIO15
# this should be increased once fan is in the chain
#num_leds: 30
# num_leds: 1500 # bootloop
# num_leds: 1100 # works
# num_leds: 1150 # works
#
num_leds: 292
rgb_order: GRB
gamma_correct: 1.0
color_correct: [ 100%, 100%, 100% ]
restore_mode: ALWAYS_OFF
power_supply: atx
- platform: partition
id: tobi_teststrip_vert_r
segments:
- id: tobi_teststrip
from: 87
to: 151
reversed: true
gamma_correct: 1.0
color_correct: [ 55%, 55%, 55% ]
restore_mode: ALWAYS_OFF
- platform: partition
id: tobi_teststrip_vert_l
segments:
- id: tobi_teststrip
from: 228
to: 291
reversed: true
gamma_correct: 1.0
color_correct: [ 55%, 55%, 55% ]
restore_mode: ALWAYS_OFF
- platform: partition
id: tobi_teststrip_hori_top
segments:
- id: tobi_teststrip
from: 152
to: 227
gamma_correct: 1.0
color_correct: [ 100%, 100%, 100% ]
restore_mode: ALWAYS_OFF
- platform: partition
id: tobi_teststrip_hori_bot
segments:
- id: tobi_teststrip
from: 0
to: 0
- id: tobi_teststrip
from: 2
to: 41
- id: tobi_teststrip
from: 43
to: 44
- id: tobi_teststrip
from: 46
to: 85
- id: tobi_teststrip
from: 87
to: 87
gamma_correct: 1.0
color_correct: [ 100%, 100%, 100% ]
restore_mode: ALWAYS_OFF
- platform: partition
id: tobi_teststrip_reassembled
name: Tobi LED Wall
segments:
- id: tobi_teststrip_hori_top
from: 0
to: 75
reversed: true
- id: tobi_teststrip_vert_r
from: 0
to: 63
reversed: true
- id: tobi_teststrip_hori_bot
from: 0
to: 83
reversed: true
- id: tobi_teststrip_vert_l
from: 0
to: 63
reversed: true
gamma_correct: 1.0
effects:
- addressable_rainbow:
name: Double Rainbow
width: 142
- addressable_rainbow:
name: Full Rainbow
width: 294
- addressable_color_wipe:
- addressable_scan:
- addressable_twinkle:
- addressable_random_twinkle:
- addressable_fireworks:
- addressable_flicker:
- wled:
- e131:
universe: 1
channels: RGB
- lambda:
name: Full Color Cycle
update_interval: 10s
lambda: |-
static int state = 0;
auto call = id(tobi_teststrip_reassembled).turn_on();
// Transition of 1000ms = 1s
call.set_transition_length(10000);
if (state == 0) {
call.set_rgb(1.0, 0.0, 0.0);
} else if (state == 1) {
call.set_rgb(0.0, 1.0, 0.0);
} else if (state == 2) {
call.set_rgb(0.0, 0.0, 1.0);
}
call.perform();
state += 1;
if (state == 3)
state = 0;
- 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);
#switch:
# - platform: template
# id: aux
# name: Tobi Light PSU Force-Enable
# restore_mode: DISABLED
# lambda: return id(atx).is_enabled();
# turn_on_action:
# - lambda: id(atx).request_high_power();
# turn_off_action:
# - lambda: id(atx).unrequest_high_power();
button:
- platform: restart
name: Tobi Stripcontroller Reboot
- platform: safe_mode
name: Tobi Stripcontroller Safe Mode
power_supply:
- id: atx
pin:
number: GPIO17
inverted: true
custom_component:
- lambda: |-
auto my_music_leds = new MusicLeds(
294, /* num of pixels */
0.0035, /* threshold */
14, /* ws pin */
36 /* data piG */
);
App.register_component(my_music_leds);
return {my_music_leds};
components:
- id: music_leds