Download Chargestation Diagnostic Log Files
Introduction
As a network admin, you may need to download diagnostic log files directly from the chargestation. Manufacturers will request these files from time to time to investigate hardware faults and firmware issues. You can use the eDRV APIs to download files from the charging station to an FTP server.
Manufacturer's Support Recommended
Unfortunately downloading chargestation diagnostic logs over the air is painful and prone to failure. Chargestations often have problems uploading diagnostics files to your FTP servers.
There is not much eDRV can do beyond reporting the error (if sent) by the chargestation. We highly recommend contacting the Manufacturer's support team to help you resolve chargestation diagnostics issues.
FTP Upload URLs
Pleease first, check with your manufacturer what type of FTP upload protocols and URLs are supported. eDRV will send this URL as is to the chargestation.
Common format examples:
ftp://username:[email protected]/
ftp://username:[email protected]/directory_name
Using the API to download chargestation hardware logs
Use Get Diagnostics API to download your charge station diagnostics log file. You can also refer to the following sample code for the request:
const request = require('request');
const options = {
method: 'POST',
url: 'https://api.edrv.io/v1.1/chargestations/5fb24edb6434561ds6f31000/get_diagnostics'
headers: {
Accept: 'application/json',
'Content-Type': 'application/json',
Authorization: 'Bearer eDRV_TOKEN'
},
body: {
location: 'ftp://username:[email protected]',
startTime: '2021-01-13T16:19:50.340Z',
stopTime: '2021-07-13T16:19:50.340Z',
meta_data: {sample_key1: 'some text', sample_key2: 1234.56}
},
json: true
};
request(options, function (error, response, body) {
if (error) throw new Error(error);
console.log(body);
/*Handle error if the chargestation refused to honor this request*/
const cs_response = data.result.command.status;
/*Save the file name in your application*/
const file_name = data.result.command.response_data.filename;
});
Here a sample response:
{
"ok": true,
"result": {
"command": {
"owner_type": "user",
"deleted": false,
"_id": "62a97252a7b13712eabe8000",
"owner": "603763d392204c0c84057000",
"organization": "5e7e6c058a6deccfefdf4000",
"type": "GetDiagnostics",
"status": "CSAccepted",
"chargestation": "618ea8f5549b8266acbac000",
"data": {
"location": "ftp://username:[email protected]",
"startTime": "2021-01-13T16:19:50.340Z",
"stopTime": "2021-07-13T16:19:50.340Z"
},
"createdAt": "2021-06-15T05:46:58.549Z",
"updatedAt": "2021-06-15T05:46:58.741Z",
"__v": 0,
"response_data": {
"filename": "diag-abcd-20220615T054658018.aes"
}
}
},
"message": "Created"
}
The response status
types are:
CSAccepted
: The chargestation has received the request and has begun processing itCSRejected
: The chargestation rejected this requestError
: There was an error is sending this request to the chargestation, for e.g. if the communications link is down
via the Admin Dashboard
We have added the ability to download the diagnostics directly from the dashboard. This feature is available on the Charge Station Details page.
To initiate the process, follow these steps:
- Navigate to Charge Station Details.
- Access the Settings Tabs.
- Choose the Diagnostics Logs Tab.
- Select the desired start and end date.
- Click on the "Request Diagnostics Logs" button.
After sending the request, you can keep track of its progress by clicking the "Refresh" button.
Monitoring Chargestation Responses
Chargestations Settings
You can monitor the progress of your Diagnostics request from the Charge Station Details page.
Go to Chargestation Details page > Settings Tab > Diagnostics Logs. Expand text Check the most recent diagnostic status updates received after your request
you'll see the latest status notifications sent by the chargestation in response to your request.
OCPP Logs
Please see the Logs page for DiagnosticsStatusNotification
messages from the chargestation.
A Successful Upload
A Failed Upload
Common causes of file upload failure
The most common causes that the eDRV team has seen across manufacturers are:
- Malfunction: The chargestation is faulting or malfunctioning and is unable to gather and upload logs
- Communication Issues: If the link to the chargestation is problematic, it may not be able to upload the file
- Malformed FTP URL: If your FTP username, password, or URL is incorrect
- Unsupported FTP Protocol type: Many chargestations do not support more modern FTP protocols such as sFTP and encryption such as TLS. Please check with your manufacturer what type of FTP protocol a chargestation supports for sending files.
Updated about 1 year ago