API call format for effect setting

Hi, I just can’t seem to get the correct syntax to set the effect on my wled with a curl call.
Any help would be appreciated.

I can turn on/off using
curl -X POST “http://[IP ADDRESS]/json/state” -d ‘{“on”:true}’ -H “Content-Type: application/json”

But I can’t figure out how to set the effect?
I can do it with the HTTP api
http://[IP ADDRESS]/win&FX=1


{“seg”: {“fx”:1}}

Hey, thanks for the reply.

curl -X POST “http://[IP ADDRESS]/json/state” -d ‘{“seg”: {“fx”:0}}’ -H “Content-Type: application/json”

Unfortunately I’ve tried several variations of that call and all I get is …
Running WLed 10.2

“fx”:0 does not exist. Effects start at 1

And upgrade to 0.13

Thanks again.
But 1 or any other integer does not work either.
I’d love to upgrade, unfortunately I am unable to :frowning: (Long story)

I did try on one unit that has 0.13 installed. {“error”: 9} is what I get on that one.

Whoohoo, after trying multiple combinations I figured out the correct syntax (and “fx”:0 is valid).
The correct syntax is:
curl -X POST “http://[IP ADDRESS]/json” -d ‘{“seg”:[{“fx”:0}]}’ -H “Content-Type: application/json”


1 Like