EDF R&D implementation of ISO 15118-20 FDIS.

Related tags

MiscellaneousEDF
Overview

EDF R&D implementation of ISO 15118-20 FDIS

============

This project implements the ISO 15118-20 using Python.

Supported features:

  • DC Bidirectional Power Transfer BPT with dynamic control mode.
  • TLS 1.3 with mutual authentication.
  • Set departure time from SECC side.

Project setup

Installation and setup for Ubuntu

Update your system using the command below:

sudo apt-get update

1. Install MiniConda

Visit the conda installation website link to install MiniConda according to your operating system.

If your operating system is Ubuntu, you can visit this link and follow instructions.

Next, to activate the command conda, execute the line below:

export PATH="[YOUR PATH OF INSTALLED MINICONDA]/bin":$PATH

Example path: /home/trang/miniconda3/bin/

To install conda's shell functions for easier access, once conda command is activated, then:

conda init bash

2. Install PyCharm

Install by Terminal:

sudo snap install pycharm-community --classic

Or you can download the installer via the following link: Download PyCharm Community for Ubuntu

Extract the downloaded file in [YOUR EXTRACTED DIRECTORY OF PYCHARM]. Then, to open PyCharm, run in Terminal :

cd [YOUR EXTRACTED DIRECTORY OF PYCHARM]
./pycharm-community-2021.3.1/bin/pycharm.sh

3. Install Java

This proyect uses OpenEXI for decode/encode xml to EXI. This is a java library, which has been coupled to python using jPype. Since the project imports java libraries, it is required to install JDK. For installing JDK follow the instructions here

For Ubuntu/Debian, you can follow instructions here

4. Create virtual environment and install dependencies

First of all, it is necessary to download the project Raiden V2X from github.

In Terminal:

cd [YOUR DOWNLOADED DIRECTORY OF PROJECT]
conda env create -f environment.yml

Normally, all of project's dependencies are installed automatically when setting virtual environment.

5. Setup virtual environment

From command line

To activate your new virtual environment in Terminal,run the command below:

conda activate edf15118-20

From PyCharm

Step 1:
Add your new virtual environment and interpreter in PyCharm:

In Python Interpreter on bottom right corner of windows, choose Add Interpreter... like the screen shot below

Step 2:

In the popup window, choose your Python interpreter of edf15118-20 environment.

The environment is located in [YOUR PATH OF INSTALLED MINICONDA]/envs/

Then choose the package python of edf15118-20 virtual environment.

For example, the complete Python Interpreter path is:

/home/trang/miniconda3/envs/edf15118-20/bin/python

Installation and setup for Raspberry Pi

1. Install VSCode:

Install with the command line below:

sudo apt-get update
sudo apt install code

2. Install dependencies:

First, install PyQt5 independently with the following command :

sudo apt-get install python3-pyqt5

Next, install all remaining dependencies as below:

pip install -r requirement_rasp.txt

3. Install missing packages

Some packages are not installed automatically via requirement_rasp.txt. To execute the project, it is required to install these librairies manually via the command below:

sudo apt-get install libatlas-base-dev libhdf5-dev libhdf5-serial-dev libatlas-base-dev libjasper-dev

4. Setup Python for VSCode:

In VSCode, press Ctrl+Shift+X to install Python extension then select Python interpreter

5. Install Java

Follow the same steps of Linux PC.

Execute EVCC and SECC

1. Setup configuration files config.ini:

From the terminal, check for network interfaces by using the following command:

ifconfig

For example, the result returned by ifconfig:

enp0s3: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 10.0.2.15  netmask 255.255.255.0  broadcast 10.0.2.255
        inet6 fe80::1c00:5e0f:2cb2:e69f  prefixlen 64  scopeid 0x20<link>
        ether 08:00:27:e4:6d:1b  txqueuelen 1000  (Ethernet)
        RX packets 277  bytes 39834 (39.8 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1110  bytes 92105 (92.1 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 475  bytes 42714 (42.7 KB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 475  bytes 42714 (42.7 KB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Setup the configuration file an interface which has ipv6 address. In this case, we will use enp0s3 interface.

EVSE :

In file evse_config.ini, setup the parameters as shown below:

[NETWORK]
    interface = enp0s3
    tcp_port = 49152
    # See table 10, must range from 49152 to 65535

[SETTINGS]
    virtual_mode = true

The parameter virtual_mode in [SETTINGS], allows to set and verify the 61851-1 states from a communication card.To simulate the communication card the virtual_mode parmeter can be set to true.

If it is required to verify or set 61851-1 states, some adaptations of the provided interfaces are needed to read and set the states from the communication card.

EVCC :

Setup configuration file ev_config.ini, as follows:

[NETWORK]
    interface = enp0s3
    udp_port = 49153
    # See table 18, must range from 49152 to 65535
    tcp_port = 49154
    # See table 10, must range from 49152 to 65535

[SETTINGS]
    virtual_mode = true

Like EVSE, you set virtual_mode = true/false based on your own situation.

2. Install certificates for mutual authentication

Before running ISO 15118-20, you need to install the certificates for TLS with mutual authentication by running the command below in the terminal:

cd /shared/certificates/

and then run :

sh generateCertificates.sh

3. Run ISO 15118-20

To run a communication session, the server which corresponds to the SECC needs to be running first:

  • If you run using the GUI, go to directory /secc run python3 evse_gui.py
    • In GUI, click Set to define a departure time and target state of charge SoC from the charging station side and then click Start

Start Window SECC

  • If you run without GUI, run start_evse.py

Then, you can run electric vehicle communication controller EVCC:

  • If you execute with GUI, go to directory /evcc and execute python3 ev_gui.py
  • In GUI, click Set to define a departure time and target state of charge SoC from the EV and then click Start

Start Window EVCC

  • To execute without GUI, run start_ev.py

The session sequence can be seen in the terminal by the printed logs or in the GUI, in the information tab.

Information tab EVCC

Once the session is in the charging loop you can control dinamically the power transfer by moving the control bar at the left side of the SECC control window:

Control Window SECC

To stop the charging session, click on stop button of the EVCC start window.

Note: If you have the error message below when runing the project:

qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, linuxfb, minimal, minimalegl, offscreen, vnc, xcb.

Aborted (core dumped)

This error comes from the library libxcb which is used in package Qt for GUI. To fix it, you need to re-install this library with the command below:

sudo apt-get install libxcb-randr0-dev libxcb-xtest0-dev libxcb-xinerama0-dev libxcb-shape0-dev libxcb-xkb-dev

Generate documentation


In order to generate the documentation, one has to use the sphinx module from the docs directory:

    make html
Comments
  • Stop button from EVCC side is not working systematically.

    Stop button from EVCC side is not working systematically.

    Stop from the EVCC side without GUI works fine. Hint: The problem seems to be related to accelerated message exchange, the GUI seems to need more time to process the stop request.

    opened by OSkrdgz 4
  • Fix: comply with schemas from e58323a

    Fix: comply with schemas from e58323a

    When verifying my decoder, I ran in the issue that ScheduleExchangeReq message couldn't be decoded. After some research I found a mismatch in schema updates but not in the code see: e58323a 2048 -> 1024

    Ps, thanks for open-sourcing this project

    opened by jessekerkhoven 4
  • This piece of code takes too much time to be executed

    This piece of code takes too much time to be executed

    https://github.com/EDF-Lab/eVDriveFlow/blob/23766073bad54cb7366ab41d90acc6b1e505b5a9/evcc/tcp_client.py#L119

    https://github.com/EDF-Lab/eVDriveFlow/blob/23766073bad54cb7366ab41d90acc6b1e505b5a9/secc/tcp_server.py#L98

    xml_object = self.message_handler.unmarshall(xml) request_type = type(xml_object).name logger.info("Received %s.", request_type) # TODO: This method takes too long

    opened by OSkrdgz 1
  • Support fragment encoding for signing data

    Support fragment encoding for signing data

    According to the standard; For PnC support certain fields need to be encoded as an EXI fragment by the EVCC or SECC (for verification or to add in the message):

    • [x] PnC_AReqIdentificationMode
    • [ ] SignedInstallationData
    • [ ] Fields of MeteringConfirmationReq
    • [ ] ChargeParameterDiscoveryRes
    • [x] SignatureInfo (with the xmldsig schema)

    This commit simply adds the support to encode the marked types, but doesn't use any yet.

    opened by SirTates 0
  • Update certificate configuration files to fill required elements:

    Update certificate configuration files to fill required elements:

    In order to generate the certifcates compliant with the standard the .cnf files corresponding to each certificatemust contain the required and critical extensions as specified in the Certificate profiles in Annex B of 15118-20.

    | x | Required: issuing CA must make sure that this extension is present certificate validating entity must ensure that this extension is present | |-----|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | (x) | Optional it is upto the discretion of the issuing CA and/or certificate requester to either include or omit this extension certificate validating entity must ignore the absence of this extension | | - | Must not be present issuing CA must make sure that this extension is not present certificate validating entity must ensure that this extension is not present | | c | This extension is critical, see IETF RFC 5280 if this extension is present, the certificate validating entity must process it. If an implementation recognizes that a “critical” extension is present, but the implementation cannot interpret the extension, the implementation has to reject the certificate. Quote from IETF RFC 5280: “A certificate-using system MUST reject the certificate if it encounters a critical extension it does not recognize or a critical extension that contains information that it cannot process." NOTE: IETF RFC 5280 has been updated by IETF RFC 6818, IETF RFC 8398 and IETF RFC 8399. These updates are considered to be included for this version of ISO 15118-20 standard. | | nc | This extension is non-critical, see IETF RFC 5280 if this extension is present, the certificate validating entity may ignore it if either the entity is unable to process the extension or if the requirements allow the entity to ignore the extension. If an implementation recognizes that a “non-critical” extension is present, but the implementation cannot interpret the extension, the extension can be ignored. Quote from IETF RFC 5280: “A non-critical extension MAY be ignored if it is not recognized, but MUST be processed if it is recognized." NOTE: IETF RFC 5280 has been updated by IETF RFC 6818, IETF RFC 8398 and IETF RFC 8399. These updates are considered to be included for this version of ISO 15118-20 standard. ||

    opened by OSkrdgz 0
Releases(v0.1.1)
Owner
GitHub organization of EDF Research & Development
清晰易读的7x7像素点阵中文字体和取模工具

FontChinese7x7 上古神器 III : 7x7像素点阵中文字体 想要在低分辨率屏幕上显示中文, 却发现中文字体实在是太大? 找了全网发现字体库最小也只有12x12? 甚至是好不容易找到了一个8x8字体, 结果发现字体收费且明确说明不得以任何形式嵌入到软件当中? 那就让这个项目来解决你的问

Angelic47 72 Dec 12, 2022
little proyect to organize myself, but maybe can help someone else

TaskXT 0.1 Little proyect to organize myself, but maybe can help someone else Idea The main idea is to ogranize you work and stuff to do, but with onl

Gabriel Carmona 4 Oct 03, 2021
Multitrack exporter for OP-Z

Underbridge for OP-Z Multitrack exporter Description Exports patterns and projects individual audio tracks to seperate folders for use in your DAW. Py

Thomas Herrmann 71 Dec 25, 2022
Python 3 script for installing kali tools on your linux machine

Python 3 script for installing kali tools on your linux machine

gh0st 2 Apr 20, 2022
Combines power of torch, numerical methods to conquer and solve ALL {O,P}DEs

torch_DE_solver Combines power of torch, numerical methods and math overall to conquer and solve ALL {O,P}DEs There are three examples to provide a li

Natural Systems Simulation Lab 28 Dec 12, 2022
This is the Code Institute student template for Gitpod.

Welcome AnaG0307, This is the Code Institute student template for Gitpod. We have preinstalled all of the tools you need to get started. It's perfectl

0 Feb 02, 2022
An extremely configurable markdown reverser for Python3.

🔄 Unmarkd A markdown reverser. Unmarkd is a BeautifulSoup-powered Markdown reverser written in Python and for Python. Why This is created as a StackS

ThatXliner 5 Jun 27, 2022
A python script for osu!lazer rulesets auto update.

osu-lazer-rulesets-autoupdater A python script for osu!lazer rulesets auto update. How to use: 如何使用: You can refer to the python script. The begining

3 Jul 26, 2022
Today I Commit (1일 1커밋) 챌린지 알림 봇

Today I Commit Challenge 1일1커밋 챌린지를 위한 알림 봇 config.py github_token = "github private access key" slack_token = "slack authorization token" channel = "

sunho 4 Nov 08, 2021
A numbers extract from string python package

Made with Python3 (C) @FayasNoushad Copyright permission under MIT License License - https://github.com/FayasNoushad/Numbers-Extract/blob/main/LICENS

Fayas Noushad 4 Nov 28, 2021
Solcast Integration for Home Assistant

Solcast Solar Home Assistant(https://www.home-assistant.io/) Component This custom component integrates the Solcast API into Home Assistant. Modified

Greg 45 Dec 20, 2022
Like Docker, but for Squeak. You know, for kids.

Squeaker Like Docker, but for Smalltalk images. You know, for kids. It's a small program that helps in automated derivation of configured Smalltalk im

Tony Garnock-Jones 14 Sep 11, 2022
A Trace Explorer for Reverse Engineers

Tenet - A Trace Explorer for Reverse Engineers Overview Tenet is an IDA Pro plugin for exploring execution traces. The goal of this plugin is to provi

1k Jan 02, 2023
Rofi script to minimize / unminimize multiple windows in qtile

Qminimize Rofi script to minimize / unminimize multiple windows in qtile Additional requirements : EWMH module fuzzywuzzy module How to use it : - Clo

9 Sep 18, 2022
Extract continuous and discrete relaxation spectra from G(t)

pyReSpect-time Extract continuous and discrete relaxation spectra from stress relaxation modulus G(t). The papers which describe the method and test c

3 Nov 03, 2022
msgqywx 使用企业微信的应用消息推送实时信息

msgqywx 使用企业微信的应用消息推送实时信息

Demon Finch 8 Dec 18, 2022
End-to-End text sumarization, QAs generation using flask.

Help-Me-Read A web application created with Flask + BootStrap + HuggingFace 🤗 to generate summary and question-answer from given input text. It uses

Ankush Kuwar 12 Nov 13, 2022
A Python software implementation of the Intel 4004 processor

Pyntel4004 A Python software implementation of the Intel 4004 processor. General Information Two pass assembler using the original mnemonics, directiv

alshapton 5 Oct 01, 2022
J MBF - Assalamualaikum Mamang...

★ VISITOR ★ ★ INFORMATION ★ Script Ini DiBuat Oleh YayanXD Script Ini Akan DiPerjual Belikan Tanggal 9 Januari 2022 Jika Mau Beli Script Silahkan Hub

Risky [ Zero Tow ] 5 Apr 08, 2022
HiQ - A Modern Observability System

🦉 A Modern Observability System HiQ is a declarative, non-intrusive, dynamic and transparent tracking system for both monolithic application and dist

Oracle Sample Code 40 Aug 21, 2022