EV Dashboard Client v0.1
The EV Dashboard Client is not ready for production grade applications.
This repository provides apps and libraries to allow users and assets/devices to register in the ev-dashboard registry and obtain credentials for participation in a flexibility market.
This repository also provides documentation on the steps required to connect to the EV Dashboard.
Connecting to the EV Dashboard
The EV Dashboard is an application which aggregates OCPI data (via the OCN) and Blockchain data for both EVs and charge points. It also facilitate the request and issuance process for credentials relating to a flexibility market. The steps needed to access the EV Dashboard and list your devices are details below.
The EV Dashboard Backend retrieves vehicle and chargepoint data from CPO and eMSP backends via OCPI connections routed by the OCN. In order to create an OCN connection to the EV Dashboard Backend, the following steps are required:
- Connect to an OCN Node
- Whitelist the EV Dashboard Backend (see the OCN Rules section of the OCN Node Documentation).
- Agree to the service permissions (see "Agree to service permissions" section of ocn-registry cli docs)
Registration in the EV Registry smart contract
The EV Registry smart contract is a registry of both users and devices (vehicles or chargepoints) which have agreed to participate in the EV Dashboard and the associated flexibility market. Therefore, both users and devices can be registered and both are represented by a Volta address. Devices are registered by a user (they cannot register themselves) and are associated to that user.
The steps for registration are:
Register as a user. In order to register, you must first be listed a party in the OCN Registry smart contract. To register, you can use the
add-usercommand of the asset-operator-cli
(Optional) Create device keypairs. In order for a device to be registered in the EV Registry, they must have a Volta address. New addresses with their associated private keys can be generated by using the
generate-keycommand of the the asset-operator-cli
Register devices. This can be done using the using the
add-devicecommand of the the asset-operator-cli
Sign into the EV Dashboard
As a CPO or eMSP, you can sign into the EV Dashboard in order to view your vehicles or chargepoints and request prequalification credentials on their behalf. In order to register as a CPO or eMSP, you need to obtain a verified credential of your respective role. This registration is done via the EnergyWeb Switchboard application. The Switchboard documentation on this process is available here. In the case of the EV dashboard, this process can be initiated from the EV Dashboard login page. At a high level the process is:
- Request a credential
- Get approval
- Add credential to your DID document
Listening for prequalification requests
Install and start the asset-operator-server
A node server which listens for NATS messages related to the EV charging prequalification process.
Perform operations on a device's DID and Credentials:
- Create a DID Document and fund the asset's EWC account
- Issue a credential and add as a service endpoint in the DID document
Registers an asset or user in the
ev-registry smart contract
Listens for NATS events regarding prequalification credentials and handles them on behalf of asset(s).
An interface which provides access to a Signer for a given DID
Optional component that can be used to centrally manage keys.
Can generate a new address/key-pair and well as provide existing key-pairs.
This repository is a monorepo that uses Rush with the PNPM package manager.
PNPM is used for its speed and solution to NPM doppelgangers (as well as being the default option for rush). See comparison of NPM vs PNPM vs Yarn for Rush.
Install PNPM and Rush
PNPM is required. See installation instructions here: https://pnpm.js.org/installation/
Rush is required. See installation instructions here: https://rushjs.io/pages/intro/get_started/
Use rush to install dependencies (not the package manager directly).
In other words, do not run
npm install or
This is because Rush optimizes by installing all of the dependency packages in a central folder, and then uses symlinks to create the “node_modules” folder for each of the projects.
$ rush install
Compile & Build
Use rush to build.
$ rush build
Linting and Formating
This repository use ESLint for code conventions and Prettier for syntax formatting. Both are setup according to Rush recommendations:
- ESLint is configured per project while Prettier is configured globally.
- Prettier is configured to run as a pre-commit hook.
Publishing new version
Steps are currently:
rush changemanually to generate change files
rush version --bumpto convert change files to changelog entries and update package.json versions
- Merge to
publishbranch to trigger publishing via GitHub actions