You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/interfaces/json-api.md
+5-2Lines changed: 5 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -133,12 +133,15 @@ Sample JSON API response (v0.8.4):
133
133
| JSON key | Value range | Description
134
134
| --- | --- | --- |
135
135
on | bool | On/Off state of the light. You can also use `"t"` instead of `true` or `false` to toggle.
136
-
bri | 0 to 255 | Brightness of the light. If _on_ is `false`, contains last brightness when light was on (aka brightness when _on_ is set to true). Setting _bri_ to 0 is supported but it is recommended to use the range 1-255 and use `on: false` to turn off. The state response will never have the value `0` for _bri_.
136
+
<aid="bri"></a> bri | 0 to 255 | Brightness of the light. If _on_ is `false`, contains last brightness when light was on (aka brightness when _on_ is set to true). Setting _bri_ to 0 is supported but it is recommended to use the range 1-255 and use `on: false` to turn off. The state response will never have the value `0` for _bri_.
137
137
transition | 0 to 65535 | Duration of the crossfade between different colors/brightness levels. One unit is 100ms, so a value of `4` results in atransition of 400ms.
138
138
tt | 0 to 65535 | Similar to transition, but applies to just the current API call. Not included in state response.
139
139
ps | -1 to 250 | ID of currently set preset. `1~17~` can be used to iterate through presets 1-17, or `4~10r` to select random preset between presets 4 and 10 (inclusive).
140
140
~~pss~~ | 0 to 65535 | Bitwise indication of preset slots (0 - vacant, 1 - written). Always 0 in 0.11. Not changable. _Removed as of v0.11.1_
141
141
psave | 1 to 250 (16 prior to 0.11) | Save current light config (state) to specified preset slot. Not included in state response.
142
+
sb | bool | Used with `psave`. Save segment bounds (`start` & `stop`).
143
+
ib | bool | Used with `psave`. Save [brightness](#bri).
144
+
sc | bool | Used with `psave`. Save [selected segments](#seg-sel).
142
145
pl | -1 to 250 | ID of currently set playlist. _(read-olny)_
143
146
pdel | 1 to 250 | Preset ID to delete. Not included in state response.
144
147
nl.on | bool | Nightlight currently active
@@ -193,7 +196,7 @@ o1 | bool | Effect option 1. Custom options are hidden or displayed and labeled
193
196
o2 | bool | Effect option 2.
194
197
o3 | bool | Effect option 3.
195
198
pal | 0 to info.palcount -1 | ID of the color palette or ~ to increment, ~- to decrement, or r for random.
196
-
sel | bool | `true` if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don't support segments (e.g. UDP sync, HTTP API). If no segment is selected, the first segment (_id_:`0`) will behave as if selected. WLED will report the state of the first (lowest _id_) segment that is selected to APIs (HTTP, MQTT, Blynk...), or `mainseg` in case no segment is selected and for the UDP API. Live data is always applied to all LEDs regardless of segment configuration.
199
+
<aid="seg-sel"></a>sel | bool | `true` if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don't support segments (e.g. UDP sync, HTTP API). If no segment is selected, the first segment (_id_:`0`) will behave as if selected. WLED will report the state of the first (lowest _id_) segment that is selected to APIs (HTTP, MQTT, Blynk...), or `mainseg` in case no segment is selected and for the UDP API. Live data is always applied to all LEDs regardless of segment configuration.
197
200
rev | bool | Flips the segment (in horizontal dimension for 2D set-up), causing animations to change direction.
198
201
rY | bool | Flips the 2D segment in vertical dimension. _(available since 0.14.0)_
199
202
on | bool | Turns on and off the individual segment. _(available since 0.10.0)_
0 commit comments