Seats

getState([, propertyNames])

Declaration

hmkit.commands.Seats.getState()

Parameters

propertyNames

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

Returns

SeatsResponse

Example

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

SeatsResponse

Parameters

personsDetected(Object)
data.value

(Array)

timestamp

(Date)

seatbeltsState(Object)
data.value

(Array)

timestamp

(Date)

Example

{
  "personsDetected": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_left"
        },
        "detected": {
          "value": "detected"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_right"
        },
        "detected": {
          "value": "not_detected"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_right"
        },
        "detected": {
          "value": "not_detected"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_left"
        },
        "detected": {
          "value": "not_detected"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_center"
        },
        "detected": {
          "value": "not_detected"
        }
      }
    }
  ],
  "seatbeltsState": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_left"
        },
        "fastenedState": {
          "value": "fastened"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "front_right"
        },
        "fastenedState": {
          "value": "not_fastened"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_right"
        },
        "fastenedState": {
          "value": "not_fastened"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_left"
        },
        "fastenedState": {
          "value": "not_fastened"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "location": {
          "value": "rear_center"
        },
        "fastenedState": {
          "value": "not_fastened"
        }
      }
    }
  ]
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Seats.getAvailability()

Parameters

propertyNames

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

Example

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

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