plugin command
request: send
| path |
type |
conditions |
description |
plugin.send |
dataArray |
|
|
// Json Example
[
{
"plugin": {
"send": [16, 34, 242]
}
}
]
| path |
type |
conditions |
description |
plugin.exec_lua |
string |
|
Lua script to be run on target device |
// Json Example
[
{
"plugin": {
"exec_lua": "duration = 3"
}
}
]
| path |
type |
conditions |
description |
plugin.reload |
boolean |
|
Indicate load Lua from storage. This is reloading. It will lose state. |
// Json Example
[
{
"plugin": {
"reload": true
}
}
]
| path |
type |
conditions |
description |
plugin.call_request.id |
integer |
- required
- 0 ≤ value ≤ 4294967295
|
transaction id which response will carry back |
plugin.call_request.lua |
string |
|
Lua script to be run on target device |
// Json Example
[
{
"plugin": {
"call_request": {
"id": 2147483647,
"lua": "return 'hello'"
}
}
}
]
| path |
type |
conditions |
description |
plugin.cloud_transaction_response.id |
integer |
- required
- 0 ≤ value ≤ 4294967295
|
transaction id which Lua is waiting on |
plugin.cloud_transaction_response.success |
boolean |
|
whether the transaction succeeded |
plugin.cloud_transaction_response.result |
string |
|
result string passed back to Lua |
// Json Example
[
{
"plugin": {
"cloud_transaction_response": {
"id": 2147483647,
"success": true,
"result": ""
}
}
}
]
| path |
type |
conditions |
description |
plugin.receive |
dataArray |
|
|
//Response Example
[
{
"plugin": {
"receive": [16, 34, 242]
}
}
]
| path |
type |
conditions |
description |
plugin.frame.start.id |
number |
|
Frame Identifer number |
plugin.frame.start.length |
number |
|
Frame Total length |
plugin.frame.end.length |
number |
|
|
//Response Example
[
{
"plugin": {
"frame": {
"start": {
"id": 100,
"length": 10000
},
"end": {
"length": 500
}
}
}
}
]
| path |
type |
conditions |
description |
plugin.error.message |
string |
|
|
//Response Example
[
{
"plugin": {
"error": {
"message": "[string \"e\"]:1: syntax error near 'FAILED'"
}
}
}
]
| path |
type |
conditions |
description |
plugin.call_response.id |
integer |
|
transaction id of the matching callWait request |
plugin.call_response.status |
integer |
|
0 when Lua finished successfully, 1 on error |
plugin.call_response.result |
string |
|
value returned by the Lua script (or error message) |
//Response Example
[
{
"plugin": {
"call_response": {
"id": 500,
"status": 0,
"result": "hello from lua"
}
}
}
]
| path |
type |
conditions |
description |
plugin.cloud_transaction_request.id |
integer |
|
transaction id that the response must carry back |
plugin.cloud_transaction_request.data |
dataArray |
|
|
//Response Example
[
{
"plugin": {
"cloud_transaction_request": {
"id": 500,
"data": [16, 34, 242]
}
}
}
]
type defines
| type |
conditions |
examples |
description |
| array |
|
[16, 34, 242][100, 255, 21, 0, 21]
|
Binary data array. |