Code Monkey home page Code Monkey logo

arduinoocppsimulator's Introduction

Icon   ArduinoOcppSimulator

Tester / Demo App for the ArduinoOcpp Client, running on native Ubuntu or the WSL.

Screenshot

The Simulator has two purposes:

  • As a development tool, it allows to run ArduinoOcpp directly on the host computer and simplifies the development (no flashing of the microcontroller required)
  • As a demonstration tool, it allows backend operators to test and use ArduinoOcpp without the need to set up an actual microcontroller or to buy an actual charger with ArduinoOcpp.

That means that the Simulator runs on your computer and connects to an OCPP server using the same software like a microcontroller. It provides a Graphical User Interface to show the connection status and to trigger simulated charging sessions (and further simulated actions).

Installation

On Windows, get the Windows Subsystem for Linux (WSL): https://ubuntu.com/wsl

Then follow the same steps like for Ubuntu.

On Ubuntu (other distros probably work as well, tested on Ubuntu 20.04 and 22.04), install cmake, OpenSSL and the C++ compiler:

sudo apt install cmake libssl-dev build-essential

Navigate to the preferred installation directory or just to the home folder. Clone the Simulator and all submodules:

git clone --recurse-submodules https://github.com/matth-x/ArduinoOcppSimulator

Navigate to the copy of the Simulator, prepare some necessary local folders and build:

cd ArduinoOcppSimulator
mkdir build
mkdir ao_store
cmake -S . -B ./build
cmake --build ./build -j 16 --target ao_simulator

The installation is complete! To run the Simulator, type:

./build/ao_simulator

This will open localhost:8000. You can access the Graphical User Interface by entering that address into a browser running on the same computer. Make sure that the firewall settings allow the Simulator to connect and to be reached.

The Simulator should be up and running now!

Building the Webapp (Developers)

The webapp is registered as a git submodule in webapp-src.

Before you can build the webapp, you have to create a .env.production file in the webapp-src folder. If you just want to try out the build process, you can simply duplicate the .env.development file and rename it.

After that, to build it for deployment, all you have to do is run ./build-webapp/build_webapp.ps1 (Windows) from the root directory. For this to work NodeJS, npm and git have to be installed on your machine. The called script automatically performs the following tasks:

  • pull the newest version of the the arduino-ocpp-dashboard
  • check if you have added a .env.production file
  • install webapp dependencies
  • build the webapp
  • compress the webapp
  • move the g-zipped bundle file into the public folder

During the process there might be some warnings displayed. Als long as the script exits without an error everything worked fine. An up-to-date version of the webapp should be placed in the public folder.

License

This project is licensed under the GPL as it uses the Mongoose Embedded Networking Library. If you have a proprietary license of Mongoose, then the MIT License applies.

arduinoocppsimulator's People

Contributors

matth-x avatar agruenb 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.