From c607ed5b2e5cefa2e6321e0c2ab14a4d30549837 Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Thu, 16 Dec 2021 21:04:50 +0100 Subject: [PATCH 01/15] Start development of version 2021.23.0-SNAPSHOT --- doc/modules/ROOT/pages/single_document.adoc | 2 +- io.openems.common/src/io/openems/common/OpenemsConstants.java | 4 ++-- ui/package-lock.json | 2 +- ui/package.json | 2 +- ui/src/app/user/user.component.html | 4 ++-- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/modules/ROOT/pages/single_document.adoc b/doc/modules/ROOT/pages/single_document.adoc index ef95d4b1988..bf970936f33 100644 --- a/doc/modules/ROOT/pages/single_document.adoc +++ b/doc/modules/ROOT/pages/single_document.adoc @@ -1,7 +1,7 @@ = OpenEMS - Open Energy Management System ifndef::toc[] (c) 2020 OpenEMS Association e.V. -Version 2021.22.0 +Version 2021.23.0-SNAPSHOT :sectnums: :sectnumlevels: 4 :toc: diff --git a/io.openems.common/src/io/openems/common/OpenemsConstants.java b/io.openems.common/src/io/openems/common/OpenemsConstants.java index fb69c40ba02..85ac2dba10d 100644 --- a/io.openems.common/src/io/openems/common/OpenemsConstants.java +++ b/io.openems.common/src/io/openems/common/OpenemsConstants.java @@ -20,7 +20,7 @@ public class OpenemsConstants { * * This is usually the number of the sprint within the year */ - public final static short VERSION_MINOR = 22; + public final static short VERSION_MINOR = 23; /** * The patch version of OpenEMS. @@ -32,7 +32,7 @@ public class OpenemsConstants { /** * The additional version string */ - public final static String VERSION_STRING = ""; + public final static String VERSION_STRING = "SNAPSHOT"; /** * The complete version as a SemanticVersion. diff --git a/ui/package-lock.json b/ui/package-lock.json index 502f724859a..75bb2cc7fcb 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,6 +1,6 @@ { "name": "openems-ui", - "version": "2021.22.0", + "version": "2021.23.0-SNAPSHOT", "lockfileVersion": 2, "requires": true, "packages": { diff --git a/ui/package.json b/ui/package.json index fba83ba6107..d8e137850e5 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "openems-ui", - "version": "2021.22.0", + "version": "2021.23.0-SNAPSHOT", "license": "AGPL-3.0", "private": true, "dependencies": { diff --git a/ui/src/app/user/user.component.html b/ui/src/app/user/user.component.html index 453505fbd25..84a86f43272 100644 --- a/ui/src/app/user/user.component.html +++ b/ui/src/app/user/user.component.html @@ -95,8 +95,8 @@ About.openEMS
  • - - About.build: 2021.22.0 (2021-12-16) + + About.build: 2021.23.0-SNAPSHOT
  • From 69da03ed24db72b681250571208833f99f9270b0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 10:39:58 +0100 Subject: [PATCH 02/15] Bump org.apache.felix.webconsole from 4.7.0 to 4.7.2 in /cnf (#1688) * Bump org.apache.felix.webconsole from 4.7.0 to 4.7.2 in /cnf Bumps org.apache.felix.webconsole from 4.7.0 to 4.7.2. --- updated-dependencies: - dependency-name: org.apache.felix:org.apache.felix.webconsole dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Update bndrun files Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Feilmeier --- cnf/pom.xml | 2 +- io.openems.backend.application/BackendApp.bndrun | 2 +- io.openems.edge.application/EdgeApp.bndrun | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index 2f9e2f31318..13bd4a48226 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -193,7 +193,7 @@ org.apache.felix org.apache.felix.webconsole - 4.7.0 + 4.7.2 org.apache.felix diff --git a/io.openems.backend.application/BackendApp.bndrun b/io.openems.backend.application/BackendApp.bndrun index 6a7a364a7b7..1c425b89882 100644 --- a/io.openems.backend.application/BackendApp.bndrun +++ b/io.openems.backend.application/BackendApp.bndrun @@ -74,7 +74,7 @@ org.apache.felix.inventory;version='[1.1.0,1.1.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ org.apache.felix.scr;version='[2.1.30,2.1.31)',\ - org.apache.felix.webconsole;version='[4.7.0,4.7.1)',\ + org.apache.felix.webconsole;version='[4.7.2,4.7.3)',\ org.apache.felix.webconsole.plugins.ds;version='[2.1.0,2.1.1)',\ org.jsr-305;version='[3.0.2,3.0.3)',\ org.ops4j.pax.logging.pax-logging-api;version='[2.0.11,2.0.12)',\ diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index f22fba46c90..9f85b07a36c 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -316,7 +316,7 @@ org.apache.felix.inventory;version='[1.1.0,1.1.1)',\ org.apache.felix.metatype;version='[1.2.4,1.2.5)',\ org.apache.felix.scr;version='[2.1.30,2.1.31)',\ - org.apache.felix.webconsole;version='[4.7.0,4.7.1)',\ + org.apache.felix.webconsole;version='[4.7.2,4.7.3)',\ org.apache.felix.webconsole.plugins.ds;version='[2.1.0,2.1.1)',\ org.eclipse.paho.mqttv5.client;version='[1.2.5,1.2.6)',\ org.jsoup;version='[1.14.3,1.14.4)',\ From edb1589961bea4e80b02bacb4a9a2544a587970e Mon Sep 17 00:00:00 2001 From: Olaf Seng Date: Tue, 21 Dec 2021 12:07:06 +0100 Subject: [PATCH 03/15] Switch to log4j2 (#1686) Co-authored-by: Olaf Seng Co-authored-by: Stefan Feilmeier --- cnf/pom.xml | 6 +++--- .../BackendApp.bndrun | 8 ++++---- .../backend/application/BackendApp.java | 19 ++++++++++++------- io.openems.edge.application/EdgeApp.bndrun | 8 ++++---- .../DefaultConfigurationWorker.java | 19 ++++++++++++------- 5 files changed, 35 insertions(+), 25 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index 13bd4a48226..e78e411d187 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -245,12 +245,12 @@ org.ops4j.pax.logging pax-logging-api - 2.0.11 + 2.0.13 org.ops4j.pax.logging - pax-logging-log4j1 - 2.0.11 + pax-logging-log4j2 + 2.0.13 org.osgi diff --git a/io.openems.backend.application/BackendApp.bndrun b/io.openems.backend.application/BackendApp.bndrun index 1c425b89882..d39ed64d0b5 100644 --- a/io.openems.backend.application/BackendApp.bndrun +++ b/io.openems.backend.application/BackendApp.bndrun @@ -18,11 +18,11 @@ -runbundles+: \ org.apache.felix.scr;startlevel=10,\ - org.ops4j.pax.logging.pax-logging-log4j1;startlevel=12 + org.ops4j.pax.logging.pax-logging-log4j2;startlevel=12 -runrequires: \ bnd.identity;id='org.ops4j.pax.logging.pax-logging-api',\ - bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j1',\ + bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j2',\ bnd.identity;id='org.osgi.service.jdbc',\ bnd.identity;id='org.apache.felix.http.jetty',\ bnd.identity;id='org.apache.felix.webconsole',\ @@ -77,8 +77,8 @@ org.apache.felix.webconsole;version='[4.7.2,4.7.3)',\ org.apache.felix.webconsole.plugins.ds;version='[2.1.0,2.1.1)',\ org.jsr-305;version='[3.0.2,3.0.3)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.0.11,2.0.12)',\ - org.ops4j.pax.logging.pax-logging-log4j1;version='[2.0.11,2.0.12)',\ + org.ops4j.pax.logging.pax-logging-api;version='[2.0.13,2.0.14)',\ + org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ org.osgi.service.jdbc;version='[1.0.1,1.0.2)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ diff --git a/io.openems.backend.application/src/io/openems/backend/application/BackendApp.java b/io.openems.backend.application/src/io/openems/backend/application/BackendApp.java index 883074233ec..66b58e5c16d 100644 --- a/io.openems.backend.application/src/io/openems/backend/application/BackendApp.java +++ b/io.openems.backend.application/src/io/openems/backend/application/BackendApp.java @@ -37,14 +37,19 @@ void activate() { try { config = cm.getConfiguration("org.ops4j.pax.logging", null); Dictionary properties = config.getProperties(); - if (properties != null && properties.isEmpty()) { + if (properties == null || properties.isEmpty() || properties.get("log4j2.rootLogger.level") == null) { Hashtable log4j = new Hashtable<>(); - log4j.put("log4j.rootLogger", "INFO, CONSOLE, osgi:*"); - log4j.put("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); - log4j.put("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); - log4j.put("log4j.appender.CONSOLE.layout.ConversionPattern", - "%d{ISO8601} [%-8.8t] %-5p [%-30.30c] %m%n"); - log4j.put("log4j.logger.org.eclipse.osgi", "WARN"); + log4j.put("log4j2.appender.console.type", "Console"); + log4j.put("log4j2.appender.console.name", "console"); + log4j.put("log4j2.appender.console.layout.type", "PatternLayout"); + log4j.put("log4j2.appender.console.layout.pattern", "%d{ISO8601} [%-8.8t] %-5p [%-30.30c] %m%n"); + + log4j.put("log4j2.appender.paxosgi.type", "PaxOsgi"); + log4j.put("log4j2.appender.paxosgi.name", "paxosgi"); + + log4j.put("log4j2.rootLogger.level", "INFO"); + log4j.put("log4j2.rootLogger.appenderRef.console.ref", "console"); + log4j.put("log4j2.rootLogger.appenderRef.paxosgi.ref", "paxosgi"); config.update(log4j); } } catch (IOException | SecurityException e) { diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index 9f85b07a36c..5e8980113cd 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -18,11 +18,11 @@ -runbundles+: \ org.apache.felix.scr;startlevel=10,\ org.eclipse.equinox.event;startlevel=11,\ - org.ops4j.pax.logging.pax-logging-log4j1;startlevel=12 + org.ops4j.pax.logging.pax-logging-log4j2;startlevel=12 -runrequires: \ bnd.identity;id='org.ops4j.pax.logging.pax-logging-api',\ - bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j1',\ + bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j2',\ bnd.identity;id='org.apache.felix.http.jetty',\ bnd.identity;id='org.apache.felix.webconsole',\ bnd.identity;id='org.apache.felix.webconsole.plugins.ds',\ @@ -323,8 +323,8 @@ org.jsr-305;version='[3.0.2,3.0.3)',\ org.openmuc.jmbus;version='[3.3.0,3.3.1)',\ org.openmuc.jrxtx;version='[1.0.1,1.0.2)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.0.11,2.0.12)',\ - org.ops4j.pax.logging.pax-logging-log4j1;version='[2.0.11,2.0.12)',\ + org.ops4j.pax.logging.pax-logging-api;version='[2.0.13,2.0.14)',\ + org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ rrd4j;version='[3.8.0,3.8.1)' \ No newline at end of file diff --git a/io.openems.edge.core/src/io/openems/edge/core/componentmanager/DefaultConfigurationWorker.java b/io.openems.edge.core/src/io/openems/edge/core/componentmanager/DefaultConfigurationWorker.java index 80eeaf737de..0fc189016f0 100644 --- a/io.openems.edge.core/src/io/openems/edge/core/componentmanager/DefaultConfigurationWorker.java +++ b/io.openems.edge.core/src/io/openems/edge/core/componentmanager/DefaultConfigurationWorker.java @@ -99,16 +99,21 @@ private boolean createDefaultConfigurations(List existingConfigs) { * Create Default Logging configuration */ if (existingConfigs.stream().noneMatch(c -> // - "org.ops4j.pax.logging".equals(c.pid))) { + "org.ops4j.pax.logging".equals(c.pid) && c.properties.get("log4j2.rootLogger.level") != null)) { // Adding Configuration manually, because this is not a OpenEMS Configuration try { Hashtable log4j = new Hashtable<>(); - log4j.put("log4j.rootLogger", "INFO, CONSOLE, osgi:*"); - log4j.put("log4j.appender.CONSOLE", "org.apache.log4j.ConsoleAppender"); - log4j.put("log4j.appender.CONSOLE.layout", "org.apache.log4j.PatternLayout"); - log4j.put("log4j.appender.CONSOLE.layout.ConversionPattern", - "%d{ISO8601} [%-8.8t] %-5p [%-30.30c] %m%n"); - log4j.put("log4j.logger.org.eclipse.osgi", "WARN"); + log4j.put("log4j2.appender.console.type", "Console"); + log4j.put("log4j2.appender.console.name", "console"); + log4j.put("log4j2.appender.console.layout.type", "PatternLayout"); + log4j.put("log4j2.appender.console.layout.pattern", "%d{ISO8601} [%-8.8t] %-5p [%-30.30c] %m%n"); + + log4j.put("log4j2.appender.paxosgi.type", "PaxOsgi"); + log4j.put("log4j2.appender.paxosgi.name", "paxosgi"); + + log4j.put("log4j2.rootLogger.level", "INFO"); + log4j.put("log4j2.rootLogger.appenderRef.console.ref", "console"); + log4j.put("log4j2.rootLogger.appenderRef.paxosgi.ref", "paxosgi"); Configuration config = this.parent.cm.getConfiguration("org.ops4j.pax.logging", null); config.update(log4j); } catch (IOException e) { From df180ef4a7fce9f593c68200505b5b1870d8b2d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 21 Dec 2021 21:10:32 +0100 Subject: [PATCH 04/15] Bump j2mod from 2.5.5 to 3.0.0 in /cnf (#1602) * Bump j2mod from 2.5.5 to 3.0.0 in /cnf Bumps [j2mod](https://github.com/steveohara/j2mod) from 2.5.5 to 3.0.0. - [Release notes](https://github.com/steveohara/j2mod/releases) - [Changelog](https://github.com/steveohara/j2mod/blob/development/RELEASE_NOTES.md) - [Commits](https://github.com/steveohara/j2mod/commits) --- updated-dependencies: - dependency-name: com.ghgande:j2mod dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] * Update bndrun Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Feilmeier --- cnf/pom.xml | 2 +- io.openems.edge.application/EdgeApp.bndrun | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index e78e411d187..f1a0b3ceb8f 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -19,7 +19,7 @@ com.ghgande j2mod - 2.5.5 + 3.0.0 com.github.rzymek diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index 5e8980113cd..ffcd526520a 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -154,8 +154,8 @@ -runbundles: \ Java-WebSocket;version='[1.5.2,1.5.3)',\ - com.fazecast.jSerialComm;version='[2.5.1,2.5.2)',\ - com.ghgande.j2mod;version='[2.5.5,2.5.6)',\ + com.fazecast.jSerialComm;version='[2.7.0,2.7.1)',\ + com.ghgande.j2mod;version='[3.0.0,3.0.1)',\ com.google.gson;version='[2.8.9,2.8.10)',\ com.google.guava;version='[31.0.1,31.0.2)',\ com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ From 433e452a4830a40fe645247b8dc89c55a2dfb2e5 Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Tue, 21 Dec 2021 22:04:29 +0100 Subject: [PATCH 05/15] Update prepare-commit script for log4j2 --- tools/prepare-commit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/prepare-commit.sh b/tools/prepare-commit.sh index 666922f1ea3..e316028ef95 100755 --- a/tools/prepare-commit.sh +++ b/tools/prepare-commit.sh @@ -118,7 +118,7 @@ done bndrun='io.openems.edge.application/EdgeApp.bndrun' head -n $(grep -n '\-runrequires:' $bndrun | grep -Eo '^[^:]+' | head -n1) "$bndrun" > "$bndrun.new" echo " bnd.identity;id='org.ops4j.pax.logging.pax-logging-api',\\" >> "$bndrun.new" -echo " bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j1',\\" >> "$bndrun.new" +echo " bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j2',\\" >> "$bndrun.new" echo " bnd.identity;id='org.apache.felix.http.jetty',\\" >> "$bndrun.new" echo " bnd.identity;id='org.apache.felix.webconsole',\\" >> "$bndrun.new" echo " bnd.identity;id='org.apache.felix.webconsole.plugins.ds',\\" >> "$bndrun.new" @@ -139,7 +139,7 @@ rm "$bndrun.new" bndrun='io.openems.backend.application/BackendApp.bndrun' head -n $(grep -n '\-runrequires:' $bndrun | grep -Eo '^[^:]+' | head -n1) "$bndrun" > "$bndrun.new" echo " bnd.identity;id='org.ops4j.pax.logging.pax-logging-api',\\" >> "$bndrun.new" -echo " bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j1',\\" >> "$bndrun.new" +echo " bnd.identity;id='org.ops4j.pax.logging.pax-logging-log4j2',\\" >> "$bndrun.new" echo " bnd.identity;id='org.osgi.service.jdbc',\\" >> "$bndrun.new" echo " bnd.identity;id='org.apache.felix.http.jetty',\\" >> "$bndrun.new" echo " bnd.identity;id='org.apache.felix.webconsole',\\" >> "$bndrun.new" From 0f43c0a7c12a629de6af3b095f4c92b7222d304c Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Wed, 22 Dec 2021 00:05:30 +0100 Subject: [PATCH 06/15] j2mod/jSerialComm: explicitely set RS485-mode This requirement was introduced lately in j2mod/jSerialComm. See https://github.com/steveohara/j2mod/pull/117 for details. --- cnf/pom.xml | 2 +- io.openems.edge.bridge.modbus/bnd.bnd | 2 +- .../io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index f1a0b3ceb8f..e5a218054a1 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -14,7 +14,7 @@ com.fazecast jSerialComm - 2.5.1 + 2.7.0 com.ghgande diff --git a/io.openems.edge.bridge.modbus/bnd.bnd b/io.openems.edge.bridge.modbus/bnd.bnd index 1e013ad3b40..ab8a2868b1b 100644 --- a/io.openems.edge.bridge.modbus/bnd.bnd +++ b/io.openems.edge.bridge.modbus/bnd.bnd @@ -5,7 +5,7 @@ Bundle-Version: 1.0.0.${tstamp} -buildpath: \ ${buildpath},\ - com.ghgande.j2mod;version=2.5.5,\ + com.ghgande.j2mod,\ io.openems.common,\ io.openems.edge.common diff --git a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java index c34b61bcdbc..9dd7a16e1fa 100644 --- a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java +++ b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java @@ -131,6 +131,7 @@ private synchronized SerialConnection getModbusConnection() throws OpenemsExcept params.setStopbits(this.stopbits.getValue()); params.setParity(this.parity.getValue()); params.setEncoding(Modbus.SERIAL_ENCODING_RTU); + params.setRs485Mode(true); params.setEcho(false); SerialConnection connection = new SerialConnection(params); this._connection = connection; From 742af2dc2a511d6992dfe139da9fc827f418cca7 Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Wed, 22 Dec 2021 13:49:18 +0100 Subject: [PATCH 07/15] Backend Odoo: apply Checkstyle, fix taking database name from configuration --- .../openems/backend/metadata/odoo/Field.java | 27 +++++++++++++++++++ .../openems/backend/metadata/odoo/MyEdge.java | 2 +- .../metadata/odoo/odoo/Credentials.java | 14 +++++++--- .../metadata/odoo/odoo/FieldValue.java | 12 ++++----- .../backend/metadata/odoo/odoo/OdooUtils.java | 2 +- .../metadata/odoo/postgres/Credentials.java | 6 +++++ .../odoo/postgres/PostgresHandler.java | 3 +++ .../postgres/task/InsertEdgeConfigUpdate.java | 1 + .../task/InsertOrUpdateDeviceStates.java | 1 + .../odoo/postgres/task/UpdateEdgeConfig.java | 1 + .../postgres/task/UpdateEdgeProducttype.java | 1 + .../postgres/task/UpdateEdgeStateActive.java | 1 + .../odoo/postgres/task/UpdateSumState.java | 3 ++- 13 files changed, 61 insertions(+), 13 deletions(-) diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java index b3fc898f9b5..cf1a4be5d8e 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/Field.java @@ -5,17 +5,38 @@ public interface Field { + /** + * Gets the Field ID. + * + * @return the ID + */ public String id(); + /** + * Gets the Field index. + * + * @return the index + */ public int index(); + /** + * Gets the Field name. + * + * @return the name + */ public String name(); + /** + * Should this Field be queried?. + * + * @return true if yes + */ public boolean isQuery(); /** * Gets all fields that should be queried as a comma separated string. * + * @param fields an array of {@link Field}s * @return the String */ public static String getSqlQueryFields(Field[] fields) { @@ -68,10 +89,12 @@ private EdgeDevice(String id, boolean query) { } } + @Override public String id() { return this.id; } + @Override public int index() { return this.queryIndex; } @@ -120,10 +143,12 @@ private EdgeDeviceStatus(String id, boolean query) { } } + @Override public String id() { return this.id; } + @Override public int index() { return this.queryIndex; } @@ -167,10 +192,12 @@ private EdgeConfigUpdate(String id, boolean query) { } } + @Override public String id() { return this.id; } + @Override public int index() { return this.queryIndex; } diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MyEdge.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MyEdge.java index 3f32bdad306..a84efdd6dd8 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MyEdge.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/MyEdge.java @@ -21,7 +21,7 @@ public int getOdooId() { } public String getApikey() { - return apikey; + return this.apikey; } } diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/Credentials.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/Credentials.java index a59b3a53489..969469cce57 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/Credentials.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/Credentials.java @@ -7,6 +7,12 @@ */ public class Credentials { + /** + * Creates {@link Credentials} from a {@link Config}uration. + * + * @param config the configuration + * @return a new {@link Credentials} object + */ public static Credentials fromConfig(Config config) { return new Credentials(// config.odooProtocol(), config.odooHost(), config.odooPort(), config.odooUid(), config.odooPassword(), @@ -32,15 +38,15 @@ public Credentials(Protocol protocol, String host, int port, int uid, String pas } public Protocol getProtocol() { - return protocol; + return this.protocol; } public String getHost() { - return host; + return this.host; } public int getPort() { - return port; + return this.port; } public int getUid() { @@ -52,7 +58,7 @@ public String getUrl() { } public String getPassword() { - return password; + return this.password; } public String getDatabase() { diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/FieldValue.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/FieldValue.java index b830f6cef03..3bddbb1804d 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/FieldValue.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/FieldValue.java @@ -15,20 +15,20 @@ public FieldValue(Field field, T value) { } public Field getField() { - return field; + return this.field; } public T getValue() { - return value; + return this.value; } @Override public String toString() { String string; - if (value instanceof JsonElement) { - string = StringUtils.toShortString((JsonElement) value, 100); - } else if (value instanceof String) { - string = StringUtils.toShortString((String) value, 100); + if (this.value instanceof JsonElement) { + string = StringUtils.toShortString((JsonElement) this.value, 100); + } else if (this.value instanceof String) { + string = StringUtils.toShortString((String) this.value, 100); } else { string = this.value.toString(); } diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooUtils.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooUtils.java index 00c2c8c38af..0507bd8449d 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooUtils.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/odoo/OdooUtils.java @@ -194,7 +194,7 @@ protected static String login(Credentials credentials, String username, String p .addProperty("jsonrpc", "2.0") // .addProperty("method", "call") // .add("params", JsonUtils.buildJsonObject() // - .addProperty("db", "v12") // + .addProperty("db", credentials.getDatabase()) // .addProperty("login", username) // .addProperty("password", password) // .build()) // diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/Credentials.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/Credentials.java index d099e9e3cf2..fbd179c493b 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/Credentials.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/Credentials.java @@ -7,6 +7,12 @@ */ public class Credentials { + /** + * Creates {@link Credentials} from a {@link Config}uration. + * + * @param config the configuration + * @return a new {@link Credentials} object + */ public static Credentials fromConfig(Config config) { return new Credentials(// config.pgHost(), config.pgPort(), config.pgUser(), config.pgPassword(), config.database()); diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/PostgresHandler.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/PostgresHandler.java index 7f566aac2d8..ed0e6e6b417 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/PostgresHandler.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/PostgresHandler.java @@ -39,6 +39,9 @@ public PostgresHandler(OdooMetadata parent, EdgeCache edgeCache, Config config, this.queueWriteWorker.start(); } + /** + * Deactivates the {@link PostgresHandler}. + */ public void deactivate() { this.initializeEdgesWorker.stop(); this.periodicWriteWorker.stop(); diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertEdgeConfigUpdate.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertEdgeConfigUpdate.java index b2ca740984d..b6988c55065 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertEdgeConfigUpdate.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertEdgeConfigUpdate.java @@ -38,6 +38,7 @@ protected void _execute(Connection connection) throws SQLException { * UPDATE {} SET openems_config = {}, openems_config_components = {} WHERE id = * {};. * + * @param connection the {@link Connection} * @return the PreparedStatement * @throws SQLException on error */ diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertOrUpdateDeviceStates.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertOrUpdateDeviceStates.java index b858d103d3c..951b5a024de 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertOrUpdateDeviceStates.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/InsertOrUpdateDeviceStates.java @@ -63,6 +63,7 @@ protected void _execute(Connection connection) throws SQLException { *

    * Be careful to synchronize access to the resulting PreparedStatement. * + * @param connection the {@link Connection} * @return the PreparedStatement * @throws SQLException on error */ diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeConfig.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeConfig.java index 1a9f457981e..5ea5e46bc34 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeConfig.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeConfig.java @@ -37,6 +37,7 @@ protected void _execute(Connection connection) throws SQLException { * UPDATE {} SET openems_config = {}, openems_config_components = {} WHERE id = * {};. * + * @param connection the {@link Connection} * @return the PreparedStatement * @throws SQLException on error */ diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeProducttype.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeProducttype.java index 16ae72b85ea..52f00285088 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeProducttype.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeProducttype.java @@ -27,6 +27,7 @@ protected void _execute(Connection connection) throws SQLException { /** * UPDATE {} SET version = {} WHERE id = {};. * + * @param connection the {@link Connection} * @return the PreparedStatement * @throws SQLException on error */ diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeStateActive.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeStateActive.java index ef5626e647e..beec53d2307 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeStateActive.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateEdgeStateActive.java @@ -24,6 +24,7 @@ protected void _execute(Connection connection) throws SQLException { /** * UPDATE {} SET state = 'active' WHERE id = {};. * + * @param connection the {@link Connection} * @return the PreparedStatement * @throws SQLException on error */ diff --git a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateSumState.java b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateSumState.java index 8b38827a36b..f2ef1487f40 100644 --- a/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateSumState.java +++ b/io.openems.backend.metadata.odoo/src/io/openems/backend/metadata/odoo/postgres/task/UpdateSumState.java @@ -22,7 +22,7 @@ protected void _execute(Connection connection) throws SQLException { PreparedStatement ps = this.psUpdateSumState(connection); final String sumStateString; if (this.sumState != null) { - sumStateString = sumState.getName().toLowerCase(); + sumStateString = this.sumState.getName().toLowerCase(); } else { sumStateString = ""; } @@ -34,6 +34,7 @@ protected void _execute(Connection connection) throws SQLException { /** * UPDATE {} SET openems_sum_state_level = {} WHERE id = {};. * + * @param connection the {@link Connection} * @return the PreparedStatement * @throws SQLException on error */ From 0abd3013ab05de4a1ba767f31381ac4284bc7ef5 Mon Sep 17 00:00:00 2001 From: Simon Fey <30720408+simonfey@users.noreply.github.com> Date: Wed, 22 Dec 2021 14:50:07 +0100 Subject: [PATCH 08/15] Implement Siemens PAC2200/3200/4200 meters (#1667) Co-authored-by: Simon Fey <30720408+simonfey@users.noreply.github.com> Co-authored-by: Stefan Feilmeier --- io.openems.edge.application/EdgeApp.bndrun | 4 +- .../element/FloatQuadruplewordElement.java | 30 ++++ io.openems.edge.meter.siemens/.classpath | 12 ++ io.openems.edge.meter.siemens/.gitignore | 2 + io.openems.edge.meter.siemens/.project | 23 +++ io.openems.edge.meter.siemens/bnd.bnd | 15 ++ io.openems.edge.meter.siemens/readme.adoc | 8 + .../io/openems/edge/meter/siemens/Config.java | 38 ++++ .../edge/meter/siemens/SiemensPacMeter.java | 25 +++ .../meter/siemens/SiemensPacMeterImpl.java | 162 ++++++++++++++++++ io.openems.edge.meter.siemens/test/.gitignore | 2 + 11 files changed, 320 insertions(+), 1 deletion(-) create mode 100644 io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/api/element/FloatQuadruplewordElement.java create mode 100644 io.openems.edge.meter.siemens/.classpath create mode 100644 io.openems.edge.meter.siemens/.gitignore create mode 100644 io.openems.edge.meter.siemens/.project create mode 100644 io.openems.edge.meter.siemens/bnd.bnd create mode 100644 io.openems.edge.meter.siemens/readme.adoc create mode 100644 io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/Config.java create mode 100644 io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeter.java create mode 100644 io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeterImpl.java create mode 100644 io.openems.edge.meter.siemens/test/.gitignore diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index ffcd526520a..3cda0c0a652 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -127,6 +127,7 @@ bnd.identity;id='io.openems.edge.meter.microcare.sdm630',\ bnd.identity;id='io.openems.edge.meter.pqplus',\ bnd.identity;id='io.openems.edge.meter.schneider.acti9.smartlink',\ + bnd.identity;id='io.openems.edge.meter.siemens',\ bnd.identity;id='io.openems.edge.meter.sma.shm20',\ bnd.identity;id='io.openems.edge.meter.socomec',\ bnd.identity;id='io.openems.edge.meter.sunspec',\ @@ -268,6 +269,7 @@ io.openems.edge.meter.microcare.sdm630;version=snapshot,\ io.openems.edge.meter.pqplus;version=snapshot,\ io.openems.edge.meter.schneider.acti9.smartlink;version=snapshot,\ + io.openems.edge.meter.siemens;version=snapshot,\ io.openems.edge.meter.sma.shm20;version=snapshot,\ io.openems.edge.meter.socomec;version=snapshot,\ io.openems.edge.meter.sunspec;version=snapshot,\ @@ -327,4 +329,4 @@ org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ - rrd4j;version='[3.8.0,3.8.1)' \ No newline at end of file + rrd4j;version='[3.8.0,3.8.1)' diff --git a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/api/element/FloatQuadruplewordElement.java b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/api/element/FloatQuadruplewordElement.java new file mode 100644 index 00000000000..7fad114bc35 --- /dev/null +++ b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/api/element/FloatQuadruplewordElement.java @@ -0,0 +1,30 @@ +package io.openems.edge.bridge.modbus.api.element; + +import io.openems.common.types.OpenemsType; + +import java.nio.ByteBuffer; + +/** + * A FloatQuadruplewordElement represents a Float value in an + * {@link AbstractQuadrupleWordElement}. + */ +public class FloatQuadruplewordElement extends AbstractQuadrupleWordElement { + + public FloatQuadruplewordElement(int address) { + super(OpenemsType.DOUBLE, address); + } + + @Override + protected FloatQuadruplewordElement self() { + return this; + } + + protected Double fromByteBuffer(ByteBuffer buff) { + return Double.valueOf(buff.getDouble()); + } + + protected ByteBuffer toByteBuffer(ByteBuffer buff, Double value) { + return buff.putDouble(value.doubleValue()); + } + +} diff --git a/io.openems.edge.meter.siemens/.classpath b/io.openems.edge.meter.siemens/.classpath new file mode 100644 index 00000000000..43d68895d03 --- /dev/null +++ b/io.openems.edge.meter.siemens/.classpath @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/io.openems.edge.meter.siemens/.gitignore b/io.openems.edge.meter.siemens/.gitignore new file mode 100644 index 00000000000..e62678f49e9 --- /dev/null +++ b/io.openems.edge.meter.siemens/.gitignore @@ -0,0 +1,2 @@ +/bin_test/ +/generated/ diff --git a/io.openems.edge.meter.siemens/.project b/io.openems.edge.meter.siemens/.project new file mode 100644 index 00000000000..9da930d2c7c --- /dev/null +++ b/io.openems.edge.meter.siemens/.project @@ -0,0 +1,23 @@ + + + io.openems.edge.meter.siemens + + + + + + org.eclipse.jdt.core.javabuilder + + + + + bndtools.core.bndbuilder + + + + + + org.eclipse.jdt.core.javanature + bndtools.core.bndnature + + diff --git a/io.openems.edge.meter.siemens/bnd.bnd b/io.openems.edge.meter.siemens/bnd.bnd new file mode 100644 index 00000000000..c1f7888d4eb --- /dev/null +++ b/io.openems.edge.meter.siemens/bnd.bnd @@ -0,0 +1,15 @@ +Bundle-Name: OpenEMS Edge Meter Siemens +Bundle-Description: This implementation covers Siemens PAC2200/3200/4200 +Bundle-Vendor: Ernst KNOLL Feinmechanik GmbH +Bundle-License: https://opensource.org/licenses/EPL-2.0 +Bundle-Version: 1.0.0.${tstamp} + +-buildpath: \ + ${buildpath},\ + io.openems.common,\ + io.openems.edge.bridge.modbus,\ + io.openems.edge.common,\ + io.openems.edge.meter.api,\ + +-testpath: \ + ${testpath} \ No newline at end of file diff --git a/io.openems.edge.meter.siemens/readme.adoc b/io.openems.edge.meter.siemens/readme.adoc new file mode 100644 index 00000000000..3e007c7a5eb --- /dev/null +++ b/io.openems.edge.meter.siemens/readme.adoc @@ -0,0 +1,8 @@ += Siemens Meters PAC2200 / 3200 / 4200 + +Implemented Natures + +- SymmetricMeter +- AsymmetricMeter + +https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.meter.siemens[Source Code icon:github[]] \ No newline at end of file diff --git a/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/Config.java b/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/Config.java new file mode 100644 index 00000000000..9b9da55218e --- /dev/null +++ b/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/Config.java @@ -0,0 +1,38 @@ +package io.openems.edge.meter.siemens; + +import org.osgi.service.metatype.annotations.AttributeDefinition; +import org.osgi.service.metatype.annotations.ObjectClassDefinition; + +import io.openems.edge.meter.api.MeterType; + +@ObjectClassDefinition(// + name = "Siemens PAC 2200/3200/4200", // + description = "Implements the Siemens PAC 2200/3200/4200 power analyser.") +@interface Config { + + @AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") + String id() default "meter0"; + + @AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID") + String alias() default ""; + + @AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?") + boolean enabled() default true; + + @AttributeDefinition(name = "Meter-Type", description = "What is measured by this Meter?") + MeterType type() default MeterType.PRODUCTION; + + @AttributeDefinition(name = "Modbus-ID", description = "ID of Modbus bridge.") + String modbus_id() default "modbus0"; + + @AttributeDefinition(name = "Modbus Unit-ID", description = "The Unit-ID of the Modbus device. Defaults to '1' for Modbus/TCP.") + int modbusUnitId() default 1; + + @AttributeDefinition(name = "Invert Power", description = "Inverts all Power values, inverts current values, swaps production and consumption energy, i.e. Power is multiplied with -1.") + boolean invert() default false; + + @AttributeDefinition(name = "Modbus target filter", description = "This is auto-generated by 'Modbus-ID'.") + String Modbus_target() default "(enabled=true)"; + + String webconsole_configurationFactory_nameHint() default "Siemens PAC 2200/3200/4200 [{id}]"; +} \ No newline at end of file diff --git a/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeter.java b/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeter.java new file mode 100644 index 00000000000..3b16dd279a7 --- /dev/null +++ b/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeter.java @@ -0,0 +1,25 @@ +package io.openems.edge.meter.siemens; + +import io.openems.edge.bridge.modbus.api.ModbusComponent; +import io.openems.edge.common.channel.Doc; +import io.openems.edge.common.component.OpenemsComponent; +import io.openems.edge.common.modbusslave.ModbusSlave; +import io.openems.edge.meter.api.AsymmetricMeter; +import io.openems.edge.meter.api.SymmetricMeter; + +public interface SiemensPacMeter + extends SymmetricMeter, AsymmetricMeter, ModbusComponent, OpenemsComponent, ModbusSlave { + + public enum ChannelId implements io.openems.edge.common.channel.ChannelId { + ; + private final Doc doc; + + private ChannelId(Doc doc) { + this.doc = doc; + } + + public Doc doc() { + return this.doc; + } + } +} diff --git a/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeterImpl.java b/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeterImpl.java new file mode 100644 index 00000000000..0244371b199 --- /dev/null +++ b/io.openems.edge.meter.siemens/src/io/openems/edge/meter/siemens/SiemensPacMeterImpl.java @@ -0,0 +1,162 @@ +package io.openems.edge.meter.siemens; + +import org.osgi.service.cm.ConfigurationAdmin; +import org.osgi.service.component.ComponentContext; +import org.osgi.service.component.annotations.Activate; +import org.osgi.service.component.annotations.Component; +import org.osgi.service.component.annotations.ConfigurationPolicy; +import org.osgi.service.component.annotations.Deactivate; +import org.osgi.service.component.annotations.Reference; +import org.osgi.service.component.annotations.ReferenceCardinality; +import org.osgi.service.component.annotations.ReferencePolicy; +import org.osgi.service.component.annotations.ReferencePolicyOption; +import org.osgi.service.metatype.annotations.Designate; + +import io.openems.common.channel.AccessMode; +import io.openems.common.exceptions.OpenemsException; +import io.openems.edge.bridge.modbus.api.AbstractOpenemsModbusComponent; +import io.openems.edge.bridge.modbus.api.BridgeModbus; +import io.openems.edge.bridge.modbus.api.ElementToChannelConverter; +import io.openems.edge.bridge.modbus.api.ModbusComponent; +import io.openems.edge.bridge.modbus.api.ModbusProtocol; +import io.openems.edge.bridge.modbus.api.element.DummyRegisterElement; +import io.openems.edge.bridge.modbus.api.element.FloatDoublewordElement; +import io.openems.edge.bridge.modbus.api.element.FloatQuadruplewordElement; +import io.openems.edge.bridge.modbus.api.task.FC3ReadRegistersTask; +import io.openems.edge.common.component.OpenemsComponent; +import io.openems.edge.common.modbusslave.ModbusSlave; +import io.openems.edge.common.modbusslave.ModbusSlaveTable; +import io.openems.edge.common.taskmanager.Priority; +import io.openems.edge.meter.api.AsymmetricMeter; +import io.openems.edge.meter.api.MeterType; +import io.openems.edge.meter.api.SymmetricMeter; + +/** + * Implements the Siemens PAC2200/3200/4200 power meter. + * + *

    + * https://cache.industry.siemens.com/dl/files/150/26504150/att_906558/v1/A5E01168664B-04_EN-US_122016_201612221316360495.pdf + */ +@Designate(ocd = Config.class, factory = true) +@Component(// + name = "Meter.Siemens", // + immediate = true, // + configurationPolicy = ConfigurationPolicy.REQUIRE // +) +public class SiemensPacMeterImpl extends AbstractOpenemsModbusComponent + implements SiemensPacMeter, SymmetricMeter, AsymmetricMeter, ModbusComponent, OpenemsComponent, ModbusSlave { + + private MeterType meterType = MeterType.PRODUCTION; + + /* + * Invert power values + */ + private boolean invert = false; + + @Reference + protected ConfigurationAdmin cm; + + public SiemensPacMeterImpl() { + super(// + OpenemsComponent.ChannelId.values(), // + ModbusComponent.ChannelId.values(), // + SymmetricMeter.ChannelId.values(), // + AsymmetricMeter.ChannelId.values(), // + SiemensPacMeter.ChannelId.values() // + ); + } + + @Reference(policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY, cardinality = ReferenceCardinality.MANDATORY) + protected void setModbus(BridgeModbus modbus) { + super.setModbus(modbus); + } + + @Activate + void activate(ComponentContext context, Config config) throws OpenemsException { + this.meterType = config.type(); + this.invert = config.invert(); + + if (super.activate(context, config.id(), config.alias(), config.enabled(), config.modbusUnitId(), this.cm, + "Modbus", config.modbus_id())) { + return; + } + } + + @Deactivate + protected void deactivate() { + super.deactivate(); + } + + @Override + public MeterType getMeterType() { + return this.meterType; + } + + @Override + protected ModbusProtocol defineModbusProtocol() throws OpenemsException { + + ModbusProtocol modbusProtocol = new ModbusProtocol(this, // + new FC3ReadRegistersTask(1, Priority.HIGH, // + m(AsymmetricMeter.ChannelId.VOLTAGE_L1, new FloatDoublewordElement(1), + ElementToChannelConverter.SCALE_FACTOR_3), + m(AsymmetricMeter.ChannelId.VOLTAGE_L2, new FloatDoublewordElement(3), + ElementToChannelConverter.SCALE_FACTOR_3), + m(AsymmetricMeter.ChannelId.VOLTAGE_L3, new FloatDoublewordElement(5), + ElementToChannelConverter.SCALE_FACTOR_3), + new DummyRegisterElement(7, 12), // + m(AsymmetricMeter.ChannelId.CURRENT_L1, new FloatDoublewordElement(13), + ElementToChannelConverter.SCALE_FACTOR_3_AND_INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.CURRENT_L2, new FloatDoublewordElement(15), + ElementToChannelConverter.SCALE_FACTOR_3_AND_INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.CURRENT_L3, new FloatDoublewordElement(17), + ElementToChannelConverter.SCALE_FACTOR_3_AND_INVERT_IF_TRUE(this.invert)), + new DummyRegisterElement(19, 24), // + m(AsymmetricMeter.ChannelId.ACTIVE_POWER_L1, new FloatDoublewordElement(25), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.ACTIVE_POWER_L2, new FloatDoublewordElement(27), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.ACTIVE_POWER_L3, new FloatDoublewordElement(29), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.REACTIVE_POWER_L1, new FloatDoublewordElement(31), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.REACTIVE_POWER_L2, new FloatDoublewordElement(33), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + m(AsymmetricMeter.ChannelId.REACTIVE_POWER_L3, new FloatDoublewordElement(35), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + new DummyRegisterElement(37, 60), // + m(SymmetricMeter.ChannelId.CURRENT, new FloatDoublewordElement(61), + ElementToChannelConverter.SCALE_FACTOR_3_AND_INVERT_IF_TRUE(this.invert)), + new DummyRegisterElement(63, 64), // + m(SymmetricMeter.ChannelId.ACTIVE_POWER, new FloatDoublewordElement(65), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)), + m(SymmetricMeter.ChannelId.REACTIVE_POWER, new FloatDoublewordElement(67), + ElementToChannelConverter.INVERT_IF_TRUE(this.invert)))); + if (this.invert) { + modbusProtocol.addTask(new FC3ReadRegistersTask(801, Priority.LOW, // + m(SymmetricMeter.ChannelId.ACTIVE_CONSUMPTION_ENERGY, new FloatQuadruplewordElement(801)), + new DummyRegisterElement(805, 808), // + m(SymmetricMeter.ChannelId.ACTIVE_PRODUCTION_ENERGY, new FloatQuadruplewordElement(809)))); + } else { + modbusProtocol.addTask(new FC3ReadRegistersTask(801, Priority.LOW, // + m(SymmetricMeter.ChannelId.ACTIVE_PRODUCTION_ENERGY, new FloatQuadruplewordElement(801)), + new DummyRegisterElement(805, 808), // + m(SymmetricMeter.ChannelId.ACTIVE_CONSUMPTION_ENERGY, new FloatQuadruplewordElement(809)))); + } + + return modbusProtocol; + } + + @Override + public String debugLog() { + return "L:" + this.getActivePower().asString(); + } + + @Override + public ModbusSlaveTable getModbusSlaveTable(AccessMode accessMode) { + return new ModbusSlaveTable(// + OpenemsComponent.getModbusSlaveNatureTable(accessMode), // + SymmetricMeter.getModbusSlaveNatureTable(accessMode), // + AsymmetricMeter.getModbusSlaveNatureTable(accessMode) // + ); + } +} diff --git a/io.openems.edge.meter.siemens/test/.gitignore b/io.openems.edge.meter.siemens/test/.gitignore new file mode 100644 index 00000000000..e62678f49e9 --- /dev/null +++ b/io.openems.edge.meter.siemens/test/.gitignore @@ -0,0 +1,2 @@ +/bin_test/ +/generated/ From bf521dfc51650ecc48dd2e3fca3aa3d911ebf8c9 Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Wed, 22 Dec 2021 20:56:15 +0100 Subject: [PATCH 09/15] Downgrade j2mod/jSerialComm (#1689) We have been trying a couple of times already to update j2mod and jSerialComm to there latest version, but it always fails, because jSerialComm somehow reconfigures the serial device and draws it unusable on our test systems. If anybody can help out, it will be much appreciated. Till then we will stay with the old version. --- cnf/pom.xml | 4 ++-- io.openems.edge.application/EdgeApp.bndrun | 6 +++--- .../openems/edge/bridge/modbus/BridgeModbusSerialImpl.java | 1 - 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index e5a218054a1..e78e411d187 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -14,12 +14,12 @@ com.fazecast jSerialComm - 2.7.0 + 2.5.1 com.ghgande j2mod - 3.0.0 + 2.5.5 com.github.rzymek diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index 3cda0c0a652..7b334c8b1b3 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -155,8 +155,8 @@ -runbundles: \ Java-WebSocket;version='[1.5.2,1.5.3)',\ - com.fazecast.jSerialComm;version='[2.7.0,2.7.1)',\ - com.ghgande.j2mod;version='[3.0.0,3.0.1)',\ + com.fazecast.jSerialComm;version='[2.5.1,2.5.2)',\ + com.ghgande.j2mod;version='[2.5.5,2.5.6)',\ com.google.gson;version='[2.8.9,2.8.10)',\ com.google.guava;version='[31.0.1,31.0.2)',\ com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\ @@ -329,4 +329,4 @@ org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ - rrd4j;version='[3.8.0,3.8.1)' + rrd4j;version='[3.8.0,3.8.1)' \ No newline at end of file diff --git a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java index 9dd7a16e1fa..c34b61bcdbc 100644 --- a/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java +++ b/io.openems.edge.bridge.modbus/src/io/openems/edge/bridge/modbus/BridgeModbusSerialImpl.java @@ -131,7 +131,6 @@ private synchronized SerialConnection getModbusConnection() throws OpenemsExcept params.setStopbits(this.stopbits.getValue()); params.setParity(this.parity.getValue()); params.setEncoding(Modbus.SERIAL_ENCODING_RTU); - params.setRs485Mode(true); params.setEcho(false); SerialConnection connection = new SerialConnection(params); this._connection = connection; From 1fd48592918ae55e8acb1bb299b11da6ed076867 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 29 Dec 2021 20:57:42 +0100 Subject: [PATCH 10/15] Bump rrd4j from 3.8 to 3.8.1 in /cnf (#1690) * Bump rrd4j from 3.8 to 3.8.1 in /cnf Bumps [rrd4j](https://github.com/rrd4j/rrd4j) from 3.8 to 3.8.1. - [Release notes](https://github.com/rrd4j/rrd4j/releases) - [Changelog](https://github.com/rrd4j/rrd4j/blob/master/changelog.txt) - [Commits](https://github.com/rrd4j/rrd4j/compare/3.8...3.8.1) --- updated-dependencies: - dependency-name: org.rrd4j:rrd4j dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] * Update bndrun file Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Stefan Feilmeier --- cnf/pom.xml | 2 +- io.openems.edge.application/EdgeApp.bndrun | 2 +- ui/package-lock.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index e78e411d187..fdb9c368428 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -277,7 +277,7 @@ org.rrd4j rrd4j - 3.8 + 3.8.1 org.slf4j diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index 7b334c8b1b3..6edb5ea1ebc 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -329,4 +329,4 @@ org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ - rrd4j;version='[3.8.0,3.8.1)' \ No newline at end of file + rrd4j;version='[3.8.1,3.8.2)' \ No newline at end of file diff --git a/ui/package-lock.json b/ui/package-lock.json index 75bb2cc7fcb..a437171968d 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -6,7 +6,7 @@ "packages": { "": { "name": "openems-ui", - "version": "2021.22.0-SNAPSHOT", + "version": "2021.23.0-SNAPSHOT", "license": "AGPL-3.0", "dependencies": { "@angular/animations": "~12.1.4", From 68787754279851b1f4808302f6924e78c1bdc3aa Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Sat, 1 Jan 2022 12:14:16 +0100 Subject: [PATCH 11/15] Drop R&D page from docs It was moved to https://openems.io/research/ long ago. If you use OpenEMS for a research project, please give us a note and we will link you there. --- doc/modules/ROOT/nav.adoc | 1 - doc/modules/ROOT/pages/randd.adoc | 70 --------------------- doc/modules/ROOT/pages/single_document.adoc | 1 - 3 files changed, 72 deletions(-) delete mode 100644 doc/modules/ROOT/pages/randd.adoc diff --git a/doc/modules/ROOT/nav.adoc b/doc/modules/ROOT/nav.adoc index 716182cd748..0e598317cee 100644 --- a/doc/modules/ROOT/nav.adoc +++ b/doc/modules/ROOT/nav.adoc @@ -26,5 +26,4 @@ ** xref:simulation/realtime.adoc[Real-Time Simulation] ** xref:simulation/ui-history.adoc[UI History Simulation] * xref:documentation.adoc[Documentation] -* xref:randd.adoc[Research and Development] * https://openems.github.io/openems.io/javadoc/[Javadoc] diff --git a/doc/modules/ROOT/pages/randd.adoc b/doc/modules/ROOT/pages/randd.adoc deleted file mode 100644 index c87487274a9..00000000000 --- a/doc/modules/ROOT/pages/randd.adoc +++ /dev/null @@ -1,70 +0,0 @@ -= Research and Development -:imagesdir: ../assets/images -:toc: -:sectnumlevels: 0 -:toclevels: 1 - -== EASY-RES - -=== Enable Ancillary Services by Renewable Energy Sources - -image::ezrs.png[EASY-RES] - -Im Rahmen des EASY-RES-Projekts soll erforscht werden, wie die Versorgungssicherheit mit elektrischer Energie erhalten werden kann, während sich die Energieerzeugung von konventionellen Kraftwerken hin zu 100 % erneuerbaren Energien wendet. Dieser Wandel wird auch große Auswirkungen auf die Umwelt haben und zur Lösung der globalen Herausforderungen im Bereich Klima und Energie beitragen. - -Am EASY-RES-Projekt beteiligen sich ausgewählte Partner aus sechs EU-Ländern. Zum Konsortium zählen neben FENECON fünf Universitäten (https://www.uni-passau.de/[Passau icon:external-link[]] -, https://www.auth.gr/en[Thessaloniki icon:external-link[]], http://www.us.es/eng[Sevilla icon:external-link[]], https://www.tudelft.nl/[Delft icon:external-link[]] und https://www.lancaster.ac.uk/[Lancaster icon:external-link[]]), drei Energieversorger (https://www.swlandau.de/[Stadtwerke Landau a. d. Isar icon:external-link[]], http://www.stadtwerkhassfurt.de/[Stadtwerk Haßfurt icon:external-link[]] und https://www.elektro-gorenjska.si/[Elektro Gorenjska icon:external-link[]] aus der Slowakei), der http://www.admie.gr/nc/en/home/[Netzbetreiber ADMIE icon:external-link[]] aus Griechenland und das https://zentrum-digitalisierung.bayern/[Zentrum Digitalisierung.Bayern icon:external-link[]]. - -FENECON wird technisches Fachwissen über das Batterieverhalten unter stationären und transienten Bedingungen sowie zu den Regelungsalgorithmen beitragen. Darüber hinaus werden wir uns an der Entwicklung von neuen Systemdienstleistungen durch Speichersysteme beteiligen und die erforderlichen Speichergeräte in den Labortests bereitstellen. Als Basis für das Energiemanagement dient das von FENECON initiierte Open Source Energiemanagement https://openems.io[OpenEMS icon:external-link[]], das im Rahmen des Projektes weiterentwickelt wird. - -NOTE: Mehr Informationen: http://www.easyres-project.eu/ - -== EMSIG - -=== Energiemanagementsystem für integrierte Geschäftsmodelle - -image::emsig.png[EMSIG] - -Verteilte Stromspeichersysteme können einen großen Beitrag zur Energiewende leisten. Die derzeit verwendeten Betriebsweisen bieten aber meist nur naive Strategien, die ausschließlich die momentane Situation hinter dem Stromzähler berücksichtigen. - -Ziel des Projektes ist es, durch integrierte Geschäftsmodelle das große Potential von Speichern sowohl für den Endnutzer als auch den Verteilnetzbetreiber (VNB) zu erschließen. Dazu werden innovative Be- und Entladealgorithmen entwickelt, die die Eigennnutzung von Solarenergie und die Steuerung variabler Lasten optimieren. - -Durch "Pooling" der verteilten Speicherflexibilität wird außerdem die Teilnahme am Energiemarkt ermöglicht. Zudem wird eine Open-Data-Plattform für anonymisierte Energiedaten erstellt, um diese für Forschungszwecke öffentlich zugänglich zu machen. Basis des Projektes ist das Open-Source Energiemanagementsystem https://openems.io[OpenEMS icon:external-link[]], das im Rahmen des Projektes weiterentwickelt wird. - - -== BloGPV - -=== Blockchainbasierter, verteiter Großspeicher für PV-Anlagenbetreiber - -image::blogpv.png[BlogPV] - -BloGPV hat sich zum Ziel gesetzt einen wirtschaftlichen Betrieb von Photovoltaikanlagen in einer Post-EEG Situation zu ermöglichen. Als Teil der Smart Service Welt II sollen viele dezentrale Batteriespeicher durch die Blockchain-Technologie zu einem virtuellen Großspeicher vereint werden. - -Ein dezentrales Speichermanagement mit der Anbindung von Mehrwertdiensten sowie der Schaffung geeigneter Bilanzierungs- und Abrechnungsmodelle soll ein einen wirtschaftlichen Betrieb der PV-Anlagen ohne Einspeisevergütung zu ermöglichen und somit einen wesentlichen Beitrag zur Energiewende leisten. - -Fenecon arbeitet hierzu mit den Projektpartnern https://www.dfki.de/web/[Deutsches Forschungszentrum für künstliche Intelligenz icon:external-link[]], https://discovergy.com/[Discovergy icon:external-link[]], https://www.enercity.de/privatkunden/index.html[enercity icon:external-link[]] und der https://www.tu-berlin.de/menue/home/[TU Berlin icon:external-link[]] zusammen. - -NOTE: Mehr Informationen: https://blogpv.net/ - - -== MEMAP - -=== Multi-Energie Management und Aggregations-Plattform - -image::BMWi_Fz_2017_Office_Farbe_de.png[MEMAP] - -Das Kernziel des MEMAP-Projekts ist die Entwicklung und Erprobung einer offenen Aggregationsplattform. Die Plattform soll mehrere Gebäude bzw. deren lokale EMS zusammenschließen, um Synergieeffekte der verschiedenen Bedarfs- und Produktionsprofile auszunutzen. Benutzer sollen mit Hilfe von intuitiven Benutzeroberflächen in diesen Prozess eingebunden werden. Ein Simulationsframework zum Testen der Plattform soll erweitert werden, um den komplexen Planungsprozess zu unterstützen. Das MEMAP Projekt setzt dabei auf den Einsatz des etablierten Building Information Model (BIM) Standards. - -Am https://memap-projekt.de[MEMAP Projekt icon:external-link[]] sind neben der FENECON die Firmen https://holsten.io/[Holsten Systems GmbH icon:external-link[]], https://www.sauter-cumulus.de/[Sauter-Cumulus GmbH icon:external-link[]] , https://www.ibdm.de/[IBDM GmbH icon:external-link[]] sowie die Forschungseinrichtungen https://www.mse.tum.de/en/tumenergy-research-projects/[TUM MSE Energy Efficient and Smart Cities icon:external-link[]] und das https://zentrum-digitalisierung.bayern/[Zentrum Digitalisierung.Bayern icon:external-link[]] beteiligt. - -FENECON bringt Erfahrungen im Bereich Projektentwicklung und –realisierung sowie Virtuelle Kraftwerke ein. FENECON beteiligt sich bei der Erarbeitung der Anforderung, Entwicklung und Bewertung von Geschäftsmodellen, der Systemanalyse und der Entwicklung der Softwareplattform. - - - - - - - - - -NOTE: Mehr Informationen: http://memap.fortiss.org \ No newline at end of file diff --git a/doc/modules/ROOT/pages/single_document.adoc b/doc/modules/ROOT/pages/single_document.adoc index bf970936f33..6b6580a44f1 100644 --- a/doc/modules/ROOT/pages/single_document.adoc +++ b/doc/modules/ROOT/pages/single_document.adoc @@ -43,4 +43,3 @@ include::component-communication/index.adoc[leveloffset=+1] include::simulation/realtime.adoc[leveloffset=+1] include::simulation/ui-history.adoc[leveloffset=+1] include::documentation.adoc[leveloffset=+1] -include::randd.adoc[leveloffset=+1] From 031449b69d4a407ecabcf91f75332b62227a9f4d Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Sat, 1 Jan 2022 12:52:20 +0100 Subject: [PATCH 12/15] Update log4j2 to 2.0.14 --- cnf/pom.xml | 4 ++-- io.openems.backend.application/BackendApp.bndrun | 4 ++-- io.openems.edge.application/EdgeApp.bndrun | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cnf/pom.xml b/cnf/pom.xml index fdb9c368428..060e614ff4d 100644 --- a/cnf/pom.xml +++ b/cnf/pom.xml @@ -245,12 +245,12 @@ org.ops4j.pax.logging pax-logging-api - 2.0.13 + 2.0.14 org.ops4j.pax.logging pax-logging-log4j2 - 2.0.13 + 2.0.14 org.osgi diff --git a/io.openems.backend.application/BackendApp.bndrun b/io.openems.backend.application/BackendApp.bndrun index d39ed64d0b5..473983e4d22 100644 --- a/io.openems.backend.application/BackendApp.bndrun +++ b/io.openems.backend.application/BackendApp.bndrun @@ -77,8 +77,8 @@ org.apache.felix.webconsole;version='[4.7.2,4.7.3)',\ org.apache.felix.webconsole.plugins.ds;version='[2.1.0,2.1.1)',\ org.jsr-305;version='[3.0.2,3.0.3)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.0.13,2.0.14)',\ - org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ + org.ops4j.pax.logging.pax-logging-api;version='[2.0.14,2.0.15)',\ + org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.14,2.0.15)',\ org.osgi.service.jdbc;version='[1.0.1,1.0.2)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ diff --git a/io.openems.edge.application/EdgeApp.bndrun b/io.openems.edge.application/EdgeApp.bndrun index 6edb5ea1ebc..1bdc026cb50 100644 --- a/io.openems.edge.application/EdgeApp.bndrun +++ b/io.openems.edge.application/EdgeApp.bndrun @@ -325,8 +325,8 @@ org.jsr-305;version='[3.0.2,3.0.3)',\ org.openmuc.jmbus;version='[3.3.0,3.3.1)',\ org.openmuc.jrxtx;version='[1.0.1,1.0.2)',\ - org.ops4j.pax.logging.pax-logging-api;version='[2.0.13,2.0.14)',\ - org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.13,2.0.14)',\ + org.ops4j.pax.logging.pax-logging-api;version='[2.0.14,2.0.15)',\ + org.ops4j.pax.logging.pax-logging-log4j2;version='[2.0.14,2.0.15)',\ org.osgi.util.function;version='[1.2.0,1.2.1)',\ org.osgi.util.promise;version='[1.2.0,1.2.1)',\ rrd4j;version='[3.8.1,3.8.2)' \ No newline at end of file From 4deba812517e9db885d6975a94a64228830111d2 Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Sat, 1 Jan 2022 12:57:45 +0100 Subject: [PATCH 13/15] Update gradle to 7.3.3 --- .gradle-wrapper/gradle-wrapper.properties | 2 +- gradlew | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.gradle-wrapper/gradle-wrapper.properties b/.gradle-wrapper/gradle-wrapper.properties index e750102e092..2e6e5897b52 100644 --- a/.gradle-wrapper/gradle-wrapper.properties +++ b/.gradle-wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.3.3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradlew b/gradlew index 7e705d510c1..cce08e53268 100755 --- a/gradlew +++ b/gradlew @@ -1,7 +1,7 @@ #!/bin/sh # -# Copyright © 2015-2021 the original authors. +# Copyright © 2015-2021 the original authors. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,10 +32,10 @@ # Busybox and similar reduced shells will NOT work, because this script # requires all of these POSIX shell features: # * functions; -# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», -# «${var#prefix}», «${var%suffix}», and «$( cmd )»; -# * compound commands having a testable exit status, especially «case»; -# * various built-in commands including «command», «set», and «ulimit». +# * expansions «$var», «${var}», «${var:-default}», «${var+SET}», +# «${var#prefix}», «${var%suffix}», and «$( cmd )»; +# * compound commands having a testable exit status, especially «case»; +# * various built-in commands including «command», «set», and «ulimit». # # Important for patching: # From fbce09e371275f993ff24ccd219da246bdea30f5 Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Sat, 1 Jan 2022 13:00:19 +0100 Subject: [PATCH 14/15] Update docs for new, monthly release cycle --- doc/modules/ROOT/pages/introduction.adoc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/modules/ROOT/pages/introduction.adoc b/doc/modules/ROOT/pages/introduction.adoc index af3f0da9856..892fda0c78a 100644 --- a/doc/modules/ROOT/pages/introduction.adoc +++ b/doc/modules/ROOT/pages/introduction.adoc @@ -48,10 +48,9 @@ image::system-architecture.png[OpenEMS system architecture] == Development guidelines -Development follows the https://de.wikipedia.org/wiki/Agile_Softwareentwicklung[Agile Manifesto icon:external-link[]] and is driven by the https://de.wikipedia.org/wiki/Scrum[Scrum icon:external-link[]] methodology. The source code is available online at https://openems.io[openems.io] and on https://github.com/OpenEMS/openems[GitHub icon:github[]]. -New versions are released after every Scrum Sprint and https://github.com/OpenEMS/openems/releases[tagged icon:github[]] accordingly. -Version numbers are built using the pattern `year.number of sprint`, e.g. version `2020.14.0` is the result of the 14th sprint in 2020. +New versions are released every month and https://github.com/OpenEMS/openems/releases[tagged icon:github[]] accordingly. +Version numbers are built using the pattern `year.month.0`, e.g. version `2022.1.0` is the release of January 2022. The patch version is always `0` and reserved for private distributions. Git development follows the https://www.atlassian.com/git/tutorials/comparing-workflows/gitflow-workflow[Gitflow Workflow], so the https://github.com/OpenEMS/openems/tree/master/[master branch icon:github[]] always holds the stable release, while active development is happening on the https://github.com/OpenEMS/openems/tree/develop[develop branch icon:github[]] or in separate feature branches. For Edge and Backend Java development we recommend the https://www.eclipse.org/ide/[Eclipse IDE icon:external-link[]]. From 95fa343b2197adf773ab957f7bfcdf47c74a141d Mon Sep 17 00:00:00 2001 From: Stefan Feilmeier Date: Sat, 1 Jan 2022 13:01:48 +0100 Subject: [PATCH 15/15] Push version to 2022.1.0 --- doc/modules/ROOT/pages/introduction.adoc | 4 ++-- doc/modules/ROOT/pages/single_document.adoc | 4 ++-- .../src/io/openems/common/OpenemsConstants.java | 6 +++--- ui/package-lock.json | 4 ++-- ui/package.json | 2 +- ui/src/app/user/user.component.html | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/doc/modules/ROOT/pages/introduction.adoc b/doc/modules/ROOT/pages/introduction.adoc index 892fda0c78a..2aee45af269 100644 --- a/doc/modules/ROOT/pages/introduction.adoc +++ b/doc/modules/ROOT/pages/introduction.adoc @@ -73,14 +73,14 @@ OpenEMS is funded by several federal and EU funding projects. If you are a devel * OpenEMS Edge * OpenEMS Backend -Copyright (C) 2016-2021 OpenEMS Association e.V., FENECON GmbH. +Copyright (C) 2016-2022 OpenEMS Association e.V., FENECON GmbH. This product includes software developed at FENECON GmbH: you can redistribute it and/or modify it under the terms of the https://github.com/OpenEMS/openems/blob/develop/LICENSE-EPL-2.0[Eclipse Public License version 2.0]. * OpenEMS UI -Copyright (C) 2016-2021 OpenEMS Association e.V., FENECON GmbH. +Copyright (C) 2016-2022 OpenEMS Association e.V., FENECON GmbH. This product includes software developed at FENECON GmbH: you can redistribute it and/or modify it under the terms of the https://github.com/OpenEMS/openems/blob/develop/LICENSE-AGPL-3.0[GNU Affero General Public License version 3]. \ No newline at end of file diff --git a/doc/modules/ROOT/pages/single_document.adoc b/doc/modules/ROOT/pages/single_document.adoc index 6b6580a44f1..207ca3e6208 100644 --- a/doc/modules/ROOT/pages/single_document.adoc +++ b/doc/modules/ROOT/pages/single_document.adoc @@ -1,7 +1,7 @@ = OpenEMS - Open Energy Management System ifndef::toc[] -(c) 2020 OpenEMS Association e.V. -Version 2021.23.0-SNAPSHOT +(c) 2022 OpenEMS Association e.V. +Version 2022.1.0-SNAPSHOT :sectnums: :sectnumlevels: 4 :toc: diff --git a/io.openems.common/src/io/openems/common/OpenemsConstants.java b/io.openems.common/src/io/openems/common/OpenemsConstants.java index 85ac2dba10d..37f252b6291 100644 --- a/io.openems.common/src/io/openems/common/OpenemsConstants.java +++ b/io.openems.common/src/io/openems/common/OpenemsConstants.java @@ -13,14 +13,14 @@ public class OpenemsConstants { * * This is usually the year of the release */ - public final static short VERSION_MAJOR = 2021; + public final static short VERSION_MAJOR = 2022; /** * The minor version of OpenEMS. * * This is usually the number of the sprint within the year */ - public final static short VERSION_MINOR = 23; + public final static short VERSION_MINOR = 1; /** * The patch version of OpenEMS. @@ -38,7 +38,7 @@ public class OpenemsConstants { * The complete version as a SemanticVersion. * *

    - * Use toString()-method to get something like "2019.6.0-SNAPSHOT" + * Use toString()-method to get something like "2022.1.0-SNAPSHOT" */ public final static SemanticVersion VERSION = new SemanticVersion(VERSION_MAJOR, VERSION_MINOR, VERSION_PATCH, VERSION_STRING); diff --git a/ui/package-lock.json b/ui/package-lock.json index a437171968d..b25e66dc94a 100644 --- a/ui/package-lock.json +++ b/ui/package-lock.json @@ -1,12 +1,12 @@ { "name": "openems-ui", - "version": "2021.23.0-SNAPSHOT", + "version": "2022.1.0-SNAPSHOT", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "openems-ui", - "version": "2021.23.0-SNAPSHOT", + "version": "2022.1.0-SNAPSHOT", "license": "AGPL-3.0", "dependencies": { "@angular/animations": "~12.1.4", diff --git a/ui/package.json b/ui/package.json index d8e137850e5..52ae16df795 100644 --- a/ui/package.json +++ b/ui/package.json @@ -1,6 +1,6 @@ { "name": "openems-ui", - "version": "2021.23.0-SNAPSHOT", + "version": "2022.1.0-SNAPSHOT", "license": "AGPL-3.0", "private": true, "dependencies": { diff --git a/ui/src/app/user/user.component.html b/ui/src/app/user/user.component.html index 84a86f43272..1b576a3cfbf 100644 --- a/ui/src/app/user/user.component.html +++ b/ui/src/app/user/user.component.html @@ -96,7 +96,7 @@

  • - About.build: 2021.23.0-SNAPSHOT + About.build: 2022.1.0-SNAPSHOT