Updated JSON API (markdown)

master
Aircoookie 2020-05-04 02:11:50 +02:00
rodzic 26da2bfcb9
commit 1b38aac453
1 zmienionych plików z 4 dodań i 2 usunięć

@ -120,6 +120,7 @@ udpn.send | bool | Send WLED broadcast (UDP sync) packet on state change
udpn.recv | bool | Receive broadcast packets
udpn.nn | bool | Don't send a broadcast packet (applies to just the current API call). Not included in state response.
v | bool | If set to _true_ in a JSON POST command, the response will contain the full JSON state object. Not included in state response.
lor | 0, 1, or 2 | Live data override. 0 is off, 1 is override until live data ends, 2 is override until ESP reboot (available since 0.10.0)
time | uint32 | Set module time to unix timestamp. Not included in state response.
mainseg | 0 to info.leds.maxseg-1 | Main Segment | Sets which segment ID is the main segment
seg | Array of segment objects | Segments are individual parts of the LED strip. In 0.9.0 this will enables running different effects on different parts of the strip.
@ -141,9 +142,10 @@ 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 (UDP sync, 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...).
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.
on | bool | Turns on and off the individual segment. (available since 0.10.0)
bri | 0 to 255 | Sets the individual segment brightness (available since 0.10.0)
#### Info object