Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
ba612bf
fix missing quotes in pip install instructions
Hedwyn Dec 30, 2024
f006477
add a .conf file for virtual CAN
Hedwyn Dec 30, 2024
cf20ab2
add virtual can conf to PEV side and add instructions for vcan in README
Hedwyn Dec 30, 2024
dea54be
reshuffle tutorials: package everything and make the standalone code …
Hedwyn Jan 10, 2025
e57ceb1
add standalone scripts to run the simulations locally without needed …
Hedwyn Jan 10, 2025
09a9cc7
add requirements.txt for local run
Hedwyn Jan 10, 2025
9b918d7
update documentation in README
Hedwyn Jan 10, 2025
776478c
move monitors to a package
Hedwyn Jan 10, 2025
0823dba
add standalone local scripts for monitors
Hedwyn Jan 10, 2025
941fa17
update documentation
Hedwyn Jan 10, 2025
234bd29
fix some incorrect paths issues
Hedwyn Jan 10, 2025
99ab925
bundle the CAN databases in the monitoring package resources
Hedwyn Jan 10, 2025
beb38c7
update documentation - add package scripts usage doc
Hedwyn Jan 10, 2025
5749dc9
refer to software setup in install section
Hedwyn Jan 10, 2025
50eb0b0
Update monitors dependencies for compatibility with SECC python envir…
canberkdurmus Jan 21, 2025
7b936f0
Minor updates for python-can 3 and python 3.9
canberkdurmus Jan 21, 2025
aefd1d8
Add __init__.py to advsimulators package
canberkdurmus Jan 21, 2025
b26b261
Remove __init__.py
canberkdurmus Jan 21, 2025
544b3c4
Update, replace dashes on python filenames
canberkdurmus Jan 22, 2025
43f93b2
Update, rename pev monitor as pev_v2
canberkdurmus Jan 22, 2025
ec333b4
Add PEV Generic Interface v1
canberkdurmus Jan 22, 2025
8331995
Update, rename pev monitor as pev_v2
canberkdurmus Jan 22, 2025
7bff527
Add pev_monitor for PEV Generic Interface v1
canberkdurmus Jan 22, 2025
cba97cb
Add pev simulator for PEV Generic Interface v1
canberkdurmus Jan 22, 2025
fcef4b6
Update README with corresponding file name changes
canberkdurmus Jan 22, 2025
b30af08
Add .idea to gitignore
canberkdurmus Feb 3, 2025
79abbc7
Add __init__ for advsimulators package
canberkdurmus Feb 3, 2025
121f6d1
Update monitors entrypoints
canberkdurmus Feb 3, 2025
798d5cf
Update, simplify resource access for DB and CAN config files, provide…
canberkdurmus Feb 3, 2025
d240424
Update use the new typer entrypoints
canberkdurmus Feb 3, 2025
4a3d407
Update, simplify resource access for CAN config files, provide additi…
canberkdurmus Feb 3, 2025
d1cc973
Update entrypoints to call the typer entrypoints
canberkdurmus Feb 3, 2025
3ae8230
Update use the new typer entrypoints
canberkdurmus Feb 3, 2025
c427627
Update, EVSE Generic v3 changes
canberkdurmus May 13, 2025
593342a
Update, adapt for the changes on the generic interface v3
canberkdurmus May 13, 2025
1fca80b
Update PEV Generic v2
canberkdurmus May 13, 2025
e79668f
Update, adapt to the database changes
canberkdurmus May 13, 2025
337cfb2
Remove unnecessary initializations
canberkdurmus May 13, 2025
198f514
Update, cover decode error for received messages on edge cases
canberkdurmus May 28, 2025
30adfe6
PEV V2: add MCS to InletPins Enum
AmineSaidiADV Jul 2, 2025
0c30c17
Update, formatting
canberkdurmus Oct 2, 2025
ed60cb5
Update the PEV Generic Interface v2 CAN DB
canberkdurmus Oct 22, 2025
5c73f3d
Add HV Preparing Hold Off message support
canberkdurmus Oct 22, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -159,4 +159,4 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/
105 changes: 96 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,37 @@ while allowing user to simulate a simplified test environment. The structure exp
controllers on both PEV and EVSE sides. It's possible use an ADVANTICS controller on one side and another controller
that supports the same charging standards on the other side.

## Quick Install
### On your machine

Note: If you do not have a working version of Python3 installed, please refer to the more details section [Software Setup](#software-setup) below.
You can install this utility globally on your machine using pipx:

**Simulation tools**
```
pipx install "advsimulators@git+https://github.com/ADVANTICS/examples.git@dev#&subdirectory=charge-controllers/tutorials"
```
**Monitoring tools**
```
pipx install "advmonitors@git+https://github.com/ADVANTICS/examples.git@dev#&subdirectory=charge-controllers/monitors"
```
You will then be able to call the simulation utilities in command line from anywhere on your system.<br>
If you would rather install it in a virtual environement, you can use `pip` once your virtual environement is activated instead. In that case, the simulation commands will be only callable when your virtual environement is actived.

### On the controllers
You can install this package with pip (`pipx` is not available on controllers):

**Simulation tools**

```
pip install "advsimulators@git+https://github.com/ADVANTICS/examples.git@dev#&subdirectory=charge-controllers/tutorials"
```
**Monitoring tools**
```
pip install "advmonitors@git+https://github.com/ADVANTICS/examples.git@dev#&subdirectory=charge-controllers/monitors"
```


## Typical Real System

On both EVSE and PEV sides, the controller hardware with the charge controller software are provided by ADVANTICS. From
Expand Down Expand Up @@ -77,6 +108,13 @@ is ready to run a power transfer session.

## Software Setup

> The simplest is to install the project using pip as described in the Install section.
> However, if you want to run locally without installing the package, you can follow the instructions below.


The simplest is to install the project using pip as described in the Install section.
If you want

The test system used in this guide runs Python on Linux. The required pip packages of each module is listed in the
`requirements.txt` in the same directory.

Expand All @@ -87,16 +125,32 @@ Install the needed `apt` packages, clone this repository, create a virtual envir

```shell
sudo apt update
sudo apt install git can-utils net-utils python3 python3-pip python3-venv
sudo apt install git can-utils net-utils python3 python3-pip python3-venv pipx
```

If you want to install the utility globally on your system, use:
```
pipx install "advsimulators@git+https://github.com/ADVANTICS/examples.git@dev#&subdirectory=charge-controllers/tutorials"
pipx install "advmonitors@git+https://github.com/ADVANTICS/examples.git@dev#&subdirectory=charge-controllers/monitors"
```

If you would rather like to run from source:
```
git clone https://github.com/ADVANTICS/examples
cd examples
python3 -m venv venv
source venv/bin/activate
```

```
# Use the following if you want to install the package from source
pip install -e charge-controllers/monitors/
pip install -e charge-controllers/tutorials/
```
```
# ... or use the following instead if you want to run from the scripts without installing the package
pip install -r charge-controllers/monitors/requirements.txt
pip install -r charge-controllers/tutorials/EVSE Generic Interface v3/requirements.txt
pip install -r charge-controllers/tutorials/PEV Generic Interface v2/requirements.txt
pip install -r charge-controllers/tutorials/requirements.txt
```

If you use a PEAK USB CAN
Expand Down Expand Up @@ -210,26 +264,59 @@ Restart the controller software for the new config to take effect:
Assuming the virtual environment of this project is active with all the steps are completed as described above, in four
separate terminal sessions:

### For a global installation (pipx)
**EVSE simulator**
```
evse-simulator-v3
```

**PEV simulator**
```
pev-simulator-v2
```

**EVSE monitor**
```
evse-monitor
```

**PEV monitor**
```
pev-monitor
```

### When running from local scripts

```shell
cd charge-controllers/tutorials/EVSE\ Generic\ Interface\ v3
python3 evse-simulator.py
cd charge-controllers/tutorials
python3 simulate_generic_evse_v3.py
```

```shell
cd charge-controllers/monitors
python3 evse-monitor.py
python3 evse_monitor.py
```

```shell
cd charge-controllers/tutorials/PEV\ Generic\ Interface\ v2
python3 pev-simulator.py
cd charge-controllers/tutorials/
python3 simulate_generic_pev_v2.py
```

```shell
cd charge-controllers/monitors
python3 pev-monitor.py
python3 pev_monitor_v2.py
```

Note that the default CAN config (`can.conf`) will run on channel `can0`. You can pass you custom can config using `--can-config` flag. If you want to use virtual CAN instead (e.g., for preliminary tests), there is a `vcan.conf` that you can use directly, e.g.:

```shell
cd charge-controllers/tutorials/
python3 simulate_generic_pev_v2.py --can-config vcan.conf
```

If you are unsure about how to set up a virtual CAN interface you can check the corresponding socketcan documentation [here](https://netmodule-linux.readthedocs.io/en/latest/howto/can.html).


> **NOTE:** Each module is connecting to CAN interface on start and closes it gracefully when CTRL+C arrives from the
> user, pressing CTRL+C repetitively or killing the process will cause CAN interface to close abruptly and make it **
> DOWN
Expand Down
Empty file.
4 changes: 4 additions & 0 deletions charge-controllers/monitors/advmonitors/conf/vcan.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[default]
interface = socketcan
channel = vcan0
bitrate = 500000
Loading