1.1.2 • Published 8 months ago

leaf-connect v1.1.2

Weekly downloads
-
License
MIT
Repository
-
Last release
8 months ago

leaf-connect

Node.js client library for the Nissan Leaf API

Requirements

Install node.js

Installation

npm install leaf-connect

Usage

Example

See examples/index.js

Setup client

const leafConnect = require('leaf-connect')

try {
  const client = await leafConnect({
    username: 'your-nissan-you@email.com',
    password: 'password'
    /*
      regionCode: 'NE', // See "region codes" section in docs
      locale: 'en-US',
      debug: true.
      pollingInterval: 30000 // in seconds
    */
  })
} catch (error) {
  console.error(error)
}

Methods

sessionInfo

client.sessionInfo()

status

await client.status()

cachedStatus

await client.cachedStatus()

climateControlStatus

await client.climateControlStatus()

climateControlTurnOn

await client.climateControlTurnOn()

climateControlTurnOff

await client.climateControlTurnOff()

chargingStart

await client.chargingStart()

history

await client.history()

location (removed?)

await client.location()

Region codes

RegionCode
EuropeNE
CanadaNCI
USANNA
AustraliaNMA
JapanNML

Acknowledgements

This library was inspired by Jason Horne's pywings2 Carwings library for Python.

License

MIT

About

Created with ❤ for Alheimsins

1.1.2

8 months ago

1.1.1

10 months ago

1.0.3

3 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago