EmonFan
November 22, 2021, 4:18pm
1
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
Thanks
EmonFan
November 22, 2021, 8:25pm
3
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 …
{“error”:10}
Running WLed 10.2
“fx”:0 does not exist. Effects start at 1
And upgrade to 0.13
EmonFan
November 22, 2021, 8:45pm
5
Thanks again.
But 1 or any other integer does not work either.
I’d love to upgrade, unfortunately I am unable to (Long story)
I did try on one unit that has 0.13 installed. {“error”: 9} is what I get on that one.
EmonFan
November 22, 2021, 10:06pm
6
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”
Cheers!
1 Like