BatteryControl.lua
[INDEX]

ABSTRACT

Get the battery status and control the battery

ARGUMENTS

HTTP Arguments submit: GET; POST

Test this API over HTTP - (URL):

CMD
STRING (MUST)

Specifies the command to execute,example:

gi

Get battery information

sd

Shut down

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

"Data": {
/*OBJECT*/

"MV":
"STRING"

Adapter voltage

"BV":
"STRING"

Battery voltage

"BP":
"STRING"

Battery level(0-4)

"T1":
"STRING"

T1 temperature(-40: For 40 degrees below zero, 25: For 25 degrees )

"T2":
"STRING"

T2 temperature(-40: For 40 degrees below zero, 25: For 25 degrees )

"FN":
"STRING"

Fan status, 0 is close,1 is open.

}
}

OTHER NOTES

Device HTTP API, v1.0