Updated JSON API (markdown)

master
Aircoookie 2020-11-16 00:56:32 +01:00
rodzic 074293760e
commit e1bf66bddc
1 zmienionych plików z 25 dodań i 1 usunięć

@ -154,7 +154,7 @@ lx | `20bbbtttt`: 200002700 - 201006500 | Loxone brightness and color temperatur
ly | `BBBGGGRRR`: 0 - 100100100 | Loxone RGB value for secondary color. Each color (`RRR`,`GGG`,`BBB`) is specified in the range from 0 to 100%.
ly | `20bbbtttt`: 200002700 - 201006500 | Loxone brightness and color temperature values for secondary color. Brightness `bbb` is specified in the range 0 to 100%. `tttt` defines the color temperature in the range from 2700 to 6500 Kelvin. (available since 0.11.0, not included in state response)
i | array | [Individual LED control](https://github.com/Aircoookie/WLED/wiki/JSON-API#per-segment-individual-led-control). Not included in state response (available since 0.10.2)
playlist | object | [Custom preset playlists](https://github.com/Aircoookie/WLED/wiki/JSON-API#per-segment-individual-led-control). Not included in state response (available since 0.11.0)
playlist | object | [Custom preset playlists](https://github.com/Aircoookie/WLED/wiki/JSON-API#playlists). Not included in state response (available since 0.11.0)
#### Info object
@ -219,3 +219,27 @@ Segment features, including Grouping, Spacing, Mirroring and Reverse are functio
This feature is available in build 200829 and above.
#### Playlists
Sample playlist API call:
```json
{
"playlist": {
"ps": [26, 20, 18, 20],
"dur": [30, 20, 10, 50],
"transition": 0,
"repeat": 10,
"end": 21
}
}
```
This example applies preset ID 26 for 3 seconds, then preset 20 for 2 seconds, then preset 18 for 1 second, lastly preset 20 again for 5 seconds. This repeats 10 times, then preset 21 is applied.
Playlist object:
| JSON key | Description
| --- | --- |
ps | Array of preset ID integers to be applied in this order.
dur | Array of time each preset should be kept, in tenths of seconds. If only one integer is supplied, all presets will be kept for that time. Defaults to 10 seconds if not provided.
transition | Array of time each preset should be kept, in tenths of seconds. If only one integer is supplied, all presets will transition for that time. Defaults to the current transition time if not provided.
repeat | How many times the entire playlist should cycle before finishing. Set to `0` for an indefinite cycle. Default to indefinite if not provided.
end | Single preset ID to apply after the playlist finished. Has no effect when an indefinite cycle is set. If not provided, the light will stay on the last preset of the playlist.