5. The Reference for RPCM REST API
5.2.4. Outlet Status Setting
5.2.4.1. Change the Outlet Status
Command:
PUT /api/channel/channelNumber/newState
Parameters:
channelNumber = [0-9] (Outlet number of interest (single digit))
newState = on|off (desired state)
Example:
curl -X PUT http://10.210.1.52:8888/api/channel/0/on
curl -X PUT http://10.210.1.52:8888/api/channel/0/off
REPLY:
{
"rOLC": "OK",
"ats": {
"channels": {
"0": {
"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,
"aKWh": 1.909722,
"aKVAh": 1.914167,
"aKVarh": -0.049722
}
}
},
"RPCM": 1
}
5.2.4.2. How to Use a Mask
Change multiple-outlets status
Command:
PUT /api/multiple-outlets/mask/[mask]/[state]
182