-
Notifications
You must be signed in to change notification settings - Fork 1
Known and working endpoints
An "endpoint" is a command you can send to your car; there are two types of commands, for reading and for performing actions.
- cockpit
- battery-status
- location
- hvac-status
- lock-status
- trip-history
- trips
- energy-unit-cost
- notification-settings
- open-close-status
- battery-inhibition-status
- actions/refresh-hvac-status
- actions/refresh-battery-status
- actions/refresh-location
- actions/charging-start
- actions/hvac-start
- actions/refresh-lock-status (doors locking)
- actions/lock-unlock
- actions/horn-lights
- actions/srp-initiates
- actions/srp-sets
To operate an endpoint, you must send a GET or POST request (depending on endpoint) to a specific server:
- Renault: https://api-wired-prod-1-euw1.wrd-aws.com
- Nissan: https://alliance-platform-caradapter-prod.apps.eu.kamereon.io/car-adapter/ (to be confirmed)
You shall use this kind of url:
Nissan: https://alliance-platform-caradapter-prod.apps.eu.kamereon.io/car-adapter/v1/cars/VVVVVV/EEEEEE
- AAAAAAA = accountId
- VVVVVVVV = car VIN
- EEEEEEEE = endpoint path
- CC = Country code (IT, EN,...)
Programmatically:
kamereonurl + '/commerce/v1/accounts/' +
accountId.value +
"/kamereon/kca/car-adapter/v" +
version +
"/cars/" +
MY_VIN.value + "/" +
path +
QUESTION_MARK +
"country=" +
country.value
Just calling the url is not enough to query the API: you shall provide credentials in form of request header; example in pure Javascript for browser using Axios library:
axios.post(
url, // Described above, containing endpoint
payload, // Needed only for actions?
{
headers: {
'Content-type': 'application/vnd.api+json', // constant
'x-gigya-id_token': JWT_TOKEN, // Temporary, depending on user credentials for MyRenault app
'apikey': KAMEREON_API_KEY, // Constant, public and same for all users; currently = Ae9FDWugRxZQAGm3Sxgk7uJn6Q4CGEA2
}
})
.then(response => {
// process response;
})
.catch((error) => {
// process error
});
Generic payload for actions:
{
'data': {
'type': 'EndpointName',
'attributes': attributes
}
}
After a command is sent, the server sends back a response containing an "id"; append such id to following url (POST) to get details on command execution status:
Ore use this url to retrieve all notifications:
https://api-wired-prod-1-euw1.wrd-aws.com/commerce/v1/persons/PERSONID/notifications/
In case of empty response, repeat call until you get the response.
Example response for HVAC start:
[{
"notificationId": "d47296c9-6ab6-4192-9db1-4712010538fb",
"notifDate": "2022-04-28T14:36:17",
"vin": "XXXXXXXXXXXXXXXX",
"personId": "XXXXXXXXXXXXXXXX",
"kmrUserId": "XXXXXXXXXXXXXXXX",
"actionType": "COMMAND_RESPONSE",
"commandResponse": {
"status": "PENDING"
},
"commandType": "HVAC_START"
}, {
"notificationId": "XXXXXXXXXXXXXXXX",
"notifDate": "2022-04-28T14:36:24",
"vin": "XXXXXXXXXXXXXXXX",
"personId": "XXXXXXXXXXXXXXXX",
"kmrUserId": "XXXXXXXXXXXXXXXX",
"actionType": "COMMAND_RESPONSE",
"commandResponse": {
"status": "COMPLETED"
},
"commandType": "HVAC_START"
}]
Authentication through "SRP" (Secure Remote Password)
- https://gitlab.com/tobiaswkjeldsen/dartnissanconnect (Discussion : https://gitlab.com/tobiaswkjeldsen/dartnissanconnect/-/issues/1#note_877133572 )
- https://github.com/Tobiaswk/dartnissanconnect/blob/41a5eee9f7dbd04b0b2558ffaa73f0fd77c40fc7/lib/src/nissanconnect_vehicle.dart
- https://github.com/mitchellrj/kamereon-python/blob/146904802301aa0b0008e2bdb3a88ed10ff50acf/kamereon/kamereon.py
- https://github.com/wobniarin/HEMS_API/blob/4ee1d9e3df2b33d6fd72d7bf089999c4be364275/HEMS_API/nissanapi.py
- https://github.com/sebjsmith/kamereon/blob/ba0a7c1060d6da65cd24806ff07178b692c9bc5c/src/Client.ts (Javascript/Typescript)