alarm.current Action

This trigger action retrieves the current timestamp, state, message, duration, latitude, and longitude of the alarm key specified in the action.

Action

On the Adding Trigger page under Alarm, drag alarm.current to the canvas.

Canvas

On the canvas, the action appears as a rectangle with two routing points.

The left routing point (red) is the failure route. This route is taken if there is an error during execution.

The right routing point (green) is the success route. This route is taken if action executes successfully.

Form

Parameters

Name

Type

Required

Description

Thing key

String

Yes

Identifies the thing with which the alarm data is associated. It can be the $(event.thing.key) event variable associated with the trigger event.

Alarm key

String

Yes

The key for the alarm to retrieve. It can be the $(event.alarm.key) event variable associated with the trigger event.

Timestamp

String

 

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

Action variables

Name

Type

Description

$(action.X.duration)

String

The duration that the alarm was in the given state.

$(action.X.lat)

Float

Latitude coordinate associated with the alarm state value.

$(action.X.lng)

Float

Longitude coordinate associated with the alarm state value.

$(action.X.msg)

String

The message of the alarm.

$(action.X.state)

String

The state of the alarm.

$(action.X.ts)

String

Timestamp for the given value.