Weather Conditions

getWeatherConditions([, propertyNames])

Declaration

hmkit.commands.WeatherConditions.getWeatherConditions()

Parameters

propertyNames

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

Returns

WeatherConditionsResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.WeatherConditions.getWeatherConditions(),
  accessCertificate
);

WeatherConditionsResponse

Parameters

rainIntensity(Object)
data.value

(Number) (double) Measured raining intensity percentage, whereas 0% is no rain and 100% is maximum rain

timestamp

(Date)

Example

{
  "rainIntensity": {
    "timestamp": "2021-06-01T15:48:04.887Z",
    "data": {
      "value": 1
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.WeatherConditions.getAvailability()

Parameters

propertyNames

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

Example

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

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