= Overview
:imagesdir: ../../assets/images
:sectnums:
:sectnumlevels: 4
:toclevels: 4
:experimental:
:keywords: AsciiDoc
:source-highlighter: highlight.js
:icons: font

This guide will show you how to setup a development environment for OpenEMS by getting a local copy of the source code and setting up your preferred IDE. You can then compile and run the project.

== Prerequisites

OpenEMS uses https://git-scm.com[git] as a version control system and https://github.com/openems[GitHub] for hosting the source code. You can use git either from the command line, from a dedicated GUI, or from inside your IDE. This guide assumes that you have git installed on your system and have some basic familiarity with it. If you are new to git, there are a number of great tutorials out there to get you started.

OpenEMS is written in https://www.oracle.com/java/[Java]. This guide also assumes that you are familiar with Java and its related tools. You need to have the correct version of the Java Development Kit (JDK) installed on your system. As of writing, the current version used by OpenEMS is 21. We recommend using https://adoptium.net/de/temurin/releases?version=21[Eclipse Temurin by Adoptium]

== Clone the OpenEMS git repository

Use git to obtain a local copy of the OpenEMS source code.

. open a console
. change to the target directory
. execute `git clone https://github.com/OpenEMS/openems.git`

== Setup your preferred IDE

You can use any IDE suitable for Java development to work on OpenEMS. Currently, we provide instructions on how to use Eclipse and IntelliJ IDEA.

* To setup Eclipse, follow xref:development/ide/eclipse.adoc[this guide].
* To setup IntelliJ IDEA, follow xref:development/ide/intellij.adoc[this guide].

NOTE: Eclipse IDE is the recommended development environment for newcomers to OpenEMS.

== Next steps

Now that you setup a complete development environment and have a working instance of OpenEMS Edge, OpenEMS Backend an OpenEMS UI, you can continue implementing your first device driver in OpenEMS. We provide a tutorial that explains the steps to implement an electric meter in OpenEMS Edge that is connected via Modbus/TCP.

The meter itself is simulated using a small Modbus slave application, so no external hardware is required for this guide. → xref:edge/implement.adoc[Implementing a Device]
