Skip to content

Commit

Permalink
Merge branch 'release/2025.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Feb 2, 2025
2 parents 5aa18e3 + 9da19db commit bd574ac
Show file tree
Hide file tree
Showing 554 changed files with 19,795 additions and 13,179 deletions.
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).
16 changes: 8 additions & 8 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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 @@ -231,7 +231,7 @@
<!-- Changelog: https://github.com/apache/felix-dev/commits/master/http -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.jetty</artifactId>
<version>5.1.26</version>
<version>5.1.28</version>
</dependency>
<dependency>
<!-- Apache Felix Servlet API -->
Expand Down Expand Up @@ -284,14 +284,14 @@
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcpkix-jdk18on -->
<groupId>org.bouncycastle</groupId>
<artifactId>bcpkix-jdk18on</artifactId>
<version>1.79</version>
<version>1.80</version>
</dependency>
<dependency>
<!-- Bouncycastle for Eclipse Paho MQTTv5 Client -->
<!-- https://mvnrepository.com/artifact/org.bouncycastle/bcprov-jdk18on -->
<groupId>org.bouncycastle</groupId>
<artifactId>bcprov-jdk18on</artifactId>
<version>1.79</version>
<version>1.80</version>
</dependency>
<dependency>
<groupId>org.dhatim</groupId>
Expand Down Expand Up @@ -337,7 +337,7 @@
<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-osgi-bundle</artifactId>
<version>2.1.0</version>
<version>2.1.10</version>
</dependency>
<dependency>
<groupId>org.jetbrains.kotlinx</groupId>
Expand Down Expand Up @@ -403,12 +403,12 @@
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-api</artifactId>
<version>2.2.7</version>
<version>2.2.8</version>
</dependency>
<dependency>
<groupId>org.ops4j.pax.logging</groupId>
<artifactId>pax-logging-log4j2</artifactId>
<version>2.2.7</version>
<version>2.2.8</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand All @@ -435,7 +435,7 @@
<!-- Used by io.openems.backend.metadata.odoo -->
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.7.4</version>
<version>42.7.5</version>
</dependency>
<dependency>
<!-- Used by com.influxdb: influxdb -->
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 @@ -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
12 changes: 6 additions & 6 deletions io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
com.google.gson;version='[2.11.0,2.11.1)',\
com.google.guava;version='[33.4.0,33.4.1)',\
com.google.guava.failureaccess;version='[1.0.2,1.0.3)',\
com.squareup.okio;version='[3.9.1,3.9.2)',\
com.squareup.okio;version='[3.10.2,3.10.3)',\
com.zaxxer.HikariCP;version='[6.2.1,6.2.2)',\
io.openems.backend.alerting;version=snapshot,\
io.openems.backend.application;version=snapshot,\
Expand Down Expand Up @@ -109,22 +109,22 @@
org.apache.felix.configadmin;version='[1.9.26,1.9.27)',\
org.apache.felix.eventadmin;version='[1.6.4,1.6.5)',\
org.apache.felix.fileinstall;version='[3.7.4,3.7.5)',\
org.apache.felix.http.jetty;version='[5.1.26,5.1.27)',\
org.apache.felix.http.jetty;version='[5.1.28,5.1.29)',\
org.apache.felix.http.servlet-api;version='[3.0.0,3.0.1)',\
org.apache.felix.inventory;version='[2.0.0,2.0.1)',\
org.apache.felix.metatype;version='[1.2.4,1.2.5)',\
org.apache.felix.scr;version='[2.2.12,2.2.13)',\
org.apache.felix.webconsole;version='[5.0.8,5.0.9)',\
org.apache.felix.webconsole.plugins.ds;version='[2.3.0,2.3.1)',\
org.jetbrains.kotlin.osgi-bundle;version='[2.1.0,2.1.1)',\
org.jetbrains.kotlin.osgi-bundle;version='[2.1.10,2.1.11)',\
org.jsr-305;version='[3.0.2,3.0.3)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.2.7,2.2.8)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.2.7,2.2.8)',\
org.ops4j.pax.logging.pax-logging-api;version='[2.2.8,2.2.9)',\
org.ops4j.pax.logging.pax-logging-log4j2;version='[2.2.8,2.2.9)',\
org.osgi.service.component;version='[1.5.1,1.5.2)',\
org.osgi.service.jdbc;version='[1.1.0,1.1.1)',\
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.3.0,1.3.1)',\
org.owasp.encoder;version='[1.3.1,1.3.2)',\
org.postgresql.jdbc;version='[42.7.4,42.7.5)',\
org.postgresql.jdbc;version='[42.7.5,42.7.6)',\
reactive-streams;version='[1.0.4,1.0.5)',\
stax2-api;version='[4.2.2,4.2.3)'
Original file line number Diff line number Diff line change
Expand Up @@ -197,11 +197,9 @@ private void handleJsonRpc(User user, Request baseRequest, HttpServletRequest ht
}
// parse JSON-RPC Request
var message = JsonrpcMessage.from(json);
if (!(message instanceof JsonrpcRequest)) {
if (!(message instanceof JsonrpcRequest request)) {
throw new OpenemsException("Only JSON-RPC Request is supported here.");
}
var request = (JsonrpcRequest) message;

// handle the request
CompletableFuture<? extends JsonrpcResponseSuccess> responseFuture = this.parent.jsonRpcRequestHandler
.handleRequest(this.parent.getName(), user, request);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ public static String activeStateChannelsToString(
var states = new HashMap<Level, HashMultimap<String, Channel>>();
for (Entry<ChannelAddress, Channel> entry : activeStateChannels.entrySet()) {
var detail = entry.getValue().getDetail();
if (detail instanceof ChannelDetailState) {
var level = ((ChannelDetailState) detail).getLevel();
if (detail instanceof ChannelDetailState cds) {
var level = cds.getLevel();
var channelsByComponent = states.get(level);
if (channelsByComponent == null) {
channelsByComponent = HashMultimap.create();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,26 +98,21 @@ private void updateConfig(Config config) {
@Override
public CompletableFuture<? extends JsonrpcResponseSuccess> handleRequest(String context, User user,
JsonrpcRequest request) throws OpenemsNamedException {
switch (request.getMethod()) {

case EdgeRpcRequest.METHOD:
return this.edgeRpcRequestHandler.handleRequest(user, request.getId(), EdgeRpcRequest.from(request));

case GetEdgesStatusRequest.METHOD:
return this.handleGetEdgesStatusRequest(user, request.getId(), GetEdgesStatusRequest.from(request));

case GetEdgesChannelsValuesRequest.METHOD:
return this.handleGetEdgesChannelsValuesRequest(user, request.getId(),
return switch (request.getMethod()) {
case EdgeRpcRequest.METHOD //
-> this.edgeRpcRequestHandler.handleRequest(user, request.getId(), EdgeRpcRequest.from(request));
case GetEdgesStatusRequest.METHOD //
-> this.handleGetEdgesStatusRequest(user, request.getId(), GetEdgesStatusRequest.from(request));
case GetEdgesChannelsValuesRequest.METHOD //
-> this.handleGetEdgesChannelsValuesRequest(user, request.getId(),
GetEdgesChannelsValuesRequest.from(request));

case SetGridConnScheduleRequest.METHOD:
return this.handleSetGridConnScheduleRequest(user, request.getId(),
SetGridConnScheduleRequest.from(request));

default:
case SetGridConnScheduleRequest.METHOD //
-> this.handleSetGridConnScheduleRequest(user, request.getId(), SetGridConnScheduleRequest.from(request));
default -> {
this.logWarn(context, "Unhandled Request: " + request);
throw OpenemsError.JSONRPC_UNHANDLED_METHOD.exception(request.getMethod());
}
};
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.openems.backend.edgewebsocket;

import static io.openems.common.utils.FunctionUtils.doNothing;

import java.util.Map.Entry;
import java.util.concurrent.TimeUnit;

Expand Down Expand Up @@ -118,14 +120,17 @@ private void handleDataNotification(AbstractDataNotification message, WsData wsD
var edgeId = wsData.assertEdgeId(message);

try {
// TODO java 21 switch case with type
if (message instanceof TimestampedDataNotification timestampNotification) {
switch (message) {
case TimestampedDataNotification timestampNotification -> {
wsData.edgeCache.updateCurrentData(timestampNotification);
this.parent.timedataManager.write(edgeId, timestampNotification);
} else if (message instanceof AggregatedDataNotification aggregatedNotification) {
}
case AggregatedDataNotification aggregatedNotification -> {
wsData.edgeCache.updateAggregatedData(aggregatedNotification);
this.parent.timedataManager.write(edgeId, aggregatedNotification);
}
case ResendDataNotification resendNotification -> doNothing(); // handled in handleResendDataNotification()
}
} catch (IllegalArgumentException e) {
e.printStackTrace();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import org.osgi.service.metatype.annotations.ObjectClassDefinition;

import io.openems.backend.metadata.odoo.odoo.Protocol;
import io.openems.common.types.DebugMode;

@ObjectClassDefinition(//
name = "Metadata.Odoo", //
Expand Down
Loading

0 comments on commit bd574ac

Please sign in to comment.