Doors

getState([, propertyNames])

Declaration

hmkit.commands.Doors.getState()

Parameters

propertyNames

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

Returns

DoorsResponse

Example

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

DoorsResponse

Parameters

insideLocks(Object)
data.value

(Array) Inside lock states for the given doors

timestamp

(Date)

locks(Object)
data.value

(Array) Lock states for the given doors

timestamp

(Date)

positions(Object)
data.value

(Array) Door positions for the given doors

timestamp

(Date)

insideLocksState(Object)
data.value

(String) (enum) Inside locks state for the whole vehicle (combines all specific lock states if available)

timestamp

(Date)

locksState(Object)
data.value

(String) (enum) Locks state for the whole vehicle (combines all specific lock states if available)

timestamp

(Date)

Example

{
  "insideLocks": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_left"
        },
        "lockState": {
          "value": "locked"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_right"
        },
        "lockState": {
          "value": "unlocked"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_right"
        },
        "lockState": {
          "value": "unlocked"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_left"
        },
        "lockState": {
          "value": "unlocked"
        }
      }
    }
  ],
  "locks": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_left"
        },
        "lockState": {
          "value": "unlocked"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_right"
        },
        "lockState": {
          "value": "unlocked"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_right"
        },
        "lockState": {
          "value": "locked"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_left"
        },
        "lockState": {
          "value": "locked"
        }
      }
    }
  ],
  "positions": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_left"
        },
        "position": {
          "value": "open"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_right"
        },
        "position": {
          "value": "closed"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_right"
        },
        "position": {
          "value": "closed"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_left"
        },
        "position": {
          "value": "closed"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "all"
        },
        "position": {
          "value": "closed"
        }
      }
    }
  ],
  "insideLocksState": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "locked"
    }
  },
  "locksState": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "unlocked"
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Doors.getAvailability()

Parameters

propertyNames

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

Example

// Get availability for all properties
hmkit.telematics.sendCommand(
  hmkit.commands.Doors.getAvailability(),
  accessCertificate
);
// Get availability for specific properties
hmkit.telematics.sendCommand(
  hmkit.commands.Doors.getAvailability(['inside_locks']),
  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

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

lockUnlockDoors({ locksState })

Parameters

locksState

(String) (enum) Locks state for the whole vehicle (combines all specific lock states if available)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Doors.lockUnlockDoors({
    "locksState": "unlocked"
  }),
  accessCertificate
);