Light Conditions

getLightConditions([, propertyNames])

Declaration

hmkit.commands.LightConditions.getLightConditions()

Parameters

propertyNames

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

Returns

LightConditionsResponse

Example

hmkit.telematics.sendCommand(
  hmkit.commands.LightConditions.getLightConditions(),
  accessCertificate
);

LightConditionsResponse

Parameters

outsideLight(Object)
data.value

(Number) (illuminance) Measured outside illuminance

timestamp

(Date)

insideLight(Object)
data.value

(Number) (illuminance) Measured inside illuminance

timestamp

(Date)

Example

{
  "outsideLight": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 111000,
        "unit": "lux"
      }
    }
  },
  "insideLight": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 0.25,
        "unit": "lux"
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.LightConditions.getAvailability()

Parameters

propertyNames

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

Example

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

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