PHPackages                             gboudreau/nissan-connect-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. gboudreau/nissan-connect-php

ActiveLibrary[API Development](/categories/api)

gboudreau/nissan-connect-php
============================

This is a simple library that will allow you to use the Nissan Connect (was Carwings) API to check on your Nissan LEAF, and start/stop climate control, or start charging.

2.2.2(7y ago)417117[7 issues](https://github.com/gboudreau/nissan-connect-php/issues)GPL-3.0-or-laterPHPPHP &gt;=5.0

Since Mar 12Pushed 2y ago10 watchersCompare

[ Source](https://github.com/gboudreau/nissan-connect-php)[ Packagist](https://packagist.org/packages/gboudreau/nissan-connect-php)[ Docs](https://github.com/gboudreau/nissan-connect-php)[ RSS](/packages/gboudreau-nissan-connect-php/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (14)Used By (0)

Nissan Connect PHP Class
========================

[](#nissan-connect-php-class)

Use the Nissan Connect (was Carwings) API using a simple PHP class.

Installation
------------

[](#installation)

You can just download NissanConnect.class.php and require/include it, or use composer:

```
require "gboudreau/nissan-connect-php": "dev-master"

```

If you are in North America, you probably need to use the `new-api` branch, instead of `master`:

```
require "gboudreau/nissan-connect-php": "dev-new-api"

```

Usage
-----

[](#usage)

```
require_once 'NissanConnect.class.php';

// All parameters except the first two (username & password) are optional; the default values are shown here
// If you can't use the openssl_encrypt() function (very unlikely), you can use a web-service to encrypt your password. Simply change the last parameter to NissanConnect::ENCRYPTION_OPTION_WEBSERVICE
$nissanConnect = new NissanConnect('you@something.com', 'your_password_here', 'America/New_York', NissanConnect::COUNTRY_US, NissanConnect::ENCRYPTION_OPTION_OPENSSL);

// Change to TRUE to log debugging information into your PHP error log
$nissanConnect->debug = FALSE;

// How long (in seconds) should we wait for the result before giving up. Only used when $waitForResult = TRUE
$nissanConnect->maxWaitTime = 290;

try {
    $result = $nissanConnect->getStatus();
    var_dump($result);

    // Start charging
    $nissanConnect->startCharge();

    // Should we wait until the command result is known, before returning? Enabling this will wait until the car executed the command, and returned the response, which can sometimes take a few minutes.
    $waitForResult = FALSE;

    // Start Climate Control
    $nissanConnect->startClimateControl($waitForResult);

    // Stop Climate Control
    $nissanConnect->stopClimateControl($waitForResult);
} catch (Exception $ex) {
    echo "An error occurred: " . $ex->getMessage();
}
```

Example output (`var_dump`ed result of call to `getStatus`):

```
object(stdClass)#9 (18) {
  ["LastUpdated"]=>
  string(16) "2016-02-21 15:24"
  ["PluggedIn"]=>
  bool(true)
  ["Charging"]=>
  bool(false)
  ["ChargingMode"]=>
  string(12) "NOT_CHARGING"
  ["BatteryCapacity"]=>
  int(12)
  ["BatteryRemainingAmount"]=>
  int(9)
  ["BatteryRemainingAmountWH"]=>
  NULL
  ["BatteryRemainingAmountkWH"]=>
  NULL
  ["TimeRequiredToFull"]=>
  NULL
  ["TimeRequiredToFull200"]=>
  NULL
  ["TimeRequiredToFull200_6kW"]=>
  NULL
  ["CruisingRangeAcOn"]=>
  float(90.4)
  ["CruisingRangeAcOff"]=>
  float(115.712)
  ["CruisingRangeUnit"]=>
  string(2) "km"
  ["RemoteACRunning"]=>
  bool(false)
  ["RemoteACLastChanged"]=>
  string(16) "2016-02-21 15:24"
  ["ACStartStopURL"]=>
  NULL
  ["ACDurationBatterySec"]=>
  int(900)
  ["ACDurationPluggedSec"]=>
  int(7200)
}
```

Acknowledgements
----------------

[](#acknowledgements)

Thanks to [Joshua Perry](https://github.com/joshperry) for his [Carwings protocol reference](https://github.com/joshperry/carwings) which I used as a reference to refactor my [One-click access to LEAF](https://github.com/gboudreau/LEAF_Carwings_EasyAccess) by creating this class.

Developed mainly using a free open-source license of
[![PHPStorm](https://camo.githubusercontent.com/c0181c33b04eaca23020bcdeb8fd6444bee3b4583dc954263d91a74e26eb2c58/68747470733a2f2f64337565706a31323473357263782e636c6f756466726f6e742e6e65742f6974656d732f3056307a32703065304b314430463374327231502f6c6f676f5f50687053746f726d2e706e67)](https://camo.githubusercontent.com/c0181c33b04eaca23020bcdeb8fd6444bee3b4583dc954263d91a74e26eb2c58/68747470733a2f2f64337565706a31323473357263782e636c6f756466726f6e742e6e65742f6974656d732f3056307a32703065304b314430463374327231502f6c6f676f5f50687053746f726d2e706e67)
kindly provided by [JetBrains](http://www.jetbrains.com/). Thanks guys!

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community22

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 68.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~93 days

Recently: every ~208 days

Total

12

Last Release

2728d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ee202e84c95872d5ce263b7d328ab7536cba91b1c979d8400fa810e295fa1f0f?d=identicon)[gboudreau](/maintainers/gboudreau)

---

Top Contributors

[![gboudreau](https://avatars.githubusercontent.com/u/370329?v=4)](https://github.com/gboudreau "gboudreau (50 commits)")[![linuscorin](https://avatars.githubusercontent.com/u/475863?v=4)](https://github.com/linuscorin "linuscorin (10 commits)")[![cedric222](https://avatars.githubusercontent.com/u/10106181?v=4)](https://github.com/cedric222 "cedric222 (8 commits)")[![pghope](https://avatars.githubusercontent.com/u/12090458?v=4)](https://github.com/pghope "pghope (1 commits)")[![carestad](https://avatars.githubusercontent.com/u/65263?v=4)](https://github.com/carestad "carestad (1 commits)")[![Raiden38](https://avatars.githubusercontent.com/u/6731214?v=4)](https://github.com/Raiden38 "Raiden38 (1 commits)")[![grothkopp](https://avatars.githubusercontent.com/u/25702?v=4)](https://github.com/grothkopp "grothkopp (1 commits)")[![mrpjevans](https://avatars.githubusercontent.com/u/7632188?v=4)](https://github.com/mrpjevans "mrpjevans (1 commits)")

---

Tags

apicarwingsleafnissanphpapileafnissanNissanConnectcarwings

### Embed Badge

![Health badge](/badges/gboudreau-nissan-connect-php/health.svg)

```
[![Health](https://phpackages.com/badges/gboudreau-nissan-connect-php/health.svg)](https://phpackages.com/packages/gboudreau-nissan-connect-php)
```

###  Alternatives

[m165437/laravel-blueprint-docs

API Blueprint Renderer for Laravel

22779.5k](/packages/m165437-laravel-blueprint-docs)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
