Skip to content

Commit

Permalink
Merge branch 'OpenEMS:develop' into patch-10
Browse files Browse the repository at this point in the history
  • Loading branch information
Sn0w3y authored Jan 16, 2025
2 parents 2504de3 + 79650cb commit d81f97a
Show file tree
Hide file tree
Showing 972 changed files with 21,566 additions and 13,136 deletions.
4 changes: 4 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ updates:
bouncycastle:
patterns:
- "org.bouncycastle:*"
pax-logging:
patterns:
- "org.ops4j.pax.logging:*"

- package-ecosystem: npm
directory: "/ui"
Expand All @@ -30,6 +33,7 @@ updates:
- "@angular/*"
- "@angular-devkit/*"
- "@angular-eslint/*"
- "@schematics/angular"
capacitor:
patterns:
- "@capacitor/*"
Expand Down
2 changes: 1 addition & 1 deletion .gradle-wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
80 changes: 0 additions & 80 deletions .woodpecker/ui-build.yml

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ If you use OpenEMS in your scientific research, please use our Zenodo Digital Ob
* OpenEMS Edge
* OpenEMS Backend

Copyright (C) 2016-2022 OpenEMS Association e.V.
Copyright (C) 2016-2025 OpenEMS Association e.V.

This product includes software developed at FENECON GmbH: you can
redistribute it and/or modify it under the terms of the [Eclipse Public License version 2.0](LICENSE-EPL-2.0).

* OpenEMS UI

Copyright (C) 2016-2022 OpenEMS Association e.V.
Copyright (C) 2016-2025 OpenEMS Association e.V.

This product includes software developed at FENECON GmbH: you can
redistribute it and/or modify it under the terms of the [GNU Affero General Public License version 3](LICENSE-AGPL-3.0).
6 changes: 3 additions & 3 deletions cnf/build.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ buildpath: \
org.osgi.service.metatype;version='1.4.1',\
org.osgi.service.metatype.annotations;version='1.4.1',\
org.osgi.util.promise;version='1.2.0',\
com.google.guava;version='33.3.1.jre',\
com.google.guava;version='33.4.0.jre',\
com.google.guava.failureaccess;version='1.0.2',\
com.google.gson;version='2.11.0',\

Expand Down Expand Up @@ -75,5 +75,5 @@ testpath: \
Edge_Timedata;member=${filter;${p};io\.openems\.edge\.timedata\..*},\
Edge_TimeOfUseTariff;member=${filter;${p};io\.openems\.edge\.timeofusetariff\..*},\

javac.source: 17
javac.target: 17
javac.source: 21
javac.target: 21
20 changes: 10 additions & 10 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<!-- On update: also update gradle.properties file -->
<groupId>biz.aQute.bnd</groupId>
<artifactId>biz.aQute.bnd.gradle</artifactId>
<version>7.0.0</version>
<version>7.1.0</version>
</dependency>
<!-- com -->
<dependency>
Expand All @@ -38,7 +38,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>33.3.1-jre</version>
<version>33.4.0-jre</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand All @@ -61,7 +61,7 @@
<!-- Used by com.squareup.okhttp3: okhttp -->
<groupId>com.squareup.okio</groupId>
<artifactId>okio-jvm</artifactId>
<version>3.9.1</version>
<version>3.10.2</version>
</dependency>
<dependency>
<!-- Used by com.influxdb: influxdb-client -->
Expand Down Expand Up @@ -105,7 +105,7 @@
<!-- Changelog: https://github.com/PgBulkInsert/PgBulkInsert/blob/master/CHANGELOG.md-->
<groupId>de.bytefish</groupId>
<artifactId>pgbulkinsert</artifactId>
<version>8.1.4</version>
<version>8.1.5</version>
</dependency>
<!-- eu -->
<dependency>
Expand All @@ -130,7 +130,7 @@
<dependency>
<groupId>fr.turri</groupId>
<artifactId>aXMLRPC</artifactId>
<version>1.14.0</version>
<version>1.16.0</version>
</dependency>
<!-- info -->
<dependency>
Expand Down Expand Up @@ -177,7 +177,7 @@
<!-- Release notes: https://github.com/jenetics/jenetics/blob/master/RELEASE_NOTES.md -->
<groupId>io.jenetics</groupId>
<artifactId>jenetics</artifactId>
<version>7.2.0</version>
<version>8.1.0</version>
</dependency>
<!-- javax -->
<dependency>
Expand All @@ -190,7 +190,7 @@
<!-- Used by SDNotify -->
<groupId>net.java.dev.jna</groupId>
<artifactId>jna</artifactId>
<version>5.15.0</version>
<version>5.16.0</version>
</dependency>
<!-- org -->
<dependency>
Expand Down Expand Up @@ -342,7 +342,7 @@
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
<artifactId>kotlinx-coroutines-core-jvm</artifactId>
<version>1.9.0</version>
<version>1.10.1</version>
</dependency>
<dependency>
<!-- HTML processing -->
Expand Down Expand Up @@ -403,12 +403,12 @@
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
<version>2.2.1</version>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-log4j2</artifactId>
<version>2.2.1</version>
<version>2.2.7</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand Down
8 changes: 8 additions & 0 deletions doc/modules/ROOT/pages/backend/deploy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,14 @@ This chapter explains how OpenEMS Backend can be deployed on a Debian Linux serv

NOTE: It is recommended to run every service on a server with limited permissions. This example runs OpenEMS Backend with user "root" which is a bad idea for a production server!

==== Check JAVA version

Ensure that a JRE version 21 or later is installed. We recommend using `temurin-21-jre`

For detailed installation instructions, visit https://adoptium.net/de/installation/linux/[Adoptium Installation Guide].

NOTE: If you are using an *ARM32* device, download https://openems.io/download/temurin-21-jre-armhf_21.0.6+2.deb[temurin-21-jre-armhf_21.0.6+2.deb] directly from OpenEMS.

==== Create an application directory

Create the directory */opt/openems-backend*. This is going to be the place, where we put the JAR file.
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/contribute/coding-guidelines.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
* Use precise naming for methods/functions
* Use narrow scopes for variables; avoid class variables
* Split code in Interface, Implementation(..Impl) and Config files
* Use modern Java 17 syntax (e.g. 'var' keyword, streams, etc.)
* Use modern Java 21 syntax (e.g. 'var' keyword, streams, etc.)
* Add readme.adoc to a new bundle
* Review data in bnd.bnd file
* Format all files via Eclipse Autoformat, organize Imports, apply Checkstyle suggestions (see below)
Expand Down
8 changes: 8 additions & 0 deletions doc/modules/ROOT/pages/edge/deploy.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ image::deploy-winscp.png[Start WinSCP from KiTTY]

=== Prepare operating system environment

==== Check JAVA version

Ensure that a JRE version 21 or later is installed. We recommend using `temurin-21-jre`

For detailed installation instructions, visit https://adoptium.net/de/installation/linux/[Adoptium Installation Guide].

NOTE: If you are using an *ARM32* device, download https://openems.io/download/temurin-21-jre-armhf_21.0.6+2.deb[temurin-21-jre-armhf_21.0.6+2.deb] directly from OpenEMS.

==== Create an application directory

Create the directory */usr/lib/openems*. This is going to be the place, where we put the JAR file.
Expand Down
8 changes: 4 additions & 4 deletions doc/modules/ROOT/pages/gettingstarted.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ NOTE: OpenEMS uses the **git** version control system via the popular GitHub pla
NOTE: Eclipse IDE is the recommended development environment for newcomers to OpenEMS. If you are more familiar with IntelliJ IDEA, feel free to use it. Follow xref:intellij.adoc[this guide].

. Prepare Eclipse IDE
.. Download Java Development Kit (JDK) 17 and install it. We recommend the https://adoptium.net/de/temurin/releases/?version=17[OpenJDK Temurin builds by the Adoptium project]
.. Download Java Development Kit (JDK) 21 and install it. We recommend the https://adoptium.net/de/temurin/releases/?version=21[OpenJDK Temurin builds by the Adoptium project]
.. Download https://www.eclipse.org/downloads/[Eclipse for Java icon:external-link[]], install and start it
.. On first start you will get asked to create a workspace.
Select your source code directory (`C:\Users\your.user\git\openems` in our example) and press btn:[Launch].
Expand All @@ -53,15 +53,15 @@ image::eclipse-workspace.png[Creating a workspace in Eclipse IDE]
+
Menu: btn:[Help] → btn:[Eclipse Marketplace...] → btn:[Find:] → enter btn:[Bndtools] → press btn:[Install]

.. Configure Eclipse IDE to use JDK 17.
.. Configure Eclipse IDE to use JDK 21.
+
- In the Menu select btn:[Windows] → btn:[Preferences]
- Select btn:[Java] - btn:[Installed JREs] in the navigation tree
- Press the btn:[Add...] button
- Keep btn:[Standard VM] selected and press btn:[Next >]
- Press the btn:[Directory...] button and select the folder of the installed JDK (e.g. `C:\Program Files\Eclipse Adoptium\jdk-17.0.7.7-hotspot`)
- Press the btn:[Directory...] button and select the folder of the installed JDK (e.g. `C:\Program Files\Eclipse Adoptium\jdk-21.0.3.9-hotspot`)
- Press the btn:[Finish] button
- Back in the Preferences window, tick the newly added JDK 17 and press btn:[Apply and Close]
- Back in the Preferences window, tick the newly added JDK 21 and press btn:[Apply and Close]
+
.Creating a workspace in Eclipse IDE
image::eclipse-select-jdk.png[Set the Java Development Kit in Eclipse IDE]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Charts are mainly used in the History-View and should be acting like the `modal`

Creating or updating charts has been very difficult, but if you use the recommended and new way of creating them, its much easier and can be done fast. Furthermore they are unittestable now.

If we take a look at a link:src\app\edge\history\common\autarchy\chart\chart.ts[Working Example], we will see, that the chart directory includes not only the chart.ts but also the corresponding .spec-file. If you are not familiar with angulars unit testing, check it out link:https://angular.io/guide/testing#test-file-name-and-location[here].
If we take a look at a link:https://github.com/OpenEMS/openems/blob/develop/ui/src/app/edge/history/common/autarchy/chart/chart.ts[Working Example], we will see, that the chart directory includes not only the chart.ts but also the corresponding .spec-file. If you are not familiar with angulars unit testing, check it out link:https://angular.io/guide/testing#test-file-name-and-location[here].

NOTE: It is recommended to have the `component.ts` and `component.spec.ts` files in the same folder.

Expand Down Expand Up @@ -55,4 +55,4 @@ The `output` is then defining the dataset, with the `nameSuffix` callback having

The second one is passed with the output callback, and has to be used for the converter callback-function.

Additionally we define the formatting of the data in the tooltip and the yAxes.
Additionally we define the formatting of the data in the tooltip and the yAxes.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
java_source=21
java_target=17
java_target=21

bnd_version=7.0.0
bnd_version=7.1.0
bnd_snapshots=https://bndtools.jfrog.io/bndtools/libs-snapshot-local
bnd_releases=https://bndtools.jfrog.io/bndtools/libs-release-local

Expand Down
2 changes: 1 addition & 1 deletion io.openems.backend.alerting/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="src" output="bin_test" path="test">
<attributes>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

/**
* Schedules one or more {@link Message} for type {@link T} to a specific time.
*
* <p>
* After the specified time is reached, the scheduler sends the Messages to
* their {@link Handler} and removes them from itself.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public TimedTask(ZonedDateTime executeAt, Consumer<ZonedDateTime> task) {

@Override
public int compareTo(TimedTask other) {
if (other == null || other.executeAt == null) {
if (other == null || other.executeAt == null) {
return 1;
}
return this.executeAt.compareTo(other.executeAt);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,14 +224,14 @@ public void leap(long amount) {
* Try to advance the Clock to a specific amount of minutes after
* initialization. If the given point is ahead, the time will leap by the
* missing amount. If the given point is behind, nothing will happen.
*
* <p>
* A return value >=0 means, the clock has advanced the given amount in minutes
* with this call.
* </p>
*
* <p>
* A return value <0 means, the clock has already advanced the given amount
* above.
* </p>
*
* @param point to advance to
* @return difference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ public void testMessage() {

assertTrue("msg10 should be greater than msg11", msg10.compareTo(msg11) > 0);
assertTrue("msg10 should be lower than msg20", msg10.compareTo(msg20) < 0);

assertTrue("msg10 should be greater than null", msg10.compareTo(null) > 0);
}

Expand Down
2 changes: 1 addition & 1 deletion io.openems.backend.application/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="aQute.bnd.classpath.container"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-21"/>
<classpathentry kind="src" output="bin" path="src"/>
<classpathentry kind="src" output="bin_test" path="test">
<attributes>
Expand Down
Loading

0 comments on commit d81f97a

Please sign in to comment.