Skip to content

Commit

Permalink
Updated documentation of Auth module:
Browse files Browse the repository at this point in the history
* Moved README.md to index.rst
* Value `FindFirst` was added as a value for the `selection_algorithm` and was missing a proper description
* Added description for selection_algorithm in manfiest.yaml

Signed-off-by: pietfried <[email protected]>
  • Loading branch information
Pietfried committed Jun 3, 2024
1 parent 177a8e6 commit b726c5b
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 31 deletions.
30 changes: 0 additions & 30 deletions modules/Auth/README.md

This file was deleted.

84 changes: 84 additions & 0 deletions modules/Auth/docs/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
.. _everest_modules_handwritten_Auth:

===========
Auth Module
===========

This module handles incoming authorization and reservation requests.

The task of the module is to receive tokens from token providers, validate them and assign them to EvseManagers.
It is responsible for providing authorization to EvseManagers and for stopping transactions at the EvseManagers if a token
or parent id token is presented to stop a transaction. In addition, the module is responsible for managing all
reservations and matching them with incoming tokens.

The module contains the logic to select a connector for incoming tokens (e.g. by waiting for a car plug in, user
interface, random selection, etc.). Currently two selection algorithms are implemented and described in
`Selection Algorithm`_.

The following flow diagram describes how an incoming token is handled by the module.

.. image:: token_handling.drawio.svg
:alt: TokenHandling

.. note::

The processing of each authorization request and the respective validation runs in an individual thread. This
allows the parallel processing of authorization requests.

Integration in EVerest
======================

This module provides implementations for the `reservation` and the `auth` interfaces.

It requires connections to module(s) implementing the `token_provider`, `token_validator` and `evse_manager` interfaces.

The following diagram shows how it integrates with other EVerest modules.

.. image:: everest_integration.drawio.svg
:alt: Integration

Selection Algorithm
===================

The selection algorithm contains the logic to select one connector for an incoming token. The algorithm can be
specified within the module config using the key `selection_algorithm`. In case the charging station has only
one connector, the selection of a connector is pretty straight-forward because there is only one that is
available. The selection algorithm becomes relevant in case the Auth module manages authorization requests
for multiple connectors.

Three options for the selection are available:

* PlugEvents
* FindFirst
* UserInput

PlugEvents
----------

The following flow chart describes how a connector is selected using the `PlugEvents` algorithm.

.. image:: plug_events_selection_algorithm.drawio.svg
:alt: SelectionAlgorithm

.. note::

In case a user authorizes first and no EV is connected to the charger to initiate a SessionStarted event the
processing thread waits for a SessionStarted event to select the respective connector. A Plug-In timeout may
occur, which will require a subsequent initiation of authorization to start a charging session.

FindFirst
---------

The `FindFirst` selection method simply selects the first available connector that has no active transaction.
This method attempts to select a connector immediately.

UserInput
---------

Not yet implemented.

Plug&Charge Authorization
=========================

Please see the `Plug&Charge configuration guide <https://everest.github.io/nightly/general/07_configure_plug_and_charge.html>`_
for further information about the Plug&Charge integration in EVerest.
9 changes: 8 additions & 1 deletion modules/Auth/manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,14 @@ description: >-
the connected evse managers. In addition to that, it handles the reservation management.
config:
selection_algorithm:
description: The algorithm that is used to map an incoming token to a connector
description: >-
The selection algorithm contains the logic to select one connector for an incoming token. In case the charging station
has only one connector, the selection of a connector is pretty straight-forward because there is only one that is
available. The selection algorithm becomes relevant in case the Auth module manages authorization requests
for multiple connectors. The following values can be set:
PlugEvents: Selection of connector is based on EV Plug In events
FindFirst: Simply selects the first available connector that has no active transaction
UserInput: Placeholder, not yet implemented
type: string
default: FindFirst
connection_timeout:
Expand Down

0 comments on commit b726c5b

Please sign in to comment.