Theft Alarm

getState([, propertyNames])

Declaration

hmkit.commands.TheftAlarm.getState()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Returns

TheftAlarmResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.TheftAlarm.getState(),
  accessCertificate
);

TheftAlarmResponse

Parameters

status(Object)
data.value

(String) (enum)

timestamp

(Date)

interiorProtectionStatus(Object)
data.value

(String) (enum) Interior protection sensor status

timestamp

(Date)

towProtectionStatus(Object)
data.value

(String) (enum) Tow protection sensor status

timestamp

(Date)

lastWarningReason(Object)
data.value

(String) (enum)

timestamp

(Date)

lastEvent(Object)
data.value

(Date) (timestamp) Last event happening date

timestamp

(Date)

lastEventLevel(Object)
data.value

(String) (enum) Level of impact for the last event

timestamp

(Date)

eventType(Object)
data.value

(String) (enum) Position of the last even relative to the vehicle

timestamp

(Date)

Example

{
  "status": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "armed"
      }
    }
  },
  "interiorProtectionStatus": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "active"
      }
    }
  },
  "towProtectionStatus": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "active"
      }
    }
  },
  "lastWarningReason": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "hood"
      }
    }
  },
  "lastEvent": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "2020-06-16T11:10:02.000Z"
      }
    }
  },
  "lastEventLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "low"
      }
    }
  },
  "eventType": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "rear_right"
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.TheftAlarm.getAvailability()

Parameters

propertyNames

(optional) Array of names of the properties you want returned.

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.TheftAlarm.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.TheftAlarm.getAvailability(['status']),
  accessCertificate
);

Response

Parameters

availability(Object)
updateRate.value

(String) enum

rateLimit.value

(Number)

rateLimit.unit

(String)

appliesPer.value

(String)

Discussion

The response contains an availability object for each property, as shown in the example

Example

{
  "status": {
    "availability": {
      "updateRate": {
        "value": "trip_high"
      },
      "rateLimit": {
        "value": 64,
        "unit": "hertz"
      },
      "appliesPer": {
        "value": "vehicle"
      }
    }
  }
}

setTheftAlarm({ status })

Parameters

status

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.TheftAlarm.setTheftAlarm({
    "status": "armed"
  }),
  accessCertificate
);