Climate

getState([, propertyNames])

Declaration

hmkit.commands.Climate.getState()

Parameters

propertyNames

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

Returns

ClimateResponse

Example

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

ClimateResponse

Parameters

insideTemperature(Object)
data.value

(Number) (temperature) The inside temperature

timestamp

(Date)

outsideTemperature(Object)
data.value

(Number) (temperature) The outside temperature

timestamp

(Date)

driverTemperatureSetting(Object)
data.value

(Number) (temperature) The driver temperature setting

timestamp

(Date)

passengerTemperatureSetting(Object)
data.value

(Number) (temperature) The passenger temperature setting

timestamp

(Date)

hvacState(Object)
data.value

(String) (enum)

timestamp

(Date)

defoggingState(Object)
data.value

(String) (enum)

timestamp

(Date)

defrostingState(Object)
data.value

(String) (enum)

timestamp

(Date)

ionisingState(Object)
data.value

(String) (enum)

timestamp

(Date)

defrostingTemperatureSetting(Object)
data.value

(Number) (temperature) The defrosting temperature setting

timestamp

(Date)

hvacWeekdayStartingTimes(Object)
data.value

(Array)

timestamp

(Date)

rearTemperatureSetting(Object)
data.value

(Number) (temperature) The rear temperature

timestamp

(Date)

Example

{
  "insideTemperature": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 19.1,
        "unit": "celsius"
      }
    }
  },
  "outsideTemperature": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 12.2,
        "unit": "celsius"
      }
    }
  },
  "driverTemperatureSetting": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 21.5,
        "unit": "celsius"
      }
    }
  },
  "passengerTemperatureSetting": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 21.7,
        "unit": "celsius"
      }
    }
  },
  "hvacState": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "active"
      }
    }
  },
  "defoggingState": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "inactive"
      }
    }
  },
  "defrostingState": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "inactive"
      }
    }
  },
  "ionisingState": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": "inactive"
      }
    }
  },
  "defrostingTemperatureSetting": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 21.2,
        "unit": "celsius"
      }
    }
  },
  "hvacWeekdayStartingTimes": [
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "monday"
          },
          "time": {
            "hour": {
              "value": 16
            },
            "minute": {
              "value": 0
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "tuesday"
          },
          "time": {
            "hour": {
              "value": 16
            },
            "minute": {
              "value": 0
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "wednesday"
          },
          "time": {
            "hour": {
              "value": 16
            },
            "minute": {
              "value": 0
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "thursday"
          },
          "time": {
            "hour": {
              "value": 16
            },
            "minute": {
              "value": 0
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "friday"
          },
          "time": {
            "hour": {
              "value": 16
            },
            "minute": {
              "value": 0
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "saturday"
          },
          "time": {
            "hour": {
              "value": 18
            },
            "minute": {
              "value": 30
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "sunday"
          },
          "time": {
            "hour": {
              "value": 19
            },
            "minute": {
              "value": 31
            }
          }
        }
      }
    },
    {
      "timestamp": "2020-12-21T15:48:04.887Z",
      "data": {
        "value": {
          "weekday": {
            "value": "automatic"
          },
          "time": {
            "hour": {
              "value": 16
            },
            "minute": {
              "value": 0
            }
          }
        }
      }
    }
  ],
  "rearTemperatureSetting": {
    "timestamp": "2020-12-21T15:48:04.887Z",
    "data": {
      "value": {
        "value": 21.6,
        "unit": "celsius"
      }
    }
  }
}

getAvailability([, propertyNames])

Declaration

hmkit.commands.Climate.getAvailability()

Parameters

propertyNames

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

Example

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

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

changeStartingTimes({ hvacWeekdayStartingTimes })

Parameters

hvacWeekdayStartingTimes

(Array)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Climate.changeStartingTimes({
    "hvacWeekdayStartingTimes": [
      {
        "weekday": {
          "value": "monday"
        },
        "time": {
          "hour": {
            "value": 16
          },
          "minute": {
            "value": 0
          }
        }
      },
      {
        "weekday": {
          "value": "tuesday"
        },
        "time": {
          "hour": {
            "value": 16
          },
          "minute": {
            "value": 0
          }
        }
      },
      {
        "weekday": {
          "value": "wednesday"
        },
        "time": {
          "hour": {
            "value": 16
          },
          "minute": {
            "value": 0
          }
        }
      },
      {
        "weekday": {
          "value": "thursday"
        },
        "time": {
          "hour": {
            "value": 16
          },
          "minute": {
            "value": 0
          }
        }
      },
      {
        "weekday": {
          "value": "friday"
        },
        "time": {
          "hour": {
            "value": 16
          },
          "minute": {
            "value": 0
          }
        }
      },
      {
        "weekday": {
          "value": "saturday"
        },
        "time": {
          "hour": {
            "value": 18
          },
          "minute": {
            "value": 30
          }
        }
      },
      {
        "weekday": {
          "value": "sunday"
        },
        "time": {
          "hour": {
            "value": 19
          },
          "minute": {
            "value": 31
          }
        }
      },
      {
        "weekday": {
          "value": "automatic"
        },
        "time": {
          "hour": {
            "value": 16
          },
          "minute": {
            "value": 0
          }
        }
      }
    ]
  }),
  accessCertificate
);

startStopHvac({ hvacState })

Parameters

hvacState

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Climate.startStopHvac({
    "hvacState": "active"
  }),
  accessCertificate
);

startStopDefogging({ defoggingState })

Parameters

defoggingState

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Climate.startStopDefogging({
    "defoggingState": "inactive"
  }),
  accessCertificate
);

startStopDefrosting({ defrostingState })

Parameters

defrostingState

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Climate.startStopDefrosting({
    "defrostingState": "inactive"
  }),
  accessCertificate
);

startStopIonising({ ionisingState })

Parameters

ionisingState

(String) (enum)

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Climate.startStopIonising({
    "ionisingState": "inactive"
  }),
  accessCertificate
);

setTemperatureSettings({ driverTemperatureSetting, passengerTemperatureSetting, rearTemperatureSetting })

Parameters

driverTemperatureSetting

(Number) (temperature) The driver temperature setting

passengerTemperatureSetting

(Number) (temperature) The passenger temperature setting

rearTemperatureSetting

(Number) (temperature) The rear temperature

Example

hmkit.telematics.sendCommand(
  hmkit.commands.Climate.setTemperatureSettings({
    "driverTemperatureSetting": {
      "celsius": 21.5
    },
    "passengerTemperatureSetting": {
      "celsius": 21.7
    },
    "rearTemperatureSetting": {
      "celsius": 21.6
    }
  }),
  accessCertificate
);