{"id":23159800,"url":"https://github.com/edent/renault-zoe-api","last_synced_at":"2026-03-07T02:32:39.653Z","repository":{"id":142469962,"uuid":"71012545","full_name":"edent/Renault-Zoe-API","owner":"edent","description":"A basic API for getting information about your Renault Zoe Electric Vehicle.","archived":false,"fork":false,"pushed_at":"2022-01-13T14:46:28.000Z","size":29,"stargazers_count":95,"open_issues_count":5,"forks_count":24,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-05T17:36:54.129Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edent.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null},"funding":{"github":"edent","patreon":"edent","open_collective":"edent","ko_fi":"edent","custom":"https://www.amazon.co.uk/hz/wishlist/ls/13GFCFR2B2IX4?tag=edentgithub-21"}},"created_at":"2016-10-15T20:47:42.000Z","updated_at":"2025-03-26T20:24:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a89e3d4-00c8-42f0-97df-062bbd877a85","html_url":"https://github.com/edent/Renault-Zoe-API","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/edent/Renault-Zoe-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edent%2FRenault-Zoe-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edent%2FRenault-Zoe-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edent%2FRenault-Zoe-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edent%2FRenault-Zoe-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edent","download_url":"https://codeload.github.com/edent/Renault-Zoe-API/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edent%2FRenault-Zoe-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270933573,"owners_count":24670433,"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-08-18T02:00:08.743Z","response_time":89,"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":[],"created_at":"2024-12-17T22:48:14.670Z","updated_at":"2026-03-07T02:32:39.617Z","avatar_url":"https://github.com/edent.png","language":"Python","funding_links":["https://github.com/sponsors/edent","https://patreon.com/edent","https://opencollective.com/edent","https://ko-fi.com/edent","https://www.amazon.co.uk/hz/wishlist/ls/13GFCFR2B2IX4?tag=edentgithub-21"],"categories":[],"sub_categories":[],"readme":"# Renault-Zoe-API\nA basic API for getting information about your Renault Zoe Electric Vehicle.  [Read the original blog post](https://shkspr.mobi/blog/2016/10/reverse-engineering-the-renault-zoe-api).\n\n**Please Note!** I no longer have a Renault Zoe, so I am unable to keep this API updated. You are welcome to discuss issues with it in the \"issues\" tab.\n\nAll these API calls can be found by using the [Renault ZE Services website](https://www.services.renault-ze.com). I am indebted to [this German blog post](http://www.aironaut.ch/my-ze-online-abfragen/) for kicking off this work.  I'd also like to thank Renault for their [\"esoteric\" use of JavaScript](https://www.services.renault-ze.com/js/main.js)!\n\n[![Buy me a coffee](https://www.ko-fi.com/img/donate_sm.png)](https://ko-fi.com/edent)\n\n\n## What's Available?\nThis API is fairly limited, here's what you can do with it:\n\n* See battery status, range, charging status.\n* Start preconditioning\n* See preconditioning history\n* See and set charging schedule.\n* See charging history\n\n## Getting started\n\nFirst, register with [Renault ZE Services](https://www.services.renault-ze.com/).  This will give you a username and password.\n\nSecondly, you'll need to get your VIN and API token.  This can be obtained by posting the username and password to Renault.  For example:\n\n```\ncurl \\\n   -H \"Content-Type: application/json\" \\\n   -X POST \\\n   -d '{\"username\":\"you@example.com\",\"password\":\"P4ssw0rd\"}' \\\n   https://www.services.renault-ze.com/api/user/login`\n```\n\nThis will get you back some JSON with your API tokens.  Here's an example:\n\n```\n{\n\t\"token\": \"AAAA\",\n\t\"refresh_token\": \"BBBB\",\n\t\"user\": {\n\t\t\"id\": \"CCCC\",\n\t\t\"locale\": \"en_GB\",\n\t\t\"country\": \"GB\",\n\t\t\"timezone\": \"Europe/London\",\n\t\t\"email\": \"you@example.com\",\n\t\t\"first_name\": \"Terence\",\n\t\t\"last_name\": \"Eden\",\n\t\t\"phone_number\": \"+447700900123\",\n\t\t\"vehicle_details\": {\n\t\t\t\"timezone\": \"Europe/London\",\n\t\t\t\"VIN\": \"VVVV\",\n\t\t\t\"activation_code\": \"GGGG\",\n\t\t\t\"phone_number\": \"+447700900123\"\n\t\t},\n\t\t\"scopes\": [\"BATTERY_CHARGE_STATUS\", \n\t\t\t\t   \"BATTERY_CHARGE_HISTORY\", \n\t\t\t\t   \"BATTERY_CHARGE_REMOTE_ACTIVATION\", \n\t\t\t\t   \"BATTERY_CHARGE_SCHEDULING\", \n\t\t\t\t   \"AC_REMOTE_CONTROL\", \n\t\t\t\t   \"BATTERY_CHARGE_LOWALERT\"],\n\t\t\"active_account\": \"DDDD\",\n\t\t\"associated_vehicles\": [{\n\t\t\t\"VIN\": \"VVVV\",\n\t\t\t\"activation_code\": \"GGGG\",\n\t\t\t\"user_id\": \"XXXX\"\n\t\t}],\n\t\t\"gdc_uid\": \"YYYY\"\n\t}\n}\n```\n\n## Battery Status\n\nLet's start with the battery.  We need to use your `token` and `VIN` from above.\n\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   \"https://www.services.renault-ze.com/api/vehicle/VVVV/battery\"\n```\n\nThis gets us:\n```\n{\n\t\"charging\": false,\n\t\"plugged\": true,\n\t\"charge_level\": 100,\n\t\"remaining_range\": 124.0,\n\t\"last_update\": 1476472742000,\n\t\"charging_point\": \"INVALID\",\n\t\"remaining_time\": 750\n}\n```\n\nA few point to note. The `remaining_range` is in Kilometres.  The `last_update` is a Unix timestamp. The `remaining_time` is in minutes.\nThe `charging_point` is available only when `plugged` is true.\nThe `remaining_time` is available only when `charging` is true.\n\n## Preconditioning\n\nThe Zoe can be set to warm-up or cool down depending on the last temperate you set in the car.  It will also blast the front window de-mister.  The process takes five minutes, so you can set it shortly before you need to set off.  Preconditioning will only work when the car's battery is above 45%.\n\n### Precondition Now\n\n```\ncurl \\\n   -X POST \\\n   -H 'Content-Type: application/json' \\\n   -H \"Authorization: Bearer AAAA\" \\\n   \"https://www.services.renault-ze.com/api/vehicle/VVVV/air-conditioning\"\n```\n\nThis command does **not** return any value.  There is also no way to cancel the command remotely - you have to physically enter the car and turn it off.\n\n### Precondition Later\nIf you know that you want to leave at a specific time, you can set the car to precondition at a set time.\n\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   -H 'Content-Type: application/json;charset=UTF-8' \\\n   --data-binary '{\"start\":\"1753\"}' \\\n   'https://www.services.renault-ze.com/api/vehicle/VVVV/air-conditioning/scheduler'\n```\n\nAs far as I can tell, the `start` time is when you want the conditioning to start - not when you want it to be finished.\n\nThere is **no way** to cancel a precondition.\n\n### Preconditioning Last Status\nWant to see if the preconditioning message was received by the car correctly?\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   \"https://www.services.renault-ze.com/api/vehicle/VVVV/air-conditioning/last\"\n```\n\nThis returns information about who or what sent the request:\n\n```\n{\n\t\"date\": 1476538293000,\n\t\"type\": \"USER_REQUEST\",\n\t\"result\": \"SUCCESS\"\n}\n```\n\n### Preconditioning History\nYou can also see how often your car has been preconditioned.\n\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   https://www.services.renault-ze.com/api/vehicle/VVVV/air-conditioning?begin=1016\u0026end=1016\n```\n\n```\n[{\n\t\"date\": 1476165377000,\n\t\"type\": \"USER_REQUEST\",\n\t\"result\": \"ERROR\"\n}, {\n\t\"date\": 1476079325000,\n\t\"type\": \"CAR_NOTIFICATION\",\n\t\"result\": \"ERROR\"\n}, {\n\t\"date\": 1476079270000,\n\t\"type\": \"USER_REQUEST\",\n\t\"result\": \"SUCCESS\"\n}, {\n\t\"date\": 1476079266000,\n\t\"type\": \"CAR_NOTIFICATION\",\n\t\"result\": \"SUCCESS\"\n}]\n```\n\n## Start Charging\n\nYou may have set your Zoe only to charge at specific times - perhaps to take advantage of cheap rate electricity.  You can override this by issuing the charge command.\n\n```\ncurl \\\n   -X POST \\\n   -H 'Content-Type: application/json' \\\n   -H \"Authorization: Bearer AAAA\" \\\n   https://www.services.renault-ze.com/api/vehicle/VVVV/charge\n```\n\nAgain, this won't return a response.  If your battery cannot be charged, you'll be notified via email or SMS depending on the preference you set up when you registered.\n\n### Charging History\n\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   https://www.services.renault-ze.com/api/vehicle/VVVV/charge/history?begin=1016\u0026end=1016\n```\n\nThe `begin` and `end` take `MMYY` as their arguments. That is, if you want October 2016 you need to use `1016`.\n\nThis returns an array, the most recent charging session at the top.\n\n```\n[{\n\t\"date\": 1476538527000,\n\t\"type\": \"START_NOTIFICATION\",\n\t\"charging_point\": \"SLOW\",\n\t\"charge_level\": 99,\n\t\"remaining_autonomy\": 119\n}, {\n\t\"date\": 1476472727000,\n\t\"type\": \"END_NOTIFICATION\",\n\t\"charging_point\": \"INVALID\",\n\t\"charge_level\": 100,\n\t\"remaining_autonomy\": 124\n}, {\n\t\"date\": 1476462129000,\n\t\"type\": \"START_NOTIFICATION\",\n\t\"charging_point\": \"ACCELERATED\",\n\t\"charge_level\": 34,\n\t\"remaining_autonomy\": 42,\n\t\"remaining_time\": 10500000\n}]\n```\n\nThe `remaining_autonomy` is, again, the range in **Km**.  The `remaining time` is expressed in *milliseconds*.  So `10500000` is the equivalent of 2 hours and 55 minutes.\n\n\n\n## Notifications\nYou can use the website to set up notifications. For example, if there is a problem with your charge, Renault will send you an SMS.  This API call lets you see what notifications you have set up.\n\n### Set Notifications\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   -X PUT \\\n   -H 'Content-Type: application/json;charset=UTF-8' \\\n   --data-binary '{\"battery_status\":\"EMAIL\",\"charge_start\":\"SMS\",\"charge_end\":\"SMS\",\"charge_problem\":\"SMS\",\"low_battery\":\"SMS\",\"low_battery_reminder\":\"SMS\",\"do_not_disturb\":null}' \\\n   'https://www.services.renault-ze.com/api/vehicle/VVVV/settings/notification'  \n```\n\nYou can change any of the options with `EMAIL` or `SMS`.\n\nYou can set a \"do not disturb\" option.  This will suppress all notifications during specific times.  Sadly, this is a fairly blunt instrument - you can only set one time which then is enforced every day.\n\nIn the above example, change `\"do_not_disturb\":null` to\n\n`\"do_not_disturb\":{\"start\":\"1710\",\"end\":\"1811\"}}'`\n\nThis will give you peace between 5:10pm and 6:11pm.\n\n### See Notifications\nYou can use the website to set up notifications. For example, if there is a problem with your charge, Renault will send you an SMS.  This API call lets you see what notifications you have set up.\n\n```\ncurl \\\n   -H \"Authorization: Bearer AAAA\" \\\n   https://www.services.renault-ze.com/api/vehicle/VVVV/settings/notification\n```\n\nThis returns:\n```\n{\n\t\"battery_status\": \"EMAIL\",\n\t\"charge_start\": \"NONE\",\n\t\"charge_end\": \"SMS\",\n\t\"charge_problem\": \"SMS\",\n\t\"low_battery\": \"SMS\",\n\t\"low_battery_reminder\": \"SMS\",\n\t\"do_not_disturb\": null\n}\n```\n\n## Charging Times\nThe Zoe's charging calendar is, sadly, crap.  You can say \"charge between these times\" but you can only have **one schedule per day**.  So if you only want the car to charge between 0300-0700 and 1800-2200 on Mondays - you're out of luck.\n\nIt also seemed to force me to set a schedule for *every* day.\n\nThis is a multi-stage process.\n\n### Create a schedule\n\nIn this example, I'm setting the charging to be active on Monday from 0100 for 1 hour and 15 minutes.\nAll other days start at different times, but last only for 15 minutes.\nAll `start` times **must** be at 00, 15, 30, 45 minutes.  All `duration`s **must** be in increments of 15 minutes.\n\n```\ncurl \\\n   -H 'Authorization: Bearer AAAA' \\\n   -X PUT \\\n   --data-binary '{\"optimized_charge\":false,\"mon\":{\"start\":\"0100\",\"duration\":\"0115\"},\"tue\":{\"start\":\"0200\",\"duration\":\"0015\"},\"wed\":{\"start\":\"0300\",\"duration\":\"0015\"},\"thu\":{\"start\":\"1600\",\"duration\":\"0015\"},\"fri\":{\"start\":\"1900\",\"duration\":\"0015\"},\"sat\":{\"start\":\"1400\",\"duration\":\"0015\"},\"sun\":{\"start\":\"1200\",\"duration\":\"0015\"}}' \\\n   'https://www.services.renault-ze.com/api/vehicle/VVVV/charge/scheduler/offboard'\n```\n\n### View the schedule\nLet's make sure the schedule has been sent correctly\n```\ncurl \\\n   -H 'Authorization: Bearer AAAA' \\\n   'https://www.services.renault-ze.com/api/vehicle/VVVV/charge/scheduler/onboard' \n```\n\nReturned - hopefully! - is the schedule:\n\n```\n{\n\t\"enabled\": false,\n\t\"schedule\": {\n\t\t\"mon\": {\n\t\t\t\"start\": \"0100\",\n\t\t\t\"duration\": \"0115\"\n\t\t},\n\t\t\"tue\": {\n\t\t\t\"start\": \"0200\",\n\t\t\t\"duration\": \"0015\"\n\t\t},\n\t\t\"wed\": {\n\t\t\t\"start\": \"0300\",\n\t\t\t\"duration\": \"0015\"\n\t\t},\n\t\t\"thu\": {\n\t\t\t\"start\": \"1600\",\n\t\t\t\"duration\": \"0015\"\n\t\t},\n\t\t\"fri\": {\n\t\t\t\"start\": \"1900\",\n\t\t\t\"duration\": \"0015\"\n\t\t},\n\t\t\"sat\": {\n\t\t\t\"start\": \"1400\",\n\t\t\t\"duration\": \"0015\"\n\t\t},\n\t\t\"sun\": {\n\t\t\t\"start\": \"1200\",\n\t\t\t\"duration\": \"0015\"\n\t\t}\n\t}\n}\n```\n\n### Deploy the schedule\nBe default, the schedule isn't activated.  It needs to be \"deployed\" in order to send it to the car.\n```\ncurl \\\n   -H 'Authorization: Bearer AAAA' \\\n   -X POST \\\n   'https://www.services.renault-ze.com/api/vehicle/VVVV/charge/scheduler/offboard/deploy'\n\n```\n\n### Deactivate the schedule\nIf you deactivate the schedule then the car will charge whenever it is plugged in.\n```\ncurl \\\n   -H 'Authorization: Bearer AAAA' \\\n   -X PUT \\\n   --data-binary '{\"enabled\":false}' \\\n   'https://www.services.renault-ze.com/api/vehicle/VVVV/charge/scheduler/onboard'\n```\n\n## Refreshing the authorization token after expiry\nRefreshing a token can be done easily and without username or password. You need your expired token as well as the refresh_token that was issued at login.\n```\ncurl \\\n   -X POST \\\n   -H 'Authorization: Bearer eyJAAA.eyJBBB.CCC' \\\n   -d '{\"token\":\"eyJAAA.eyJBBB.CCC\",\"refresh_token\":\"DDDD\"}' \\\n   'https://www.services.renault-ze.com/api/user/token/refresh'\n```\nThe answer is an updated token:\n```\n{\"token\":\"eyJDDD.eyJEEE.FFF\"}\n```\nNote that the refresh will work multiple times using the same refresh_token, so keep that one at hand.\n\n### How do I know if my token expired?\nThe token itself contains this information. It is in JSON Web Token format, i.e. it consists of three parts, each separated by a period. The middle part (called the payload) is a base64-encoded JSON text which contains the following fields:\n```\n{\n  \"sub\": \"myzelogin@example.com\",\n  \"jti\": \"1111222233334444aaaabbbbccccdddd\",\n  \"iat\": 1527613751,\n  \"exp\": 1527649751\n}\n```\nThe `exp` field is the UNIX timestamp of the token expiry. The refreshed token will have the same `sub` and `jti` values.\n\n## That's all folks?\nThere are a few other API calls - mostly around registering and removing vehicles, and updating personal details.\n\n## What's Missing?\nSadly, the Renault API is quite poor compared to BMW's API.  Here's what I'd *love* to see:\n\n* Vehicle status - doors locked, headlights on.\n* Efficiency - last journey, total.\n* Mileage (although available in MY Renault API, so included in this script).\n* Physical location.\n\n## The End Result\n\nhttps://twitter.com/edent_car/status/787387100396068864\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedent%2Frenault-zoe-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedent%2Frenault-zoe-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedent%2Frenault-zoe-api/lists"}