npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@qrry43/kia-uvo-client

v0.1.1

Published

This library interacts with Kia Uvo, Kia's infotainment and telematics service.

Downloads

6

Readme

kia-uvo-client

npm (scoped) Travis (.com) branch NPM

This library interacts with Kia Uvo, Kia's infotainment and telematics service. It allows one to fetch vehicle status, including lock, engine, and battery state and many other details.

Synopsis

Login, refresh vehicle data, then fetch and print the current battery charge level.

const UvoClient = require('@qrry43/kia-uvo-client')

const client = new UvoClient()

client.authenticate({
  userId: 'your-user-id',
  password: 'your-password'
}).then(({vehicleSummary}) =>
  client.refreshVehicleStatus({vehicleKey: vehicleSummary[0].vehicleKey})
).then(({vehicleKey}) =>
  client.getVehicleStatus({vehicleKey})
).then(data => {
  const chargePct = data.vehicleInfoList[0].lastVehicleInfo.vehicleStatusRpt.vehicleStatus.batteryStatus.stateOfCharge
  console.log(`Battery charge: ${chargePct}%`)
})

Installing

npm install @qrry43/kia-uvo-client

Constructor

Create a new client object. There are no parameters.

const client = new UvoClient()

Methods

client.authenticate

Connect to the service and authenticate with a username and password. Returns a promise which resolves to an object with a list of vehicles. Authentication will time out and needs to be repeated periodically.

Parameters:

  • userId the user id, may be an email address
  • password the user password

Returns a promise which resolves to an object like the following:

{
  "vehicleSummary": [
    {
      "vin": "some-vin",
      "vehicleIdentifier": "some-id",
      "modelName": "NIRO PHEV",
      "modelYear": "2019",
      "nickName": "My NIRO PHEV",
      "generation": 2,
      "extColorCode": "CR5",
      "trim": "EX PRE",
      "imagePath": { },
      "enrollmentStatus": 1,
      "fatcAvailable": 0,
      "telematicsUnit": 1,
      "fuelType": 7,
      "colorName": "RUNWAY RED",
      "activationType": 1,
      "mileage": "12345.6",
      "dealerCode": "OR011",
      "mobileStore": [],
      "supportedApp": { },
      "supportAdditionalDriver": 0,
      "customerType": 0,
      "projectCode": "SOMECODE",
      "headUnitDesc": "AVN5.0",
      "provStatus": "4",
      "enrollmentSuppressionType": 0,
      "vehicleKey": "some-vehicle-key"
    }
  ]
}

The most important value is the vehicleKey which is a unique key for the vehicle. This key changes periodically (probably to prevent replay attacks) and is required for all other actions.

client.refreshVehicleStatus

Uvo will serve stale data. This method tells Uvo to fetch fresh data. This may take some time to complete and it is likely that there are consequences to calling this too frequently.

Parameters:

  • vehicleKey the key from client.authenticate

Returns a promise which resolves to the parameters passed to it.

client.getVehicleStatus

This method returns the most recent cached vehicle status. If you need the current status, be sure to call client.refreshVehicleStatus.

Parameters:

  • vehicleKey the key from client.authenticate

Returns a promise which resolves to a very large data structure, similar to the following:

{
  "vehicleInfoList": [
    {
      "vinKey": "some-key",
      "vehicleConfig": {
      },
      "lastVehicleInfo": {
        "vehicleNickName": "My Car",
        "vehicleStatusRpt": {
          "reportDate": {
            "utc": "20210722052311",
            "offset": -7
          },
          "vehicleStatus": {
            "engine": false,
            "doorLock": true,
            "lowFuelLight": false,
          }
        }
      }
    }
  ]
}

Copyright

Copyright (c) 2021 Matt Harrington