forked from patrickjahns/esp_rgbww_firmware
-
Notifications
You must be signed in to change notification settings - Fork 6
Multiple Commands in a Request
verybadsoldier edited this page Jul 18, 2019
·
1 revision
Usually there is one command in a HTTP-POST request which looks for example like this (single JSON object):
{
"cmds":[
{
"hsv":{
"ct":2700,
"h":"150"
},
"d":1,
"t":10000,
"cmd":"fade"
},
{
"hsv":{
"ct":2700,
"h":"20"
},
"d":1,
"t":10000,
"cmd":"fade",
"q":"back"
}
]
}
Instead of this also a JSON array can be sent to issue multiple commands in a single HTTP-Post request:
[{
"raw":{"g":"550", "r" : 0, "cw" : 0},
"t":20000,
"cmd":"fade",
"q" : "back"
},
{
"raw":{"g":"850", "r" : 1000, "cw" : 0},
"t":20000,
"cmd":"fade",
"q" : "back"
}]