Diagnostics

getState([, propertyNames])

Declaration

hmkit.commands.Diagnostics.getState()

Parameters

propertyNames

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

Returns

DiagnosticsResponse

Example

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

DiagnosticsResponse

Parameters

mileage(Object)
data.value

(Number) (length) The vehicle mileage (odometer)

timestamp

(Date)

engineOilTemperature(Object)
data.value

(Number) (temperature) Engine oil temperature

timestamp

(Date)

speed(Object)
data.value

(Number) (speed) The vehicle speed

timestamp

(Date)

engineRPM(Object)
data.value

(Number) (angular_velocity) Engine RPM (revolutions per minute)

timestamp

(Date)

fuelLevel(Object)
data.value

(Number) (double) Fuel level percentage between 0.0-1.0

timestamp

(Date)

estimatedRange(Object)
data.value

(Number) (length) Estimated range (with combustion engine)

timestamp

(Date)

washerFluidLevel(Object)
data.value

(String) (enum)

timestamp

(Date)

batteryVoltage(Object)
data.value

(Number) (electric_potential_difference) Battery voltage

timestamp

(Date)

adBlueLevel(Object)
data.value

(Number) (double) AdBlue level percentage between 0.0-1.0

timestamp

(Date)

distanceSinceReset(Object)
data.value

(Number) (length) The distance driven since reset

timestamp

(Date)

distanceSinceStart(Object)
data.value

(Number) (length) The distance driven since trip start

timestamp

(Date)

fuelVolume(Object)
data.value

(Number) (volume) The fuel volume measured in liters

timestamp

(Date)

antiLockBraking(Object)
data.value

(String) (enum)

timestamp

(Date)

engineCoolantTemperature(Object)
data.value

(Number) (temperature) Engine coolant temperature

timestamp

(Date)

engineTotalOperatingHours(Object)
data.value

(Number) (duration) The accumulated time of engine operation

timestamp

(Date)

engineTotalFuelConsumption(Object)
data.value

(Number) (volume) The accumulated lifespan fuel consumption

timestamp

(Date)

brakeFluidLevel(Object)
data.value

(String) (enum)

timestamp

(Date)

engineTorque(Object)
data.value

(Number) (double) Current engine torque percentage between 0.0-1.0

timestamp

(Date)

engineLoad(Object)
data.value

(Number) (double) Current engine load percentage between 0.0-1.0

timestamp

(Date)

wheelBasedSpeed(Object)
data.value

(Number) (speed) The vehicle speed measured at the wheel base

timestamp

(Date)

batteryLevel(Object)
data.value

(Number) (double) Battery level in %, value between 0.0 and 1.0

timestamp

(Date)

checkControlMessages(Object)
data.value

(Array)

timestamp

(Date)

tirePressures(Object)
data.value

(Array)

timestamp

(Date)

tireTemperatures(Object)
data.value

(Array)

timestamp

(Date)

wheelRPMs(Object)
data.value

(Array)

timestamp

(Date)

troubleCodes(Object)
data.value

(Array)

timestamp

(Date)

mileageMeters(Object)
data.value

(Number) (length) The vehicle mileage (odometer) in meters

timestamp

(Date)

odometer(Object)
data.value

(Number) (length) The vehicle odometer value in a given units

timestamp

(Date)

engineTotalOperatingTime(Object)
data.value

(Number) (duration) The accumulated time of engine operation

timestamp

(Date)

tirePressureStatuses(Object)
data.value

(Array)

timestamp

(Date)

brakeLiningWearPreWarning(Object)
data.value

(String) (enum) Status of brake lining wear pre-warning

timestamp

(Date)

engineOilLifeRemaining(Object)
data.value

(Number) (double) Remaining life of engine oil which decreases over time

timestamp

(Date)

oemTroubleCodeValues(Object)
data.value

(Array) Additional OEM trouble codes

timestamp

(Date)

dieselExhaustFluidRange(Object)
data.value

(Number) (length) Distance remaining until diesel exhaust fluid is empty

timestamp

(Date)

dieselParticulateFilterSootLevel(Object)
data.value

(Number) (double) Level of soot in diesel exhaust particulate filter

timestamp

(Date)

confirmedTroubleCodes(Object)
data.value

(Array)

timestamp

(Date)

dieselExhaustFilterStatus(Object)
data.value

(Object)

timestamp

(Date)

Example

{
  "mileage": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 150000,
        "unit": "kilometers"
      }
    }
  },
  "engineOilTemperature": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 99.5,
        "unit": "celsius"
      }
    }
  },
  "speed": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 60,
        "unit": "kilometers_per_hour"
      }
    }
  },
  "engineRPM": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 2500,
        "unit": "revolutions_per_minute"
      }
    }
  },
  "fuelLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.9
      }
    }
  },
  "estimatedRange": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 265,
        "unit": "kilometers"
      }
    }
  },
  "washerFluidLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "filled"
      }
    }
  },
  "batteryVoltage": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 12.1,
        "unit": "volts"
      }
    }
  },
  "adBlueLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.9
      }
    }
  },
  "distanceSinceReset": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 1500.1,
        "unit": "kilometers"
      }
    }
  },
  "distanceSinceStart": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 12.4,
        "unit": "kilometers"
      }
    }
  },
  "fuelVolume": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 35.5,
        "unit": "liters"
      }
    }
  },
  "antiLockBraking": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "active"
      }
    }
  },
  "engineCoolantTemperature": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 20,
        "unit": "celsius"
      }
    }
  },
  "engineTotalOperatingHours": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 1500.65,
        "unit": "hours"
      }
    }
  },
  "engineTotalFuelConsumption": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 27587,
        "unit": "liters"
      }
    }
  },
  "brakeFluidLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "low"
      }
    }
  },
  "engineTorque": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.2
      }
    }
  },
  "engineLoad": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.1
      }
    }
  },
  "wheelBasedSpeed": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 65,
        "unit": "kilometers_per_hour"
      }
    }
  },
  "batteryLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.56
      }
    }
  },
  "checkControlMessages": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "ID": {
            "value": 1
          },
          "remainingTime": {
            "value": 105592,
            "unit": "minutes"
          },
          "text": {
            "value": "Check engine"
          },
          "status": {
            "value": "Alert"
          }
        }
      }
    }
  ],
  "tirePressures": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_left"
          },
          "pressure": {
            "value": 2.31,
            "unit": "bars"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_right"
          },
          "pressure": {
            "value": 2.31,
            "unit": "bars"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right"
          },
          "pressure": {
            "value": 2.24,
            "unit": "bars"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left"
          },
          "pressure": {
            "value": 2.24,
            "unit": "bars"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right_outer"
          },
          "pressure": {
            "value": 2.25,
            "unit": "bars"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left_outer"
          },
          "pressure": {
            "value": 2.25,
            "unit": "bars"
          }
        }
      }
    }
  ],
  "tireTemperatures": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_left"
          },
          "temperature": {
            "value": 40.1,
            "unit": "celsius"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_right"
          },
          "temperature": {
            "value": 40.2,
            "unit": "celsius"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right"
          },
          "temperature": {
            "value": 40.3,
            "unit": "celsius"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left"
          },
          "temperature": {
            "value": 40.4,
            "unit": "celsius"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right_outer"
          },
          "temperature": {
            "value": 40.5,
            "unit": "celsius"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left_outer"
          },
          "temperature": {
            "value": 40.6,
            "unit": "celsius"
          }
        }
      }
    }
  ],
  "wheelRPMs": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_left"
          },
          "RPM": {
            "value": 737,
            "unit": "revolutions_per_minute"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_right"
          },
          "RPM": {
            "value": 747,
            "unit": "revolutions_per_minute"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right"
          },
          "RPM": {
            "value": 777,
            "unit": "revolutions_per_minute"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left"
          },
          "RPM": {
            "value": 787,
            "unit": "revolutions_per_minute"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right_outer"
          },
          "RPM": {
            "value": 797,
            "unit": "revolutions_per_minute"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left_outer"
          },
          "RPM": {
            "value": 807,
            "unit": "revolutions_per_minute"
          }
        }
      }
    }
  ],
  "troubleCodes": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "occurrences": {
            "value": 2
          },
          "ID": {
            "value": "C1116FA"
          },
          "ecuID": {
            "value": "RDU_212FR"
          },
          "status": {
            "value": "PENDING"
          },
          "system": {
            "value": "unknown"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "occurrences": {
            "value": 2
          },
          "ID": {
            "value": "C163AFA"
          },
          "ecuID": {
            "value": "DTR212"
          },
          "status": {
            "value": "PENDING"
          },
          "system": {
            "value": "body"
          }
        }
      }
    }
  ],
  "mileageMeters": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 150001,
        "unit": "kilometers"
      }
    }
  },
  "odometer": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 2050,
        "unit": "kilometers"
      }
    }
  },
  "engineTotalOperatingTime": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 1500.65,
        "unit": "hours"
      }
    }
  },
  "tirePressureStatuses": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_left"
          },
          "status": {
            "value": "normal"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "front_right"
          },
          "status": {
            "value": "low"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right"
          },
          "status": {
            "value": "alert"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left"
          },
          "status": {
            "value": "normal"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_right_outer"
          },
          "status": {
            "value": "normal"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "location": {
            "value": "rear_left_outer"
          },
          "status": {
            "value": "normal"
          }
        }
      }
    }
  ],
  "brakeLiningWearPreWarning": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "inactive"
      }
    }
  },
  "engineOilLifeRemaining": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.88
      }
    }
  },
  "oemTroubleCodeValues": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "ID": {
            "value": "123ID"
          },
          "keyValue": {
            "key": {
              "value": "some_error"
            },
            "value": {
              "value": "some_value"
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "ID": {
            "value": "1B3C"
          },
          "keyValue": {
            "key": {
              "value": "important_error"
            },
            "value": {
              "value": "system fault 32"
            }
          }
        }
      }
    }
  ],
  "dieselExhaustFluidRange": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 2233,
        "unit": "kilometers"
      }
    }
  },
  "dieselParticulateFilterSootLevel": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.16
      }
    }
  },
  "confirmedTroubleCodes": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "ID": {
            "value": "801C10"
          },
          "ecuAddress": {
            "value": "16"
          },
          "ecuVariantName": {
            "value": "CAS"
          },
          "status": {
            "value": "ACTIVE"
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "ID": {
            "value": "D52C44"
          },
          "ecuAddress": {
            "value": "48"
          },
          "ecuVariantName": {
            "value": "CAS"
          },
          "status": {
            "value": "ACTIVE"
          }
        }
      }
    }
  ],
  "dieselExhaustFilterStatus": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "status": {
          "value": "unknown"
        },
        "component": {
          "value": "exhaust_filter"
        },
        "cleaning": {
          "value": "unknown"
        }
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Diagnostics.getAvailability()

Parameters

propertyNames

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

Example

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

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