kopia lustrzana https://github.com/Aircoookie/WLED
Updated JSON API (markdown)
rodzic
e3a9f9f6f0
commit
d24ee9f204
|
@ -10,9 +10,13 @@ The response consists of four objects:
|
||||||
- `info` contains general information about the device. No value can be modified using this API.
|
- `info` contains general information about the device. No value can be modified using this API.
|
||||||
- `effects` contains an array of the effect mode names
|
- `effects` contains an array of the effect mode names
|
||||||
- `palettes` contains an array of the palette names
|
- `palettes` contains an array of the palette names
|
||||||
|
You may also obtain those objects individually using the URLs `/json/state` `/json/info` `/json/eff`, and ``/json/pal`
|
||||||
|
|
||||||
### Setting new values
|
### Setting new values
|
||||||
Sending a POST request to `/json/state` with (parts of) the state object will update the respective values.
|
Sending a POST request to `/json` or `/json/state` with (parts of) the state object will update the respective values.
|
||||||
|
Example: `{"on":true,"bri":255}` sets the brightness to maximum. `{"seg":[{"col":[[0,255,200]]}]}` sets the color of the first segment to teal.
|
||||||
|
|
||||||
|
Note: In 0.8.4, segments are not supported and any but the first will be ignored.
|
||||||
|
|
||||||
Sample JSON API response (v0.8.4):
|
Sample JSON API response (v0.8.4):
|
||||||
|
|
||||||
|
|
Ładowanie…
Reference in New Issue