Request Commands

<< Click to Display Table of Contents >>

Navigation:  Software Overview > RMS Monitoring Software > Working with the RMS Software > Using RMS > API Function > Integrate Data Into RMS >

Request Commands

Commands can be used in order to receive requests from the server.

Commands must be polled by a regular interval, but not faster than every 10 s.

 

The command request must be sent to the following URL:

URL: POST /rmsService/wService3.DeviceService.svc/RequestCommandJson

{

"DeviceId":<id>,

"Serial":<serial>,

"Token":<token>,

}

 

See table below for the available commands.

 

 

The command response must be sent to the following URL:

URL: POST /rmsService/wService3.DeviceService.svc/ResponseCommandJson

 

See table below for the response format.

 

 

oCommand 15 (Read Logger measure data)

Command

{

"DeviceId":<id>,

"Serial":<serial>,

"Token":<token>,

"Command": 15,

"ID": XX

"Parameter": {

   "From": 2016-04-23T18:25:43.511Z

   "To": 2016-04-23T18:35:43.511Z

   }

}

 

oTime Format is ISO8601

oFrom and To Time are exclusive (not included in answer)

Response

{

"DeviceId":<id>,

"Serial":<serial>,

"Token":<token>,

"Command": 15,

"ID": XX,

"Status": 0

"Data": [{"Time": 2016-04-23T18:26:43.511Z,

       "Values": [12.23, 45.58]},

        {"Time": 2016-04-23T18:27:43.511Z,

       "Values": [12.24, 45.57]}]

}

 

oStatus: 0=Ok, 127=Error

oID must correspond to the ID of the requested command

 

oCommand 12 (Switch digital output)

Command

{

"DeviceId":<id>,

"Serial":<serial>,

"Token":<token>,

"Command": 12,

"ID": XX

"Parameter": {

   "Index": 0

   "Value": 1

   }

}

 

oIndex: Measure point Index of the device

oValue: Output Value (0 or 1)

Response

{

"DeviceId":<id>,

"Serial":<serial>,

"Token":<token>,

"Command": 12,

"ID": XX,

"Status": 0

}

 

oStatus: 0=Ok, 127=Error

oID must correspond to the ID of the requested command