-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.yml.orig
More file actions
225 lines (213 loc) · 9.07 KB
/
config.yml.orig
File metadata and controls
225 lines (213 loc) · 9.07 KB
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
# Logging configuration
Logging:
TUI:
# Log level for TUI mode. Supported values: "DEBUG", "INFO", "WARN", "ERROR"
Level: "INFO"
# Log format for TUI mode. Supported values: "text" or "json"
Format: "text"
# Path to the log file. If empty, logging to a file is disabled.
File: "/tmp/goleds.log"
HW:
# Log level for Hardware mode. Supported values: "DEBUG", "INFO", "WARN", "ERROR"
Level: "INFO"
# Log format for Hardware mode. Supported values: "text" or "json"
Format: "text"
# Path to the log file. If empty, logging to a file is disabled.
File: "/var/log/goleds.log"
# Hardware settings for the GoLEDS system.
Hardware:
# Type of the LED strip. Supported values: "ws2801" or "apa102".
LEDType: "ws2801"
# SPI bus frequency in Hz. 2097152 is a common, stable value for Raspberry Pi.
SPIFrequency: 2097152
# Port of the internal web server used for runtime configuration
WebserverPort: 8080
# Configuration for the LED display output.
Display:
# To counteract electrical noise that might corrupt the LED state, the system
# can periodically force a full refresh of all LED strips. This ensures the
# display remains stable. Set to 0 to disable.
ForceUpdateDelay: 1000ms
# The total number of LEDs in the virtual, continuous strip that producers
# operate on. This can be larger than the sum of physical LEDs to create
# "invisible" gaps between segments.
LedsTotal: 165
# Provides a simple mechanism for color correction. The final color values sent
# to the LEDs are multiplied by these factors. This is useful for balancing the
# color temperature of your specific LED strips (e.g., reducing blue tones
# to achieve a warmer white).
ColorCorrection: [1, 0.175, 0.05]
# For APA102-type LEDs, this sets a global brightness level (a 5-bit value, 0-31).
APA102_Brightness: 31
# Maps the virtual `LedsTotal` strip onto physical LED segments.
# Segments can be organized into "groups".
#
# - Within a single group, segments cannot overlap.
# - Use multiple groups if you need to map the same virtual LED to multiple
# physical locations (e.g., parallel strips on opposite walls).
LedSegments:
# A unique name for this group of segments.
GroupA:
- FirstLed: 0
LastLed: 69
# Maps to a device defined in `SpiMultiplexGPIO`.
SpiMultiplex: L1
# Set to true if the physical strip is wired in reverse.
Reverse: false
- FirstLed: 111
LastLed: 164
SpiMultiplex: L2
Reverse: false
# NOTE: This example "GroupB" is for demonstration. To use it on real
# hardware, you must define the `SpiMultiplex` keys (XXX, YYY, ZZZ)
# in the `SpiMultiplexGPIO` section below.
# GroupB:
# - { FirstLed: 30, LastLed: 60, SpiMultiplex: XXX }
# - { FirstLed: 75, LastLed: 100, SpiMultiplex: YYY }
# - { FirstLed: 120, LastLed: 150, SpiMultiplex: ZZZ }
# Configuration for the infrared (IR) sensors.
Sensors:
# Number of sensor readings to average together. Helps prevent false
# triggers from random spikes.
SmoothingSize: 3
# The delay between sensor read cycles. A smaller value means more
# frequent readings and faster response times.
LoopDelay: 50ms
# Configuration for each individual sensor.
SensorCfg:
# A unique name (UID) for the sensor. This UID is used to associate
# the sensor with its corresponding SensorLedProducer instance.
S0:
# The position of the sensor on the virtual LED strip.
LedIndex: 0
# The SPI device (ADC) this sensor is connected to.
SpiMultiplex: ADC1
# The channel (0-7) on the ADC for this sensor.
AdcChannel: 0
# The value the sensor must exceed to register a trigger. This requires
# tuning to be sensitive enough without picking up noise. Use the
# `-show-sensors` flag to calibrate this value.
TriggerValue: 130
S1: { LedIndex: 69, SpiMultiplex: ADC1, AdcChannel: 7, TriggerValue: 130 }
S2: { LedIndex: 111, SpiMultiplex: ADC2, AdcChannel: 0, TriggerValue: 150 }
S3: { LedIndex: 164, SpiMultiplex: ADC2, AdcChannel: 5, TriggerValue: 150 }
# Defines the GPIO pin settings required to activate a specific SPI device.
# This is the core of the SPI multiplexing configuration.
SpiMultiplexGPIO:
# This key (e.g., "L1") is the `SpiMultiplex` name used above.
L1:
# GPIO pins that must be set LOW to select this device.
Low: [17]
# GPIO pins that must be set HIGH to select this device.
High: [22,23,24]
L2: { Low: [22], High: [17,23,24] }
ADC1: { Low: [17,22,23], High: [24] }
ADC2: { Low: [17,22,24], High: [23] }
# --- Producer Configurations ---
# Each section below configures a different type of light animation producer.
# SensorLED: The primary producer, creating a "grow-stay-shrink" effect
# that radiates from a triggered sensor. One instance is created per sensor.
SensorLED:
Enabled: true
# Delay between steps as the light expands outwards.
RunUpDelay: 5ms
# Delay between steps as the light contracts inwards.
RunDownDelay: 20ms
# Minimum time the strip stays fully lit after the last trigger.
HoldTime: 10s
# The color and intensity of the illuminated LEDs.
LedRGB: [70, 70, 70]
# "Latch Mode" can be triggered by holding a hand in front of a sensor.
# This will turn on the entire strip with a brighter light for a longer duration.
# Triggering it again while active will turn it off.
LatchEnabled: true
# The sensor must read above this value to be considered for latch mode.
LatchTriggerValue: 512
# How long the sensor must be held above the LatchTriggerValue to activate.
LatchTriggerDelay: 3s
# How long the strip stays lit in latch mode (if not toggled off early).
LatchTime: 5m
# The color and intensity of the light in latch mode.
LatchLedRGB: [140, 140, 140]
# NightLED: Provides a continuous, gentle glow between sunset and sunrise.
NightLED:
Enabled: true
# Your geographical location, used to calculate sunset and sunrise times.
Latitude: 49.014
Longitude: 8.4043
# An array of colors to display during the night. The total night duration
# is divided evenly among the color entries. Repeating a color makes it
# display for a proportionally longer time.
LedRGB:
- [1, 0, 0]
- [1, 0, 0] # This red will show for 2/3 of the night.
# Note: Blue value is high due to the strong ColorCorrection factor above.
# 20 * 0.05 = 1, which is the minimum visible blue level in this setup.
- [0, 0, 20]
# MultiBlobLED: A playful effect with colored blobs moving and bouncing along
# the strip. It automatically starts after a SensorLED cycle completes.
MultiBlobLED:
Enabled: true
# How long the effect runs before stopping.
Duration: 100s
# Delay between animation steps. Smaller values result in faster movement.
Delay: 120ms
# Configuration for each individual blob.
BlobCfg:
- { DeltaX: 0.3, X: 20, Width: 512, LedRGB: [30, 0, 0] }
- { DeltaX: -0.5, X: 40, Width: 512, LedRGB: [0, 30, 0] }
- { DeltaX: 0.4, X: 130, Width: 768, LedRGB: [0, 0, 40] }
- { DeltaX: -0.2, X: 150, Width: 512, LedRGB: [30, 0, 0] }
# ClockLED: A simple producer that creates a clock-like effect,
ClockLED:
Enabled: true
# Which LED to use as the "start" of the clock for the hours. (hour: 0 and minute: 0)
StartLedHour: 0
# Which LED to use as the "end" of the clock for the hours. (hour: 11 and minute: 59)
EndLedHour: 69
# Which LED to use as the "start" of the clock for the hours. (hour: 0 and minute: 0)
StartLedMinute: 111
# Which LED to use as the "end" of the clock for the hours. (hour: 11 and minute: 59)
EndLedMinute: 164
LedHour: [50, 30, 0]
LedMinute: [50, 30, 0]
# AudioLED: A producer connecting to squeezelite (or any other thing
# producing audio) to show a VU meter
AudioLED:
Enabled: true
# Which LED to use as the "start" of the left channel VU meter.
StartLedLeft: 69
# Which LED to use as the "end" of the left VU meter.
EndLedLeft: 0
# Which LED to use as the "start" of the right channel VU meter.
StartLedRight: 111
# Which LED to use as the "end" of the right channel VU meter.
EndLedRight: 164
# A (sub-) string used to find the right audio device. "squeezelite"
# works perfectly fine on a full default pipewire Fedora.
# On RaspberryPi try "pulse".
Device: "squeezelite"
LedGreen: [0, 80, 0]
LedYellow: [40, 40, 0]
LedRed: [100, 0, 0]
SampleRate: 48000
# How often to read out samples and update the LED strip
UpdateFreq: 30ms
FramesPerBuffer: 2048
MinDB: -60.0
MaxDB: -3.0
# CylonLED: A simple producer that creates a red "eye" moving back and forth,
# inspired by Battlestar Galactica's Cylons. A good starting point for
# creating your own custom producers.
CylonLED:
Enabled: true
# How long the effect runs before stopping.
Duration: 50s
# Delay between animation steps.
Delay: 20ms
# Distance (in LEDs) to move each step. Can be a float.
Step: 1.7
# The width of the moving "eye".
Width: 7
# The color of the eye.
LedRGB: [75, 0, 0]