Organization Messaging Logs

Introduction

Scanning through the messages sent to and from the chargestation is fundamental and necessary when you want to debug some issues with the chargestation (connectivity, smart charging, energy reports, etc.). This can be done effortlessly with the new eDRV APIs or from the Admin Dashboard.

Using the API to download logs

Invoking the /v1.1/organizations/logs API will return the array of logs for all the chargestations which were online in the last 15 minutes. It also supports a query parameter (chargestation) which can filter down these logs by a particular chargestation

const options = {method: 'GET', headers: {
    Accept: 'application/json',
    Authorization: 'Bearer ****'
  }
 }};

fetch('https://api.edrv.io/v1.1/organizations/logs?chargestation=61a9e9fec633b91c8186546b', options)
  .then(response => response.json())
  .then(response => console.log(response))
  .catch(err => console.error(err));

Executing this API will have the following response. The result property will have an array of logs sorted by the latest timestamps

{
  "ok": true,
  "result": [
    {
      "timestamp": "2021-12-03T10:49:04.866Z",
      "message": "Heartbeat",
      "tags": [
        "FROM_CS",
        "Heartbeat"
      ],
      "chargestation": "61a9e9fec633b91c8186546b",
      "data": {
        "message_payload": {}
      }
    },
    {
      "timestamp": "2021-12-03T10:49:04.866Z",
      "message": "Heartbeat",
      "tags": [
        "TO_CS",
        "Heartbeat"
      ],
      "chargestation": "61a9e9fec633b91c8186546b",
      "data": {
        "message_payload": {
          "currentTime": "2021-12-03T10:49:04.773Z"
        }
      }
    }
  ],
  "message": "Success"
}

Logs via the Admin Dashboard

You can even examine these logs from the Admin Dashboard by visiting the Logs page. It can even be filtered by chargestation.

15001500