kopia lustrzana https://github.com/Aircoookie/WLED
Updated JSON API (markdown)
rodzic
62b38654fd
commit
c98b23cf71
33
JSON-API.md
33
JSON-API.md
|
@ -125,7 +125,8 @@ seg | Array of segment objects | Segments are individual parts of the LED strip.
|
|||
|
||||
#### Contents of the segment object
|
||||
|
||||
Notice: _start_, _stop_, and _len_ are not settable in 0.8.4. Any segment with _id_ > 0 is ignored.
|
||||
Notice: _start_, _stop_, and _len_ are not changeable in 0.8.4. Any segment with _id_ > 0 is ignored.
|
||||
Unless stated otherwise, every other value may be changed via an HTTP POST request.
|
||||
|
||||
| JSON key | Value range | Description
|
||||
| --- | --- | --- |
|
||||
|
@ -138,7 +139,35 @@ fx | 0 to info.fxcount -1 | ID of the effect.
|
|||
sx | 0 to 255 | Relative effect speed
|
||||
ix | 0 to 255 | Effect intensity
|
||||
pal | 0 to info.palcount -1 | ID of the color palette
|
||||
sel | bool | `true` if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don't support segments (currently any API except this JSON 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...). 0.8.4 will always return `true` in the state response for the only segment object.
|
||||
sel | bool | `true` if the segment is selected. Selected segments will have their state (color/FX) updated by APIs that don't support segments (currently any API except this JSON 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 (UDP sync, HTTP, MQTT, Blynk...). 0.8.4 will always return `true` in the state response for the only segment object.
|
||||
rev | bool | Flips the segment, causing animations to change direction.
|
||||
cln | -1 to info.maxseg -1 | Clones the segment with the given _id_, exactly mirroring it's LED contents. If the segment to be cloned is shorter, the remaining LEDs are turned off. If the segment to be cloned is invalid or the _id_ of the segment itself is set, it will reset to `-1`. Not implemented in 0.8.4, always `-1` in state response.
|
||||
|
||||
#### Info object
|
||||
|
||||
No value may be changed by means of this API.
|
||||
|
||||
| JSON key | Value range | Description
|
||||
| --- | --- | --- |
|
||||
ver | string | Version name.
|
||||
vid | uint32 | Build ID (YYMMDDB, B = daily build index).
|
||||
leds.count | 1 to 1200 | Total LED count.
|
||||
leds.rgbw | bool | `true` if LEDs are 4-channel (RGBW).
|
||||
leds.pin | byte array | LED strip pin(s). In 0.8.4, always one element.
|
||||
leds.pwr | 0 to 65000 | Current LED power usage in milliamps as determined by the ABL. `0` if ABL is disabled.
|
||||
leds.maxpwr | 0 to 65000 | Maximum power budget in milliamps for the ABL. `65000` if ABL is disabled.
|
||||
leds.maxseg | byte | Maximum number of segments supported by this version.
|
||||
name | string | Friendly name of the light. Intended for display in lists and titles.
|
||||
udpport | uint16 | The UDP port for realtime packets and WLED broadcast.
|
||||
live | bool | If `true`, the software is currently receiving realtime data via UDP or E1.31.
|
||||
fxcount | byte | Number of effects included.
|
||||
palcount | uint16 | Number of palettes configured.
|
||||
arch | string | Name of the platform.
|
||||
core | string | Version of the underlying (Arduino core) SDK.
|
||||
freeheap | uint32 | Bytes of heap memory (RAM) currently available. Problematic if <`10k`.
|
||||
uptime | uint32 | Time since the last boot/reset in seconds.
|
||||
opt | uint16 | Used for debugging purposes only.
|
||||
brand | string | The producer/vendor of the light. Always `WLED` for standard installations.
|
||||
product | string | The product name. Always `DIY light` for standard installations.
|
||||
btype | string | The origin of the build. `src` if a release version is compiled from source, `bin` for an official release image, `dev` for a development build (regardless of src/bin origin) and `exp` for experimental versions.
|
||||
mac | string | The hexadecimal hardware MAC address of the light, lowercase and without colons.
|
||||
|
|
Ładowanie…
Reference in New Issue