Open Sustainable Technology

A curated list of open technology projects to sustain a stable climate, energy supply, biodiversity and natural resources.

Browse accepted projects | Review proposed projects | Propose new project | Open Issues

SteVe

Provides basic functions for the administration of charge points, user data and RFID cards for user authentication and was tested successfully in operation.
https://github.com/steve-community/steve

chargingstation emobility java mobility ocpp smarthome steve

Last synced: about 12 hours ago
JSON representation

Repository metadata

SteVe - OCPP server implementation in Java

README

        

![SteVe](src/main/resources/webapp/static/images/logo.png)

[![build and run tests](https://github.com/steve-community/steve/actions/workflows/main.yml/badge.svg)](https://github.com/steve-community/steve/actions/workflows/main.yml)

# Introduction

SteVe started its life at the RWTH Aachen University [in 2013](https://github.com/steve-community/steve/issues/827).
The name is derived from _Steckdosenverwaltung_ in German (in English: socket administration).
The aim of SteVe is to support the deployment and popularity of electric mobility, so it is easy to install and to use.
It provides basic functions for the administration of charge points, user data, and RFID cards for user authentication and was tested successfully in operation.

SteVe is considered as an open platform to implement, test and evaluate novel ideas for electric mobility, like authentication protocols, reservation mechanisms for charge points, and business models for electric mobility.
The project is distributed under [GPL](LICENSE.txt) and is free to use.
If you are going to deploy it we are happy to see the [logo](website/logo/managed-by-steve.pdf) on a charge point.

### Charge Point Support

Electric charge points using the following OCPP versions are supported:

* OCPP1.2S
* OCPP1.2J
* OCPP1.5S
* OCPP1.5J
* OCPP1.6S
* OCPP1.6J

For Charging Station compatibility please check:
https://github.com/steve-community/steve/wiki/Charging-Station-Compatibility

### System Requirements

SteVe requires
* JDK 17 or newer
* Maven
* MySQL or MariaDB. You should use [one of these](.github/workflows/main.yml#L11) supported versions.

to build and run.

SteVe is designed to run standalone, a java servlet container / web server (e.g. Apache Tomcat), is **not** required.

# Configuration and Installation

1. Database preparation:

**Important**: Make sure that the time zone of the MySQL server is the same as [the time zone of SteVe](src/main/java/de/rwth/idsg/steve/SteveConfiguration.java#L46). Since `UTC` is strongly recommended by OCPP, it is the default in SteVe and you should set it in MySQL, accordingly.

Make sure MySQL is reachable via TCP (e.g., remove `skip-networking` from `my.cnf`).
The following MySQL statements can be used as database initialization (adjust database name and credentials according to your setup).

```
CREATE DATABASE stevedb CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'steve'@'localhost' IDENTIFIED BY 'changeme';
GRANT ALL PRIVILEGES ON stevedb.* TO 'steve'@'localhost';
GRANT SUPER ON *.* TO 'steve'@'localhost';
```
Note: The statement `GRANT SUPER [...]` is only necessary to execute some of the previous migration files and is only needed for the initial database setup. Afterwards, you can remove this privilege by executing
```
REVOKE SUPER ON *.* FROM 'steve'@'localhost';
```

2. Download and extract tarball:

You can download and extract the SteVe releases using the following commands (replace X.X.X with the desired version number):
```
wget https://github.com/steve-community/steve/archive/steve-X.X.X.tar.gz
tar xzvf steve-X.X.X.tar.gz
cd steve-X.X.X
```

3. Configure SteVe **before** building:

The basic configuration is defined in [main.properties](src/main/resources/config/prod/main.properties):
- You _must_ change [database configuration](src/main/resources/config/prod/main.properties#L9-L13)
- You _must_ change [the host](src/main/resources/config/prod/main.properties#L22) to the correct IP address of your server
- You _must_ change [web interface credentials](src/main/resources/config/prod/main.properties#L17-L18)
- You _can_ access the application via HTTPS, by [enabling it and setting the keystore properties](src/main/resources/config/prod/main.properties#L32-L35)

For advanced configuration please see the [Configuration wiki](https://github.com/steve-community/steve/wiki/Configuration)

4. Build SteVe:

To compile SteVe simply use Maven. A runnable `jar` file containing the application and configuration will be created in the subdirectory `steve/target`.

```
# ./mvnw package
```

5. Run SteVe:

To start the application run (please do not run SteVe as root):

```
# java -jar target/steve.jar
```

# Docker

If you prefer to build and start this project via docker (you can skip the steps 1, 4 and 5 from above), this can be done as follows: `docker compose up -d`

Because the docker compose file is written to build the project for you, you still have to change the project configuration settings from step 3.
Instead of changing the [main.properties in the prod directory](src/main/resources/config/prod/main.properties), you have to change the [main.properties in the docker directory](src/main/resources/config/docker/main.properties). There you have to change all configurations which are described in step 3.
The database password for the user "steve" has to be the same as you have configured it in the docker compose file.

With the default docker compose configuration, the web interface will be accessible at: `http://localhost:8180`

# Kubernetes

First build your image, and push it to a registry your K8S cluster can access. Make sure the build args in the docker build command are set with the same database configuration that the main deployment will use.

`docker build --build-arg DB_HOST= --build-arg DB_PORT= --build-arg DB_USERNAME= --build-arg DB_PASSWORD= --build-arg DB_DATABASE= -f k8s/docker/Dockerfile -t .`

`docker push `

Then go to `k8s/yaml/Deployment.yaml` and change `### YOUR BUILT IMAGE HERE ###` to your image tag, and fill in the environment variables with the same database connection that you used at build time.

After this, create the namespace using `kubectl create ns steve` and apply your yaml with `kubectl apply -f k8s/yaml/Deployment.yaml` followed by `kubectl apply -f k8s/yaml/Service.yaml`

To access this publicaly, you'll also have to setup an ingress using something like nginx or traefik.

# Ubuntu

You'll find a tutorial how to prepare Ubuntu for SteVe here: https://github.com/steve-community/steve/wiki/Prepare-Ubuntu-VM-for-SteVe

# AWS

You'll find a tutorial how to setup SteVe in AWS using Lightsail here: https://github.com/steve-community/steve/wiki/Create-SteVe-Instance-in-AWS-Lightsail

# First Steps

After SteVe has successfully started, you can access the web interface using the configured credentials under:

http://:/steve/manager

### Add a charge point

1. In order for SteVe to accept messages from a charge point, the charge point must first be registered. To add a charge point to SteVe select *Data Management* >> *Charge Points* >> *Add*. Enter the ChargeBox ID configured in the charge point and confirm.

2. The charge points must be configured to communicate with following addresses. Depending on the OCPP version of the charge point, SteVe will automatically route messages to the version-specific implementation.
- SOAP: `http://:/steve/services/CentralSystemService`
- WebSocket/JSON: `ws://:/steve/websocket/CentralSystemService`

As soon as a heartbeat is received, you should see the status of the charge point in the SteVe Dashboard.

*Have fun!*

Screenshots
-----
1. [Home](website/screenshots/home.png)
2. [Connector Status](website/screenshots/connector-status.png)
3. [Data Management - Charge Points](website/screenshots/chargepoints.png)
4. [Data Management - Users](website/screenshots/users.png)
5. [Data Management - OCPP Tags](website/screenshots/ocpp-tags.png)
6. [Data Management - Reservations](website/screenshots/reservations.png)
7. [Data Management - Transactions](website/screenshots/transactions.png)
8. [Operations - OCPP v1.2](website/screenshots/ocpp12.png)
9. [Operations - OCPP v1.5](website/screenshots/ocpp15.png)
10. [Settings](website/screenshots/settings.png)

GDPR
-----
If you are in the EU and offer vehicle charging to other people using SteVe, keep in mind that you have to comply to the General Data Protection Regulation (GDPR) as SteVe processes charging transactions, which can be considered personal data.

Are you having issues?
-----
See the [FAQ](https://github.com/steve-community/steve/wiki/FAQ)

Acknowledgments
-----
[goekay](https://github.com/goekay) thanks to
- [JetBrains](https://jb.gg/OpenSourceSupport) who support this project by providing a free All Products Pack license, and
- ej-technologies GmbH who support this project by providing a free license for their [Java profiler](https://www.ej-technologies.com/products/jprofiler/overview.html).


Owner metadata


GitHub Events

Total
Last Year

Committers metadata

Last synced: 2 days ago

Total Commits: 1,584
Total Committers: 32
Avg Commits per committer: 49.5
Development Distribution Score (DDS): 0.415

Commits in past year: 139
Committers in past year: 10
Avg Commits per committer in past year: 13.9
Development Distribution Score (DDS) in past year: 0.266

Name Email Commits
Sevket Goekay g****y@d****e 926
dependabot[bot] 4****] 349
dependabot-preview[bot] 2****] 169
Christian Samsel c****l@g****e 59
Julien Herr j****r@b****r 20
Andreas Heuvels a****s@r****e 13
David Rerimassie d****l@g****m 8
Michael Heimpold m****i@h****e 5
Ling Li l****i@i****k 5
Julien Herr j****n@h****r 4
Byungjun Woo b****n@g****e 2
Sylwester Lachiewicz s****z@g****m 2
Yvan Janssens y****j@c****t 2
Christian Meusel c****l@p****e 2
redhell a****n@b****z 1
fnkbsi 1****i 1
chuck-h c****r@g****m 1
Stefan Wahren s****n@i****m 1
João Pires j****1@o****m 1
Gregor Schatz g****z@h****e 1
Fabian Ohler f****1@r****e 1
Drotak d****r@g****m 1
Dan Pegg d****9@g****m 1
Benoit Vianin b****n@s****h 1
AndyChriss123 A****3@g****m 1
Alexander Weickmann a****n@l****m 1
fnkbsi f****i@n****m 1
bastian b****r@t****e 1
Sylwester Lachiewicz s****z@a****g 1
Kyle Abramowitz k****z@m****m 1
and 2 more...

Committer domains:


Issue and Pull Request metadata

Last synced: 1 day ago

Total issues: 620
Total pull requests: 846
Average time to close issues: about 2 months
Average time to close pull requests: 7 days
Total issue authors: 313
Total pull request authors: 36
Average comments per issue: 3.88
Average comments per pull request: 0.56
Merged pull request: 603
Bot issues: 0
Bot pull requests: 714

Past year issues: 112
Past year pull requests: 213
Past year average time to close issues: 25 days
Past year average time to close pull requests: 8 days
Past year issue authors: 62
Past year pull request authors: 10
Past year average comments per issue: 3.44
Past year average comments per pull request: 0.74
Past year merged pull request: 123
Past year bot issues: 0
Past year bot pull requests: 171

More stats: https://issues.ecosyste.ms/repositories/lookup?url=https://github.com/steve-community/steve

Top Issue Authors

  • goekay (26)
  • lategoodbye (20)
  • rdc-Green (18)
  • goRaspy (15)
  • juherr (11)
  • GRangaRao (11)
  • Tano-Coppoletta (10)
  • TechOverflow (9)
  • eviontech (9)
  • 01mk027 (8)
  • chuck-h (7)
  • andle (7)
  • MadLamprey (7)
  • DeltaVetal26 (6)
  • rishabhmehandru (6)

Top Pull Request Authors

  • dependabot[bot] (529)
  • dependabot-preview[bot] (185)
  • goekay (38)
  • juherr (22)
  • JavaIsJavaScript (10)
  • fnkbsi (9)
  • csamsel (6)
  • slachiewicz (6)
  • mhei (5)
  • friedkiwi (3)
  • muued (2)
  • Nos- (2)
  • chuck-h (2)
  • sirhcel (2)
  • AndyChriss123 (2)

Top Issue Labels

  • helpdesk (93)
  • question (56)
  • feature request (46)
  • bug (19)
  • enhancement (10)
  • duplicate (8)
  • discussion (3)
  • invalid (2)
  • wontfix (2)

Top Pull Request Labels

  • dependencies (714)
  • java (125)
  • github_actions (3)

Dependencies

pom.xml maven
  • org.jetbrains:annotations 23.0.0 compile
  • org.apache.logging.log4j:log4j-bom 2.18.0 import
  • org.springframework:spring-framework-bom 5.3.21 import
  • org.projectlombok:lombok 1.18.24 provided
  • com.fasterxml.jackson.core:jackson-annotations 2.13.3
  • com.fasterxml.jackson.core:jackson-databind 2.13.3
  • com.fasterxml.jackson.module:jackson-module-jaxb-annotations 2.13.3
  • com.github.RWTH-i5-IDSG:ocpp-jaxb 0.0.1
  • com.github.goekay:CompositeJKS 2.0
  • com.github.zafarkhaja:java-semver 0.9.0
  • com.google.guava:guava 31.1-jre
  • com.lmax:disruptor 3.4.4
  • com.neovisionaries:nv-i18n 1.29
  • com.sun.mail:jakarta.mail 2.0.1
  • com.zaxxer:HikariCP 5.0.1
  • joda-time:joda-time 2.10.14
  • mysql:mysql-connector-java 8.0.29
  • org.apache.cxf:cxf-rt-features-logging 3.5.3
  • org.apache.cxf:cxf-rt-frontend-jaxws 3.5.3
  • org.apache.cxf:cxf-rt-transports-http 3.5.3
  • org.apache.cxf:cxf-rt-transports-http-hc 3.5.3
  • org.apache.logging.log4j:log4j-api
  • org.apache.logging.log4j:log4j-core
  • org.apache.logging.log4j:log4j-slf4j-impl
  • org.apache.logging.log4j:log4j-web
  • org.eclipse.jetty.websocket:websocket-jetty-server 10.0.11
  • org.eclipse.jetty:apache-jsp 10.0.11
  • org.eclipse.jetty:apache-jstl 10.0.11
  • org.eclipse.jetty:jetty-annotations 10.0.11
  • org.eclipse.jetty:jetty-rewrite 10.0.11
  • org.eclipse.jetty:jetty-server 10.0.11
  • org.eclipse.jetty:jetty-webapp 10.0.11
  • org.hibernate.validator:hibernate-validator 6.1.7.Final
  • org.jooq:jooq 3.16.7
  • org.slf4j:jcl-over-slf4j 1.7.36
  • org.slf4j:slf4j-api 1.7.36
  • org.springframework.security:spring-security-config 5.7.2
  • org.springframework.security:spring-security-web 5.7.2
  • org.springframework:spring-webmvc
  • org.springframework:spring-websocket
  • org.eclipse.jetty.websocket:websocket-jetty-client 10.0.11 test
  • org.junit.jupiter:junit-jupiter-engine 5.8.2 test
  • org.junit.jupiter:junit-jupiter-params 5.8.2 test
  • org.springframework:spring-test test
.github/workflows/main.yml actions
  • actions/checkout v2 composite
  • actions/setup-java v2 composite
  • ${{matrix.db}} * docker
.github/workflows/review.yml actions
  • actions/checkout v2 composite
  • actions/checkout v3 composite
  • actions/setup-java v2 composite
  • actions/setup-java v3 composite
  • nikitasavinov/checkstyle-action master composite
  • pmd/pmd-github-action v1 composite
Dockerfile docker
  • maven 3.6.1-jdk-11 build
docker-compose.yml docker
  • mariadb 10.4
k8s/docker/Dockerfile docker
  • maven 3.6.1-jdk-11 build

Score: 10.196754003281809