T-vK / Beats4Wled

Sync Spotify playback with WLED for animations based on actual beat detection!
10 stars 0 forks source link

ERR_OUT_OF_RANGE('value', `>= ${min} and <= ${max}`, value) #1

Open Turboman533 opened 1 month ago

Turboman533 commented 1 month ago

I was able to connect spotify and wled but keep on running into this error

RangeError [ERR_OUT_OF_RANGE]: The value of "value" is out of range. It must be >= 0 and <= 255. Received 256 at writeU_Int8 (node:internal/buffer:740:11) at Buffer.writeUInt8 (node:internal/buffer:750:10) at WledRealtimeClient.update (file:///C:/Users/rohan/Downloads/Beats4Wled-main/lib/WledRealtimeClient.mjs:53:22) at Beats4Wled.wledSync (file:///C:/Users/rohan/Downloads/Beats4Wled-main/Beats4Wled.mjs:178:23) at listOnTimeout (node:internal/timers:573:17) at process.processTimers (node:internal/timers:514:7) { code: 'ERR_OUT_OF_RANGE'

Screenshot 2024-07-17 030446

T-vK commented 1 month ago

Probably a bug in lib/WledRealtimeClient.mjs that happens when the WLED segments are longer than 256 LEDs. I'll look into it when I can find some time.