Code Monkey home page Code Monkey logo

⚡ChargePi🔌

⚡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

⚠️ Deprecation notice

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.

Charging station specifications

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

Graylog logging server

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.

Initial setup

  1. 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.

  2. Wire the hardware according to the schematics.

  3. Configure the client.

Running standalone

  1. Python 3.7+ and pip3 must be installed as they are necessary to support asynchronous operations:

    sudo apt-get install python3 python3-pip
  2. 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.
  3. Run the following command to install necessary dependencies:

    sudo pip3 install -r requirements.txt
  4. Run the client as sudo:

    sudo python3 ChargePi_client.py

Docker

Deploying on Docker

  1. 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.

  2. Build the client image on Docker:

    cd ChargePi/client
    docker build -t chargepi .
  3. Run the container from built image:

    docker run --device /dev/ttyAMA0:/dev/ttyAMA0 --device /dev/mem:/dev/mem --privileged chargepi

Deploying using docker-compose

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.

  1. Change the IP address under server_uri in the settings file to 172.0.1.121.

  2. Build services:

    docker-compose build
  3. Run services in daemon mode using the following command:

    docker-compose up -d

ChargePi's Projects

chargepi icon chargepi

⚡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-go icon chargepi-go

ChargePi is a charge point framework/project for Linux devices with OCPP support, API and a management UI

ocmf-go icon ocmf-go

Library for Open Charge Metering Format, written in Go.

ocpp-go icon ocpp-go

Open Charge Point Protocol implementation in Go

ocppmanager-go icon ocppmanager-go

A library for storing OCPP configuration values, with custom value support.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.