{"id":16534430,"url":"https://github.com/gboudreau/nissan-connect-php","last_synced_at":"2025-10-28T01:09:43.504Z","repository":{"id":62509266,"uuid":"52222440","full_name":"gboudreau/nissan-connect-php","owner":"gboudreau","description":"Use the Nissan Connect (was Carwings) API using a simple PHP class.","archived":false,"fork":false,"pushed_at":"2024-05-18T14:08:52.000Z","size":118,"stargazers_count":40,"open_issues_count":6,"forks_count":18,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-06-02T16:20:18.524Z","etag":null,"topics":["api","carwings","leaf","nissan","php"],"latest_commit_sha":null,"homepage":null,"language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gboudreau.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-02-21T18:59:43.000Z","updated_at":"2025-04-27T14:49:01.000Z","dependencies_parsed_at":"2025-04-30T09:16:05.482Z","dependency_job_id":"fd21cedc-198a-42b7-b81f-7e3d97e233ec","html_url":"https://github.com/gboudreau/nissan-connect-php","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/gboudreau/nissan-connect-php","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboudreau%2Fnissan-connect-php","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboudreau%2Fnissan-connect-php/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboudreau%2Fnissan-connect-php/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboudreau%2Fnissan-connect-php/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gboudreau","download_url":"https://codeload.github.com/gboudreau/nissan-connect-php/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gboudreau%2Fnissan-connect-php/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281367260,"owners_count":26488780,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-27T02:00:05.855Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","carwings","leaf","nissan","php"],"created_at":"2024-10-11T18:24:09.475Z","updated_at":"2025-10-28T01:09:43.475Z","avatar_url":"https://github.com/gboudreau.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nissan Connect PHP Class\nUse the Nissan Connect (was Carwings) API using a simple PHP class.\n\n\n## Installation\n\nYou can just download NissanConnect.class.php and require/include it, or use composer:\n\n    require \"gboudreau/nissan-connect-php\": \"dev-master\"\n\nIf you are in North America, you probably need to use the `new-api` branch, instead of `master`:\n\n    require \"gboudreau/nissan-connect-php\": \"dev-new-api\"\n\n## Usage\n\n```php\nrequire_once 'NissanConnect.class.php';\n\n// All parameters except the first two (username \u0026 password) are optional; the default values are shown here\n// 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\n$nissanConnect = new NissanConnect('you@something.com', 'your_password_here', 'America/New_York', NissanConnect::COUNTRY_US, NissanConnect::ENCRYPTION_OPTION_OPENSSL);\n\n// Change to TRUE to log debugging information into your PHP error log\n$nissanConnect-\u003edebug = FALSE;\n\n// How long (in seconds) should we wait for the result before giving up. Only used when $waitForResult = TRUE\n$nissanConnect-\u003emaxWaitTime = 290;\n\ntry {\n    $result = $nissanConnect-\u003egetStatus();\n    var_dump($result);\n    \n    // Start charging\n    $nissanConnect-\u003estartCharge();\n    \n    // 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.\n    $waitForResult = FALSE; \n    \n    // Start Climate Control\n    $nissanConnect-\u003estartClimateControl($waitForResult);\n    \n    // Stop Climate Control\n    $nissanConnect-\u003estopClimateControl($waitForResult);\n} catch (Exception $ex) {\n    echo \"An error occurred: \" . $ex-\u003egetMessage();\n}\n```\n\nExample output (`var_dump`ed result of call to `getStatus`):\n\n```php\nobject(stdClass)#9 (18) {\n  [\"LastUpdated\"]=\u003e\n  string(16) \"2016-02-21 15:24\"\n  [\"PluggedIn\"]=\u003e\n  bool(true)\n  [\"Charging\"]=\u003e\n  bool(false)\n  [\"ChargingMode\"]=\u003e\n  string(12) \"NOT_CHARGING\"\n  [\"BatteryCapacity\"]=\u003e\n  int(12)\n  [\"BatteryRemainingAmount\"]=\u003e\n  int(9)\n  [\"BatteryRemainingAmountWH\"]=\u003e\n  NULL\n  [\"BatteryRemainingAmountkWH\"]=\u003e\n  NULL\n  [\"TimeRequiredToFull\"]=\u003e\n  NULL\n  [\"TimeRequiredToFull200\"]=\u003e\n  NULL\n  [\"TimeRequiredToFull200_6kW\"]=\u003e\n  NULL\n  [\"CruisingRangeAcOn\"]=\u003e\n  float(90.4)\n  [\"CruisingRangeAcOff\"]=\u003e\n  float(115.712)\n  [\"CruisingRangeUnit\"]=\u003e\n  string(2) \"km\"\n  [\"RemoteACRunning\"]=\u003e\n  bool(false)\n  [\"RemoteACLastChanged\"]=\u003e\n  string(16) \"2016-02-21 15:24\"\n  [\"ACStartStopURL\"]=\u003e\n  NULL\n  [\"ACDurationBatterySec\"]=\u003e\n  int(900)\n  [\"ACDurationPluggedSec\"]=\u003e\n  int(7200)\n}\n```\n\n## Acknowledgements\n\nThanks 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.\n\nDeveloped mainly using a free open-source license of  \n![PHPStorm](https://d3uepj124s5rcx.cloudfront.net/items/0V0z2p0e0K1D0F3t2r1P/logo_PhpStorm.png)  \nkindly provided by [JetBrains](http://www.jetbrains.com/). Thanks guys!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgboudreau%2Fnissan-connect-php","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgboudreau%2Fnissan-connect-php","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgboudreau%2Fnissan-connect-php/lists"}