5. The Reference for RPCM REST API
REPLY:
{"resultOfLastCommand":"OK","softwareVersion":"0.3.25"}
5.2.3. Outlet Status Getting
Command:
GET /api/channel/channelNumber
It returns the current status of the outlet in JSON format.
Synonyms:
GET /api/output/[channelNumber]
GET /api/outlet/[channelNumber]
Parameter:
channelNumber = Outlet number of interest
The return is:
{"admS":"ON","actS":"ON","t1C":"ON","t2C":"ON","cbFS":"OFF","fSC1":0,"fSC2":0,"oAFS":"OFF"
,"oTFS":"OFF","loTFS":"OFF","rS":"OFF","ovTFS":"OFF","iMa":0,"iWa":0,"iVA":0,"iVar":0,"q":
1,"aKWh":0.001944,"aKVAh":0.003056,"aKVarh":0.0}
Example:
curl -X GET
http://10.210.1.52
:8888/api/channel/0
REPLY:
7{
"rOLC": "OK",
"ats": {
"channels": {
"0": {
"admS": "ON",
"actS": "ON",
"tC": "ON",
"cbFS": "OFF",
"oAFS": "OFF",
"oTFS": "OFF",
"loTFS": "OFF",
"rS": "OFF",
"ovTFS": "OFF",
"iMa": 0,
"iWa": 0,
"aKWh": 0.0
}
}
},
"RPCM": 1
}
181