Node.js client library for the Nissan Leaf API
Install node.js
npm install leaf-connectconst 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)
}client.sessionInfo()await client.status()await client.cachedStatus()await client.climateControlStatus()await client.climateControlTurnOn()await client.climateControlTurnOff()await client.chargingStart()await client.history()await client.location()| Region | Code |
|---|---|
| Europe | NE |
| Canada | NCI |
| USA | NNA |
| Australia | NMA |
| Japan | NML |
This library was inspired by Jason Horne's pywings2 Carwings library for Python.
Created with ❤ for Alheimsins
