JSON Playlist ignored?

I’m trying to get a JSON playlist to work:
Preset #20 saved as Chimes

 {
 	"on":true,
 	"playlist":{
 		"ps":[4,3,11,3,12,3,11,3],
 		"dur":[20,8980,20,8980,20,8980,20,8980],
 		"transition":0
 		}
 }

This is for a 60-LED clock, would be set to start at 6am and run until 11pm, with the idea that on the hour preset #4 is run for 2 seconds, preset #3 then runs for 898 seconds, then at quarter past the hour repeats for #11,#3, at half past #12,#3, and quarter to goes back to #11,#3. That creates a visual chiming at 00, 15, 30, 45 minutes.

The presets listed (3,4,11,12) all work fine if selected, but the Playlist preset looks to be active but nothing changes ie previous pattern continues to run.

Any idea of what I might have missed in the playlist definition?
Thanks.

I think the way it works may not work how you think (or wish) it did.
Update the playlist so WLED has it available.
Then activate the playlist in another json call.
I might be wrong. When you read the reply from the json request, does it return a success or error / failure html code, like 404 for file not found in standard web browsers.

The playlist is loaded into a preset, and ‘called’ by the time schedule. Exactly the same method works fine on another WLED install I have for display (although not using individual timings per preset in the list). So I wonder if the timing interval is breaking something. Following from the wiki: JSON API · Aircoookie/WLED Wiki · GitHub

If you read back the presets via json, did it accept the preset array?

Ok, this version below now works. I explicitly set transition, and set repeat to -1 rather than 0 - I stumbled upon someone’s comment in Github issues who said it worked for them, and it did!

So now I kick of the playlist at 6am and shut the ‘Clock’ down at 11pm. In between I have CandyCane (Preset #12) visual chimes on the hour and half hour - 15 seconds; and Theatre (preset #11) chiming on the quarter and three quarter- 10 seconds. In between it runs Fireworks (preset #1) as that increases the size of the ‘hands’ from 1 to 4 LEDs.

{
	"on":true,
	"playlist":{
		"ps":[12,1,11,1,12,1,11,1],
		"dur":[150,8850,100,8900,150,8850,100,8900],
		"transition":7,
		"repeat":-1
		}
}
1 Like