alarm.current

The alarm.current command is used to retrieve the current value of an alarm.

TR50 Request

{
  "cmd": {
    "command": "alarm.current",
    "params": {
      "thingKey": "mything",
      "key": "myalarm",
      "ts": "2016-09-29T15:00:02Z"
    }
  }
}

Request Parameters

Name

Type

Required

Description

 

Thing Identifier Parameters

 

Identifies the thing to which the alarm data is associated. If omitted, the thingKey associated with your session will be used. See Thing Identifier Parameters table below for supported parameters.

key

String

Yes

The key for the alarm that you wish to retrieve.

ts

Timestamp

 

If specified, alarm.current will return the value at or immediately preceding the specified timestamp.

Thing Identifier Parameters

Name

Type

Required

Description

thingKey

String

Yes

Key of the thing

thingId

String

Id of the thing

esn

String

Esn of the thing

iccid

String

Iccid of the thing

imei

String

Imei of the thing

imsi

String

Imsi of the thing

meid

String

Meid of the thing

msisdn

String

Msisdn of the thing

TR50 Response

If the command is sent successfully a success message and the property value are returned. Otherwise, an error and error message will be returned.

{
  "cmd": {
    "success": true,
    "params": {
      "state": 1,
      "duration": 1032971,
      "msg": "Message.",
      "ts": "2016-09-29T15:00:02Z"
    }
  }
}

Response Parameters

Name

Type

Description

state

String

The state of the alarm

corrId

String

The correlation identifier associated with the alarm.

duration

Integer

The duration that the alarm was in the given state.

msg

String

The message of the alarm.

ts

String

Timestamp for the given value.

lat

Float

Latitude coordinate associated with the alarm state value.

lng

Float

Longitude coordinate associated with the alarm state value.