{"id":15654478,"url":"https://github.com/hagronnestad/leaf-display","last_synced_at":"2025-05-01T02:40:57.534Z","repository":{"id":40917604,"uuid":"125135989","full_name":"hagronnestad/leaf-display","owner":"hagronnestad","description":"🚗🔋🔌 C# NissanConnect library and ESP8266 code powering a Nextion HMI display used to monitor and control a Nissan Leaf remotely.","archived":false,"fork":false,"pushed_at":"2022-12-08T01:33:01.000Z","size":17375,"stargazers_count":28,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-30T21:03:14.388Z","etag":null,"topics":["3d-printing","csharp","esp8266","hmi","leaf","nextion","nextion-hmi","nissan","nissan-connect","nissan-leaf","nissanconnect"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hagronnestad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-14T01:15:43.000Z","updated_at":"2024-09-07T07:01:39.000Z","dependencies_parsed_at":"2023-01-24T14:01:21.384Z","dependency_job_id":null,"html_url":"https://github.com/hagronnestad/leaf-display","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hagronnestad%2Fleaf-display","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hagronnestad%2Fleaf-display/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hagronnestad%2Fleaf-display/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hagronnestad%2Fleaf-display/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hagronnestad","download_url":"https://codeload.github.com/hagronnestad/leaf-display/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251814255,"owners_count":21648236,"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","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":["3d-printing","csharp","esp8266","hmi","leaf","nextion","nextion-hmi","nissan","nissan-connect","nissan-leaf","nissanconnect"],"created_at":"2024-10-03T12:51:57.316Z","updated_at":"2025-05-01T02:40:57.507Z","avatar_url":"https://github.com/hagronnestad.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nissan Leaf 2017 Dashboard\n\n*Animated preview of dashboard at different states.*\n\n![](Images/preview_v2.gif)\n\n*Images of the 3D-printed case and assembly.*\n\n![](Images/case04-thumb.png)\n![](Images/case05-thumb.png)\n![](Images/case03-thumb.png)\n![](Images/case02-thumb.png)\n![](Images/case01-thumb.png)\n\n---\n\n## LeafClient\nThe LeafClient is a cross platform console application which can authenticate with and query data from Nissan Connect EV.\n\n#### Usage\n```\nUsage: leafclient username password [-o {filename}] [-p {url}] [-last]\n\nOptions:\n        username        Your Nissan Connect username.\n        password        Your blowfish encrypted password.\n                        Encrypt your password at http://sladex.org/blowfish.js/.\n                        Key: 'uyI5Dj9g8VCOFDnBRUbr3g'. Cipher mode: ECB. Output type: BASE64.\n\n        -o              Outputs the result as JSON to {filename}.\n        -p              Posts the result as JSON to {url}.\n        -last           Don't query live data from car.\n```\n\n\\* *I intentionally did not add Blowfish encryption to the application because .NET does not have Blowfish encryption integrated in the framework and I did not want to add a dependency. The password needs to be supplied pre encrypted.*\n\n#### Example\n`dotnet LeafClient.dll username password -o data.json`\n\n#### Example output file\n```json\n{\n  \"Timestamp\": \"2019-03-20T22:00:00\",\n  \"NickName\": \"leaf1\",\n  \"Vin\": \"123456789\",\n  \"PluginState\": \"NOT_CONNECTED\",\n  \"CruisingRangeAcOn\": 168000,\n  \"CruisingRangeAcOff\": 186000,\n  \"MinutesToFull\": 240,\n  \"MinutesToFull200\": 150,\n  \"MinutesToFull200_6kW\": 70,\n  \"BatteryCapacity\": 240,\n  \"BatteryRemainingAmount\": 240,\n  \"BatteryRemainingAmountWH\": 0,\n  \"BatteryRemainingAmountkWH\": 0,\n  \"StateOfCharge\": 92\n}\n```\n\n#### Setup/configuration\nI use a cron job on a Linux server to periodically run the `LeafClient` console application. I use the `-o` flag which writes the JSON data to a file. This file is served by my web server and consumed by the ESP8266.\n\n---\n\n## IoT parts\n\n### ESP8266 Arduino sketch\nThe `ESP8266` folder contains an Arduino skecth to retrieve JSON data from a web server and send it to a Nextion display over serial.\n\n### Nextion display\nThe `Nextion` folder contains the HMI project for the display that shows the data. The Nextion display I used is the `NX4832T035_011` which is the 3.5\" version.\n\n![](Images/preview_v2.gif)\n\n*This is the Nextion HMI design. I used the actual Nissan Leaf dashboard as inspiration.*\n\n### Nextion 3D-printable case\nSTL-files for the Nextion case can be found in the `Nextion Case` folder. The case is designed to be used with one of these [ESP programmers](https://www.ebay.com/itm/ESP-Series-Programmer-for-ESP8285-ESP8266-ESP32-ESP01-adapter-for-arduino/323127795519?hash=item4b3beadf3f:g:AdEAAOSwWmNaoWfZ), which makes it very easy to power and flash the ESP through micro USB. It also provides easy access to power and serial pins for the Nextion display.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhagronnestad%2Fleaf-display","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhagronnestad%2Fleaf-display","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhagronnestad%2Fleaf-display/lists"}