According to Serial - WLED Project the JSON API is available over serial via GPIO1 and GPIO3.
This works well but it seems that it is limited to only the State
object.
Is it possible to access the cfg
object via serial to directly access configuration settings?
I had another question where I thought that I was sending over serial but was in fact POSTing the JSON string: Set Ethernet IP address via API
If one could send the following over serial to set up newly flashed units then that would be amazing!
{"nw":{"ins":[{"ip":[192,168,88,123],"gw":[192,168,88,1],"sn":[255,255,255,0]}]}}
It would be the same as posting to /json/cfg
but because I am usually in environments without wifi then this becomes tedious:
curl -X POST http://192.168.88.123/json/cfg -H "Content-Type: application/json" -d '{"nw":{"ins":[{"ip":[192,168,88,111],"gw":[192,168,88,1],"sn":[255,255,255,0]}]}}'