GithubHelp home page GithubHelp logo

skokov3812 / citrineos-core Goto Github PK

View Code? Open in Web Editor NEW

This project forked from citrineos/citrineos-core

0.0 0.0 0.0 1.55 MB

Charging Station Management System based on OCPP 2.0.1

Home Page: https://citrineos.github.io/

License: Apache License 2.0

Shell 0.59% JavaScript 1.10% TypeScript 97.51% Dockerfile 0.80%

citrineos-core's Introduction

Welcome to CitrineOS

CitrineOS is an open-source project aimed at providing a modular server runtime for managing Electric Vehicle (EV) charging infrastructure. This README will guide you through the process of installing and running CitrineOS.

This is the main part of CitrineOS containing the actual charging station management logic, OCPP message routing and all modules.

All other documentation and the issue tracking can be found in our main repository here: https://github.com/citrineos/citrineos.

Overview

CitrineOS is developed in TypeScript and runs on NodeJS with ws and fastify.

The system features:

  • Dynamic OCPP 2.0.1 message schema validation, prior to transmission using AJV
  • Generated OpenAPIv3 specification for easy developer access
  • Configurable logical modules with decorators
    • @AsHandler to handle incoming OCPP 2.0.1 messages
    • @AsMessageEndpoint to expose functions allowing to send messages to charging stations
    • @AsDataEndpoint to expose CRUD access to entities defined in 10_Data
  • Utilities to connect and extend various message broker and cache mechanisms
    • Currently supported brokers are RabbitMQ and Google Cloud PubSub
    • Currently supported caches are In Memory and Redis

For more information on the project go to citrineos.github.io.

Getting Started

Prerequisites

Before you begin, make sure you have the following installed on your system:

Installation

  1. Clone the CitrineOS repository to your local machine:

    git clone https://github.com/citrineos/citrineos-core
  2. Navigate to the CitrineOS Server directory:

    cd citrineos-core/50_Server
  3. Install project dependencies:

    ./unix-init-install-all.sh
  4. Start the server and its supporting infrastructure with:

    docker-compose up -d 

Starting the Server without Docker

CitrineOS requires configuration to allow your OCPP 2.0.1 compliant charging stations to connect.

We recommend running and developing the project with the docker-compose set-up.

To change necessary configuration for execution outside of docker-compose, please adjust the configuration file at 50_Server/src/config/envs/local.ts. Make sure any changes to the local configuration do not make it into your PR.

Starting the Server

To start the CitrineOS server, run the following command:

npm run start-unix:local

This will launch the CitrineOS server with the specified configuration.

Usage

You can now connect your OCPP 2.0.1 compliant charging stations to the CitrineOS server. Make sure to configure the charging stations to point to the server's IP address and port as specified in the config.json file.

Information on Docker setup

You need to install docker (>= 20.10) and docker-compose. Furthermore, Visual Studio Code might be handy as a common integrated development environment.

Once Docker is running, the following services should be available:

  • CitrineOS (service name: citrineos) with ports
    • 8080: websocket server tcp connection
    • 8081: webserver http - Swagger
  • RabbitMQ Broker (service name: amqp-broker) with ports
  • PostgreSQL (service name: ocpp-db), PostgreSQL database for persistence
    • 5432: sql tcp connection
  • Directus (service name: directus) on port 8055 with endpoints

These three services are defined in 50_Server/docker-compose.yml and they live inside the docker network docker_default with their respective ports. By default these ports are directly accessible by using localhost:8081 for example.

So, if you want to access the amqp-broker default management port via your localhost, you need to access localhost:15672.

Contributing

We welcome contributions from the community. If you would like to contribute to CitrineOS, please follow our contribution guidelines.

Licensing

CitrineOS and its subprojects are licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Support and Contact

If you have any questions or need assistance, feel free to reach out to us on our community forum or create an issue on the GitHub repository.

Roadmap

A more detailed roadmap is coming soon.

  • Support for Kafka Streams
  • Support for OCPP 2.0.1 Core Profile
  • OCA Certification (OCPP 2.0.1 Core Profile)
  • Adding plugin management
  • Implementing ISO15118 Plug and Charge (PnC)
  • Adding OCPP inspector for debugging
  • Adding OCPI 3.0 reference implementation

citrineos-core's People

Contributors

thanaparis avatar joll90 avatar chrisweissmann avatar scarter93 avatar

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.