Alarm

An Alarm is essentially a mechanism that monitors the occurence of specific types of activity. If a unit for example is moved outside of a zone, or perhaps is being used on weekends, an alarm can be triggered.

There are different types of alarms to use with the different types of activity.
Alarms can be sent via e-mail or SMS.

URL Structure is:
https://api.trackunit.com/public/Alarm

General alarm types

AlarmDescription
Geofence
ByCustomPoint
Geofence alarm.
Alarm by Zone
ByZoneEnter
When entering zone.
Alarm by Zone
ByZoneLeave
When leaving zone.
Alarm by Zone
ByZoneArrival
Not entered zone before given time.
Alarm by Movement
ByWorkTime
If movement is registered within timeframe.
Alarm by Temperature
ByTemperature
If upper or lower temperature level is exceeded. The alarm can only be triggered by units with temperature sensor.
Alarm by Point
ByPointEnter
When approaching point.
Alarm by Point
ByPointLeave
When moving away from point.
Alarm by Point
ByPointArrival
Not approached point before given time.
Alarm by Input
ByInput
When activity is registered on input 1-4.
Alarm by Unit state
ByPowerLevel
Power level less than (V).
Alarm by Unit state
ByBatteryLevel
Internal battery level less than (%).
Alarm by Unit state
ByNoGpsFix
No GPS fix within x hours.
Alarm by Unit state
ByNoData
No transmission of data within x hours.
Alarm by Unit state
ByAcceleration
If unit accelerates heavily.
Alarm by Input voltage
ByADVoltage
If upper or lower voltage level is exceeded, on input 1,2 or 4. The alarm can only be triggered by units transmitting voltage levels.
 

GetAlarm

Will list parameters on a specified alarm.

Parameters

NameData typeUnit of measurementNote
id *StringN/A

Columns

Refer to the following table for description of columns:

NameData typeUnit of measurementNullabilityNote
idStringN/AUnique identifier.
createdDateTimeUTCFALSE
nameStringN/AFALSEName of alarm.
typeStringN/AFALSE
enabledBoolN/AFALSE
allUnitsBoolN/AFALSE
unitsString[]N/ATRUE
groupsString[]N/ATRUE
emailRecipientsString[]N/ATRUE
systemRecipientsString[]N/ATRUE
smsRecipientsString[]N/ATRUE
temperatureLimitsTemperatureAlarmLimitsCelciusTRUE
ADVoltageLimitsADVoltageAlarmLimitsVoltsTRUE
ADVoltageInputIndexINTN/ATRUE(1,2,4)
thresholdDoubleN/ATRUE
batteryLevelDoublePercent of battery chargeTRUE(0, 100)
radiusDoubleKilometersTRUE
inputIndexINTN/ATRUE
intervalDoubleSecondsTRUE
pointIdStringN/ATRUE
expectedArrivalTimeDateTimeUTCTRUE
powerLevelDoubleVoltsTRUE
weekdaysString[]N/ATRUE
timeStartTimeOfDayLocalTRUE
timeEndTimeOfDayLocalTRUE
zoneIdStringN/ATRUE

Request (example)

{
   "id": "70356"
}

Response

{
  "list": [
    {
      "id": "70356",
      "created": "2014-03-04T08:07:08.0332907Z",
      "name": "Low battery alarm",
      "type": "ByBatteryLevel",
      "enabled": true,
      "allUnits": true,
      "units": [],
      "groups": [],
      "emailRecipients": [
        "29830"
      ],
      "systemRecipients": [],
      "smsRecipients": [],
      "batteryLevel": 30
    }
  ]
}
 

CreateAlarm

Will create a new alarm.

Parameters

NameData typeUnit of measurement
name *StringN/A
type *String
(see list of alarm types)
N/A
enabledBoolN/A
allUnitsBoolN/A
unitsString[]N/A
groupsString[]N/A
emailRecipientsString[]N/A
systemRecipientsString[]N/A
smsRecipientsString[]N/A
temperatureLimitsTemperatureAlarmLimitsCelcius
ADVoltageLimitsADVoltageAlarmLimitsVolts
ADVoltageInputIndexINTN/A
thresholdDoubleN/A
batteryLevelDoublePercent of battery charge
locationLocationN/A
radiusDoubleKilometers
inputIndexINTN/A
intervalDoubleSeconds
pointIdStringN/A
expectedArrivalTimeDateTimeUTC
powerLevelDoubleVolts
weekdaysString[]N/A
timeStartTimeOfDayLocal
timeEndTimeOfDayLocal
zoneIdDoubleN/A

Request (example)

{
  "name": "Weekend alarm",
  "type": "ByWorkTime",
  "enabled": true,
  "allUnits": true,
  "emailRecipients": [
    "29831"
  ],
  "weekdays": [
    "Saturday"
  ],
  "timeStart": {
    "hour": 0,
    "minute": 0
  },
  "timeEnd": {
    "hour": 23,
    "minute": 45
  }
}

Response

{
   "id": "70367"
}
 

UpdateAlarm

Will update parameters on an existing alarm.

Parameters

NameData typeUnit of measurementNote
id *StringN/AName of alarm.
nameStringN/AName of alarm.
typeStringN/AType of alarm.
(see list of alarm types)
enabledBoolN/A
allUnitsBoolN/A
unitsString[]N/A
groupsString[]N/A
emailRecipientsString[]N/A
systemRecipientsString[]N/A
smsRecipientsString[]N/A
temperatureLimitsTemperatureAlarmLimitsCelcius
ADVoltageLimitsADVoltageAlarmLimitsVolts
ADVoltageInputIndexINTN/A
thresholdDoubleN/A
batteryLevelDoublePercent of battery charge
locationLocationN/A
radiusDoubleKilometers
inputIndexINTN/A
intervalDoubleSeconds
pointIdStringN/A
expectedArrivalTimeDateTimeUTC
powerLevelDoubleVolts
weekdaysString[]N/A
timeStartTimeOfDayLocal
timeEndTimeOfDayLocal
zoneIdDoubleN/A

Request (example)

{
  "id": "70356",
  "name": "Battery less than 40 percent!",
  "allUnits": false,
  "addGroups": [
    "8819"
  ],
  "batteryLevel": 40
}

Response

{}
 

DeleteAlarm

Will delete an existing alarm.

Parameters

NameData typeUnit of measurementNote
id *StringN/A

Request (example)

{
    "id": "70356"
}

Response

{}