RICADO Gen 4 API JS Client

RICADO Gen 4 API JS Client

Class

AlarmController

Controller Class for Alarms

Constructor

new AlarmController()

Source

Methods

static

create(siteId, createData) → {Promise.<AlarmModel>}

Create a Alarm [POST /sites/{siteId}/alarms]

Parameters

  • siteId number

    The Site ID

  • createData AlarmController.CreateData

    The Alarm Create Data

Returns

  • Promise.<AlarmModel>

Source

static

delete(siteId, id) → {Promise.<boolean>}

Delete a Alarm [DELETE /sites/{siteId}/alarms/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Alarm ID

Returns

  • Promise.<boolean>

Source

static

getAll(siteId, queryParametersopt) → {Promise.<Array.<AlarmModel>>}

List all Alarms [GET /sites/{siteId}/alarms]

Parameters

  • siteId number

    The Site ID

  • queryParameters AlarmController.GetAllQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<AlarmModel>>

Source

static

getAllHistory(siteId, queryParametersopt) → {Promise.<Array.<AlarmController.AlarmHistoryItem>>}

Retrieve the History of all Alarms [GET /sites/{siteId}/alarms/history]

Retrieves History (Logged Events) for all Alarms

Parameters

  • siteId number

    The Site ID

  • queryParameters AlarmController.GetAllHistoryQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<AlarmController.AlarmHistoryItem>>

Source

static

getOne(siteId, id) → {Promise.<AlarmModel>}

Retrieve a Alarm [GET /sites/{siteId}/alarms/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Alarm ID

Returns

  • Promise.<AlarmModel>

Source

static

getOneHistory(siteId, id, queryParametersopt) → {Promise.<Array.<AlarmController.AlarmHistoryItem>>}

Retrieve the History of an Alarm [GET /sites/{siteId}/alarms/{id}/history]

Retrieves History (Logged Events) for a Single Alarm

Parameters

  • siteId number

    The Site ID

  • id string

    The Alarm ID

  • queryParameters AlarmController.GetOneHistoryQueryParameters <optional>

    The Optional Query Parameters

Returns

  • Promise.<Array.<AlarmController.AlarmHistoryItem>>

Source

static

update(siteId, id, updateData) → {Promise.<AlarmModel>}

Update a Alarm [PATCH /sites/{siteId}/alarms/{id}]

Parameters

  • siteId number

    The Site ID

  • id string

    The Alarm ID

  • updateData AlarmController.UpdateData

    The Alarm Update Data

Returns

  • Promise.<AlarmModel>

Source

Type Definitions

AlarmHistoryItem

A AlarmHistoryItem Type

Type

  • Object

Properties

  • id string

    The Alarm ID

  • tripTimestamp Date

    When the Alarm Tripped

  • resetTimestamp Date <nullable>

    When the Alarm Reset

  • trippedDuration number

    The Duration in Seconds that the Alarm was Tripped

Source

CreateData

The Create Data for a Alarm

Type

  • Object

Properties

  • rtuId number <optional>
    <nullable>

    The RTU this Alarm belongs to

  • groupId string

    The Alarm Group this Alarm is a part of

  • name string

    The Alarm Name

  • critical boolean

    Whether the Alarm is Critical or not

  • tripScript string

    The Python Script with the Conditions to Trip this Alarm

  • resetScript string <optional>
    <nullable>

    The Python Script with the Conditions to Reset this Alarm

  • tripDelay number <optional>

    The Delay before this Alarm will Trip in Milliseconds

  • resetDelay number <optional>

    The Delay before this Alarm will Reset in Milliseconds

  • autoReset boolean <optional>

    Whether the Alarm should Automatically Reset

  • autoResetDelay number <optional>

    The Delay before this Alarm should Auto Reset in Milliseconds

  • trippedStatePoint number

    The Point used to store the Alarm Tripped State

  • trippedTimestampPoint number

    The Point used to store the Alarm Tripped Timestamp

  • internalTripStartPoint number

    The Point used to store the Alarm's Internal Trip Start

  • internalResetStartPoint number

    The Point used to store the Alarm's Internal Reset Start

Source

GetAllHistoryQueryParameters

The Optional Query Parameters for the getAllHistory Function

Type

  • Object

Properties

  • alarmIds Array.<string> <optional>

    A List of Alarm IDs to Filter by

  • groupIds Array.<string> <optional>

    A List of Alarm Group IDs to Filter by

  • timestampBegin Date <optional>

    The Beginning Timestamp of the Alarm History Results. Defaults to 24 Hours ago

  • timestampEnd Date <optional>

    The End Timestamp of the Alarm History Results. Defaults to Now

Source

GetAllQueryParameters

The Optional Query Parameters for the getAll Function

Type

  • Object

Properties

  • rtuId number <optional>
    <nullable>

    The RTU this Alarm belongs to

  • groupId string <optional>

    The Alarm Group this Alarm is a part of

  • name string <optional>

    The Alarm Name

  • critical boolean <optional>

    Whether the Alarm is Critical or not

  • autoReset boolean <optional>

    Whether the Alarm should Automatically Reset

  • trippedStatePoint number <optional>

    The Point used to store the Alarm Tripped State

  • trippedTimestampPoint number <optional>

    The Point used to store the Alarm Tripped Timestamp

  • internalTripStartPoint number <optional>

    The Point used to store the Alarm's Internal Trip Start

  • internalResetStartPoint number <optional>

    The Point used to store the Alarm's Internal Reset Start

Source

GetOneHistoryQueryParameters

The Optional Query Parameters for the getOneHistory Function

Type

  • Object

Properties

  • timestampBegin Date <optional>

    The Beginning Timestamp of the Alarm History Results. Defaults to 24 Hours ago

  • timestampEnd Date <optional>

    The End Timestamp of the Alarm History Results. Defaults to Now

Source

UpdateData

The Update Data for a Alarm

Type

  • Object

Properties

  • groupId string <optional>

    The Alarm Group this Alarm is a part of

  • name string <optional>

    The Alarm Name

  • critical boolean <optional>

    Whether the Alarm is Critical or not

  • tripScript string <optional>

    The Python Script with the Conditions to Trip this Alarm

  • resetScript string <optional>
    <nullable>

    The Python Script with the Conditions to Reset this Alarm

  • tripDelay number <optional>

    The Delay before this Alarm will Trip in Milliseconds

  • resetDelay number <optional>

    The Delay before this Alarm will Reset in Milliseconds

  • autoReset boolean <optional>

    Whether the Alarm should Automatically Reset

  • autoResetDelay number <optional>

    The Delay before this Alarm should Auto Reset in Milliseconds

  • trippedStatePoint number <optional>

    The Point used to store the Alarm Tripped State

  • trippedTimestampPoint number <optional>

    The Point used to store the Alarm Tripped Timestamp

  • internalTripStartPoint number <optional>

    The Point used to store the Alarm's Internal Trip Start

  • internalResetStartPoint number <optional>

    The Point used to store the Alarm's Internal Reset Start

Source