Usage

getUsage([, propertyNames])

Declaration

hmkit.commands.Usage.getUsage()

Parameters

propertyNames

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

Returns

UsageResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Usage.getUsage(),
  accessCertificate
);

UsageResponse

Parameters

accelerationDurations(Object)
data.value

(Array) Durations of normal or other accelerations.

timestamp

(Date)

accelerationEvaluation(Object)
data.value

(Number) (double) Acceleration evaluation percentage

timestamp

(Date)

averageFuelConsumption(Object)
data.value

(Number) (fuel_efficiency) Average fuel consumption for current trip

timestamp

(Date)

averageSpeed(Object)
data.value

(Number) (speed) Average speed at data collection.

timestamp

(Date)

averageSpeedLastTrip(Object)
data.value

(Number) (speed) Average speed during last trip

timestamp

(Date)

averageSpeedSinceReset(Object)
data.value

(Number) (speed) Average speed since reset

timestamp

(Date)

averageWeeklyDistance(Object)
data.value

(Number) (length) Average weekly distance

timestamp

(Date)

averageWeeklyDistanceLongRun(Object)
data.value

(Number) (length) Average weekyl distance over long term

timestamp

(Date)

brakingEvaluation(Object)
data.value

(Number) (double) Braking evaluation percentage

timestamp

(Date)

currentFuelConsumption(Object)
data.value

(Number) (fuel_efficiency) Current fuel consumption

timestamp

(Date)

distanceOverTime(Object)
data.value

(Object) Distance driven over a given time period

timestamp

(Date)

drivingDurationLastTrip(Object)
data.value

(Number) (duration) Duration of last trip

timestamp

(Date)

drivingDurationSinceReset(Object)
data.value

(Number) (duration) Duration of travelling since reset

timestamp

(Date)

drivingModesActivationPeriods(Object)
data.value

(Array)

timestamp

(Date)

drivingModesEnergyConsumptions(Object)
data.value

(Array)

timestamp

(Date)

drivingStyleEvaluation(Object)
data.value

(Number) (double) Driving style evaluation percentage

timestamp

(Date)

ecoScoreBonusRange(Object)
data.value

(Number) (length) Eco-score bonus range

timestamp

(Date)

ecoScoreConstant(Object)
data.value

(Number) (double) Eco-score rating constant

timestamp

(Date)

ecoScoreFreeWheel(Object)
data.value

(Number) (double) Eco-score rating for free-wheeling

timestamp

(Date)

ecoScoreTotal(Object)
data.value

(Number) (double) Overall eco-score rating

timestamp

(Date)

electricConsumptionAverage(Object)
data.value

(Number) (energy_efficiency) Average electric energy consumption calculated based on the last 20km

timestamp

(Date)

electricConsumptionRateSinceReset(Object)
data.value

(Number) (energy_efficiency) Electric energy consumption rate since a reset

timestamp

(Date)

electricConsumptionRateSinceStart(Object)
data.value

(Number) (energy_efficiency) Electric energy consumption rate since the start of a trip

timestamp

(Date)

electricDistanceLastTrip(Object)
data.value

(Number) (length) Distance travelled with electricity in last trip

timestamp

(Date)

electricDistanceSinceReset(Object)
data.value

(Number) (length) Distance travelled with electricity since reset

timestamp

(Date)

electricDurationLastTrip(Object)
data.value

(Number) (duration) Duration of travelling using electricity during last trip

timestamp

(Date)

electricDurationSinceReset(Object)
data.value

(Number) (duration) Duration of travelling using electricity since reset

timestamp

(Date)

fuelConsumptionRateLastTrip(Object)
data.value

(Number) (fuel_efficiency) Liquid fuel consumption rate during last trip

timestamp

(Date)

fuelConsumptionRateSinceReset(Object)
data.value

(Number) (fuel_efficiency) Liquid fuel consumption rate since reset

timestamp

(Date)

fuelDistanceLastTrip(Object)
data.value

(Number) (length) Distance travelled with (liquid) fuel during last trip

timestamp

(Date)

fuelDistanceSinceReset(Object)
data.value

(Number) (length) Distance travelled with (liquid) fuel since reset

timestamp

(Date)

lastTripAverageEnergyRecuperation(Object)
data.value

(Number) (energy_efficiency) Energy recuperation rate for last trip

timestamp

(Date)

lastTripBatteryRegenerated(Object)
data.value

(Number) (double) Estimated electrical charge (in %) that was recovered through regeneration during a trip.

timestamp

(Date)

lastTripBatteryRemaining(Object)
data.value

(Number) (double) Battery % remaining after last trip

timestamp

(Date)

lastTripDate(Object)
data.value

(Date) (timestamp) The last trip date

timestamp

(Date)

lastTripElectricPortion(Object)
data.value

(Number) (double) Portion of the last trip used in electric mode

timestamp

(Date)

lastTripEnergyConsumption(Object)
data.value

(Number) (energy) Energy consumption in the last trip

timestamp

(Date)

lastTripFuelConsumption(Object)
data.value

(Number) (volume) Fuel consumption in the last trip

timestamp

(Date)

lateNightGrade(Object)
data.value

(String) (enum) Grade given for late night driving over time

timestamp

(Date)

odometerAfterLastTrip(Object)
data.value

(Number) (length) Odometer after the last trip

timestamp

(Date)

rapidAccelerationGrade(Object)
data.value

(String) (enum) Grade given for rapid acceleration over time

timestamp

(Date)

rapidDecelerationGrade(Object)
data.value

(String) (enum) Grade given for rapid deceleration over time

timestamp

(Date)

recuperationPower(Object)
data.value

(Number) (power) Recuperation energy of the drivetrain.

timestamp

(Date)

safetyDrivingScore(Object)
data.value

(Number) (double) Safety driving score as percentage

timestamp

(Date)

tripMeters(Object)
data.value

(Array) Independent meter that can be reset at any time by the driver

timestamp

(Date)

Example

{
  "accelerationDurations": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "direction": {
          "value": "longitudinal"
        },
        "type": {
          "value": "regular"
        },
        "duration": {
          "value": 1234,
          "unit": "milliseconds"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "direction": {
          "value": "lateral"
        },
        "type": {
          "value": "positive_outlier"
        },
        "duration": {
          "value": 1234,
          "unit": "milliseconds"
        }
      }
    }
  ],
  "accelerationEvaluation": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "averageFuelConsumption": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 6.5,
      "unit": "liters_per_100_kilometers"
    }
  },
  "averageSpeed": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 77.5,
      "unit": "kilometers_per_hour"
    }
  },
  "averageSpeedLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 44.2,
      "unit": "kilometers_per_hour"
    }
  },
  "averageSpeedSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 44.2,
      "unit": "kilometers_per_hour"
    }
  },
  "averageWeeklyDistance": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 666.6,
      "unit": "kilometers"
    }
  },
  "averageWeeklyDistanceLongRun": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 777.7,
      "unit": "kilometers"
    }
  },
  "brakingEvaluation": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "currentFuelConsumption": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 7.5,
      "unit": "liters_per_100_kilometers"
    }
  },
  "distanceOverTime": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "distance": {
        "value": 1500.88,
        "unit": "kilometers"
      },
      "time": {
        "value": 10,
        "unit": "weeks"
      }
    }
  },
  "drivingDurationLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 77,
      "unit": "minutes"
    }
  },
  "drivingDurationSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 88,
      "unit": "minutes"
    }
  },
  "drivingModesActivationPeriods": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "regular"
        },
        "period": {
          "value": 0.2
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "eco"
        },
        "period": {
          "value": 0.3
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "sport"
        },
        "period": {
          "value": 0.1
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "sport_plus"
        },
        "period": {
          "value": 0.1
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "eco_plus"
        },
        "period": {
          "value": 0.3
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "comfort"
        },
        "period": {
          "value": 0
        }
      }
    }
  ],
  "drivingModesEnergyConsumptions": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "regular"
        },
        "consumption": {
          "value": 20.2,
          "unit": "kilowatt_hours"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "eco"
        },
        "consumption": {
          "value": 33.2,
          "unit": "kilowatt_hours"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "sport"
        },
        "consumption": {
          "value": 54.3,
          "unit": "kilowatt_hours"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "sport_plus"
        },
        "consumption": {
          "value": 64.8,
          "unit": "kilowatt_hours"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "eco_plus"
        },
        "consumption": {
          "value": 18,
          "unit": "kilowatt_hours"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "drivingMode": {
          "value": "comfort"
        },
        "consumption": {
          "value": 33.7,
          "unit": "kilowatt_hours"
        }
      }
    }
  ],
  "drivingStyleEvaluation": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.88
    }
  },
  "ecoScoreBonusRange": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7,
      "unit": "kilometers"
    }
  },
  "ecoScoreConstant": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "ecoScoreFreeWheel": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "ecoScoreTotal": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "electricConsumptionAverage": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 11.22,
      "unit": "kwh_per_100_kilometers"
    }
  },
  "electricConsumptionRateSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 22.33,
      "unit": "kwh_per_100_kilometers"
    }
  },
  "electricConsumptionRateSinceStart": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 11.22,
      "unit": "kwh_per_100_kilometers"
    }
  },
  "electricDistanceLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 111000,
      "unit": "meters"
    }
  },
  "electricDistanceSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 222000,
      "unit": "meters"
    }
  },
  "electricDurationLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 77,
      "unit": "minutes"
    }
  },
  "electricDurationSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 88,
      "unit": "minutes"
    }
  },
  "fuelConsumptionRateLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 5.4,
      "unit": "liters_per_100_kilometers"
    }
  },
  "fuelConsumptionRateSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 5.3,
      "unit": "liters_per_100_kilometers"
    }
  },
  "fuelDistanceLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 111000,
      "unit": "meters"
    }
  },
  "fuelDistanceSinceReset": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 222000,
      "unit": "meters"
    }
  },
  "lastTripAverageEnergyRecuperation": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 5.68,
      "unit": "kwh_per_100_kilometers"
    }
  },
  "lastTripBatteryRegenerated": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.14
    }
  },
  "lastTripBatteryRemaining": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.5
    }
  },
  "lastTripDate": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "2018-10-17T12:34:58.000Z"
    }
  },
  "lastTripElectricPortion": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "lastTripEnergyConsumption": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 101.3,
      "unit": "kilowatt_hours"
    }
  },
  "lastTripFuelConsumption": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 22.5,
      "unit": "liters"
    }
  },
  "lateNightGrade": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "excellent"
    }
  },
  "odometerAfterLastTrip": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 95632,
      "unit": "kilometers"
    }
  },
  "rapidAccelerationGrade": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "excellent"
    }
  },
  "rapidDecelerationGrade": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": "normal"
    }
  },
  "recuperationPower": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 2300,
      "unit": "watts"
    }
  },
  "safetyDrivingScore": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 0.7
    }
  },
  "tripMeters": [
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "id": {
          "value": 1
        },
        "distance": {
          "value": 456.2,
          "unit": "kilometers"
        }
      }
    },
    {
      "timestamp": "2021-06-01T15:48:04.887Z",
      "data": {
        "id": {
          "value": 2
        },
        "distance": {
          "value": 2489.3,
          "unit": "kilometers"
        }
      }
    }
  ]
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Usage.getAvailability()

Parameters

propertyNames

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

Example

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

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