⚡ChargePi⚡ is an open-source Raspberry Pi 4 based ⚡Charging Point🔌 project, which supports multiple EVSEs and simple connectors🔌. A charging connector🔌 consists of a WS281x RGB 🚥 LED strip, a relay and a power meter.
ChargePi client can be deployed/run in multiple ways:
- standalone
- Docker 🐳 by building the image and running the container
- Docker-compose to be deployed with SteVe Central System and Watchtower (recommended for dev/testing only)
- Docker-compose by running the client
This project is no longer maintained, as we've moved to a more optimized and feature-rich version of the project in Go ( ChargePi-go).
The goal is to create a hardware-agnostic smart charge point platform. The Go version supports more features and hardware, and is optimized for better performance. Any contributions are welcome.
Protocol implementation | Core functionalities | Offline charging | Local authorization | Charging profiles |
---|---|---|---|---|
OCPP 1.6 JSON/WS | ✔️ | ✔️ | ✔️ | ❌ |
OCPP 2.0.1 JSON/WS | Will be implemented | Will be implemented | Will be implemented | ❌ |
ChargePi uses Graylog logging server for storing logs, so a logging server should be up and running if you want the logs to be stored. Logs are sent through GELF UDP protocol to the logging server at port 12201. The library used for logging is graypy.
Configure the log_server
property in the settings.json
file with your logging server IP.
-
If you want to run SteVe on the same host:
ChargePi/steve/
*When cloning Steve from GitHub, steve directory should be automatically generated. Replace SteVe's default Dockerfile with Dockerfile provided in ChargePi/steve/Dockerfile to run on Raspberry Pi.
-
Wire the hardware according to the schematics.
-
Configure the client.
-
Python 3.7+ and pip3 must be installed as they are necessary to support asynchronous operations:
sudo apt-get install python3 python3-pip
-
This client uses SteVe for the Central System, but can connect to other Central Systems as well.
- Optional: Clone the repository and run SteVe.
- Be sure the Central system is up when running the client and that the client is added to the Charge Point list.
-
Run the following command to install necessary dependencies:
sudo pip3 install -r requirements.txt
-
Run the client as sudo:
sudo python3 ChargePi_client.py
-
Configure the configuration file and make sure you have the proper directory structure. Be sure your Central System is running and create/add a charge point.
-
Build the client image on Docker:
cd ChargePi/client docker build -t chargepi .
-
Run the container from built image:
docker run --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem --privileged chargepi
If you wish, you can run client, SteVe server and Watchtower on the same Pi using docker-compose. The Watchtower service will automatically pull the newest image and run it when it is available.
-
Change the IP address under server_uri in the settings file to 172.0.1.121.
-
Build services:
docker-compose build
-
Run services in daemon mode using the following command:
docker-compose up -d