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
Alarm | Description |
---|---|
GeofenceByCustomPoint | Geofence alarm. |
Alarm by ZoneByZoneEnter | When entering zone. |
Alarm by ZoneByZoneLeave | When leaving zone. |
Alarm by ZoneByZoneArrival | Not entered zone before given time. |
Alarm by MovementByWorkTime | If movement is registered within timeframe. |
Alarm by TemperatureByTemperature | If upper or lower temperature level is exceeded. The alarm can only be triggered by units with temperature sensor. |
Alarm by PointByPointEnter | When approaching point. |
Alarm by PointByPointLeave | When moving away from point. |
Alarm by PointByPointArrival | Not approached point before given time. |
Alarm by InputByInput | When activity is registered on input 1-4. |
Alarm by Unit stateByPowerLevel | Power level less than (V). |
Alarm by Unit stateByBatteryLevel | Internal battery level less than (%). |
Alarm by Unit stateByNoGpsFix | No GPS fix within x hours. |
Alarm by Unit stateByNoData | No transmission of data within x hours. |
Alarm by Unit stateByAcceleration | If unit accelerates heavily. |
Alarm by Input voltageByADVoltage | 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
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id * | String | N/A |
Columns
Refer to the following table for description of columns:
Name | Data type | Unit of measurement | Nullability | Note |
---|---|---|---|---|
id | String | N/A | Unique identifier. | |
created | DateTime | UTC | FALSE | |
name | String | N/A | FALSE | Name of alarm. |
type | String | N/A | FALSE | |
enabled | Bool | N/A | FALSE | |
allUnits | Bool | N/A | FALSE | |
units | String[] | N/A | TRUE | |
groups | String[] | N/A | TRUE | |
emailRecipients | String[] | N/A | TRUE | |
systemRecipients | String[] | N/A | TRUE | |
smsRecipients | String[] | N/A | TRUE | |
temperatureLimits | TemperatureAlarmLimits | Celcius | TRUE | |
ADVoltageLimits | ADVoltageAlarmLimits | Volts | TRUE | |
ADVoltageInputIndex | INT | N/A | TRUE | (1,2,4) |
threshold | Double | N/A | TRUE | |
batteryLevel | Double | Percent of battery charge | TRUE | (0, 100) |
radius | Double | Kilometers | TRUE | |
inputIndex | INT | N/A | TRUE | |
interval | Double | Seconds | TRUE | |
pointId | String | N/A | TRUE | |
expectedArrivalTime | DateTime | UTC | TRUE | |
powerLevel | Double | Volts | TRUE | |
weekdays | String[] | N/A | TRUE | |
timeStart | TimeOfDay | Local | TRUE | |
timeEnd | TimeOfDay | Local | TRUE | |
zoneId | String | N/A | TRUE |
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
Name | Data type | Unit of measurement |
---|---|---|
name * | String | N/A |
type * | String (see list of alarm types) | N/A |
enabled | Bool | N/A |
allUnits | Bool | N/A |
units | String[] | N/A |
groups | String[] | N/A |
emailRecipients | String[] | N/A |
systemRecipients | String[] | N/A |
smsRecipients | String[] | N/A |
temperatureLimits | TemperatureAlarmLimits | Celcius |
ADVoltageLimits | ADVoltageAlarmLimits | Volts |
ADVoltageInputIndex | INT | N/A |
threshold | Double | N/A |
batteryLevel | Double | Percent of battery charge |
location | Location | N/A |
radius | Double | Kilometers |
inputIndex | INT | N/A |
interval | Double | Seconds |
pointId | String | N/A |
expectedArrivalTime | DateTime | UTC |
powerLevel | Double | Volts |
weekdays | String[] | N/A |
timeStart | TimeOfDay | Local |
timeEnd | TimeOfDay | Local |
zoneId | Double | N/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
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id * | String | N/A | Name of alarm. |
name | String | N/A | Name of alarm. |
type | String | N/A | Type of alarm. (see list of alarm types) |
enabled | Bool | N/A | |
allUnits | Bool | N/A | |
units | String[] | N/A | |
groups | String[] | N/A | |
emailRecipients | String[] | N/A | |
systemRecipients | String[] | N/A | |
smsRecipients | String[] | N/A | |
temperatureLimits | TemperatureAlarmLimits | Celcius | |
ADVoltageLimits | ADVoltageAlarmLimits | Volts | |
ADVoltageInputIndex | INT | N/A | |
threshold | Double | N/A | |
batteryLevel | Double | Percent of battery charge | |
location | Location | N/A | |
radius | Double | Kilometers | |
inputIndex | INT | N/A | |
interval | Double | Seconds | |
pointId | String | N/A | |
expectedArrivalTime | DateTime | UTC | |
powerLevel | Double | Volts | |
weekdays | String[] | N/A | |
timeStart | TimeOfDay | Local | |
timeEnd | TimeOfDay | Local | |
zoneId | Double | N/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
Name | Data type | Unit of measurement | Note |
---|---|---|---|
id * | String | N/A |
Request (example)
{
"id": "70356"
}
Response
{}
Updated over 3 years ago