Skip to content

Commit

Permalink
Merge branch 'release/2021.11.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Jun 17, 2021
2 parents f4b3ae8 + 3266941 commit 852257f
Show file tree
Hide file tree
Showing 113 changed files with 15,058 additions and 16,387 deletions.
14 changes: 14 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: 2
updates:
- package-ecosystem: maven
directory: "/cnf"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: develop
- package-ecosystem: npm
directory: "/ui"
schedule:
interval: weekly
open-pull-requests-limit: 10
target-branch: develop
2 changes: 1 addition & 1 deletion .gradle-wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-7.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
12 changes: 6 additions & 6 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@
<!-- Changelog: https://github.com/apache/felix-dev/blob/master/inventory/changelog.txt -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.inventory</artifactId>
<version>1.0.6</version>
<version>1.1.0</version>
</dependency>
<dependency>
<!-- Apache Felix HTTP Service -->
<!-- Changelog: https://github.com/apache/felix-dev/commits/master/http -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.http.jetty</artifactId>
<version>4.1.6</version>
<version>4.1.10</version>
</dependency>
<dependency>
<!-- Apache Felix Metatype Service -->
Expand All @@ -161,7 +161,7 @@
<!-- Changelog: https://github.com/apache/felix-dev/blob/master/webconsole/changelog.txt -->
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.webconsole</artifactId>
<version>4.6.0</version>
<version>4.6.2</version>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
Expand All @@ -181,7 +181,7 @@
<dependency>
<groupId>org.dhatim</groupId>
<artifactId>fastexcel</artifactId>
<version>0.12.9</version>
<version>0.12.11</version>
</dependency>
<dependency>
<!-- Eclipse Paho MQTTv5 Client -->
Expand All @@ -207,7 +207,7 @@
<dependency>
<groupId>org.msgpack</groupId>
<artifactId>msgpack-core</artifactId>
<version>0.8.22</version>
<version>0.9.0</version>
</dependency>
<dependency>
<groupId>org.openmuc</groupId>
Expand Down Expand Up @@ -243,7 +243,7 @@
<!-- Used by io.openems.backend.metadata.odoo -->
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.20</version>
<version>42.2.21</version>
</dependency>
<dependency>
<!-- Used by io.openems.edge.timedata.rrd4j -->
Expand Down
2 changes: 1 addition & 1 deletion doc/modules/ROOT/pages/single_document.adoc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
= OpenEMS - Open Energy Management System
ifndef::toc[]
(c) 2020 OpenEMS Association e.V.
Version 2021.10.0
Version 2021.11.0
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down
8 changes: 4 additions & 4 deletions io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@
org.apache.commons.commons-fileupload;version='[1.4.0,1.4.1)',\
org.apache.commons.commons-io;version='[2.8.0,2.8.1)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.http.jetty;version='[4.1.10,4.1.11)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.felix.inventory;version='[1.0.6,1.0.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.20,2.1.21)',\
org.apache.felix.webconsole;version='[4.6.0,4.6.1)',\
org.apache.felix.webconsole;version='[4.6.2,4.6.3)',\
org.apache.felix.webconsole.plugins.ds;version='[2.1.0,2.1.1)',\
org.apache.servicemix.bundles.ws-commons-util;version='[1.0.2,1.0.3)',\
org.apache.servicemix.bundles.xmlrpc-client;version='[3.1.3,3.1.4)',\
Expand All @@ -78,4 +78,4 @@
org.osgi.service.jdbc;version='[1.0.0,1.0.1)',\
org.osgi.util.function;version='[1.1.0,1.1.1)',\
org.osgi.util.promise;version='[1.1.1,1.1.2)',\
org.postgresql.jdbc;version='[42.2.20,42.2.21)'
org.postgresql.jdbc;version='[42.2.21,42.2.22)'
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class OpenemsConstants {
*
* This is usually the number of the sprint within the year
*/
public final static short VERSION_MINOR = 10;
public final static short VERSION_MINOR = 11;

/**
* The patch version of OpenEMS.
Expand Down
14 changes: 11 additions & 3 deletions io.openems.common/src/io/openems/common/utils/JsonUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -578,10 +578,18 @@ public static String[] getAsStringArray(JsonArray json) throws OpenemsNamedExcep
*/
public static boolean getAsBoolean(JsonElement jElement) throws OpenemsNamedException {
JsonPrimitive jPrimitive = getAsPrimitive(jElement);
if (!jPrimitive.isBoolean()) {
throw OpenemsError.JSON_NO_BOOLEAN.exception(jPrimitive.toString().replaceAll("%", "%%"));
if (jPrimitive.isBoolean()) {
return jPrimitive.getAsBoolean();
}
if (jPrimitive.isString()) {
String element = jPrimitive.getAsString();
if (element.equalsIgnoreCase("false")) {
return false;
} else if (element.equalsIgnoreCase("true")) {
return true;
}
}
return jPrimitive.getAsBoolean();
throw OpenemsError.JSON_NO_BOOLEAN.exception(jPrimitive.toString().replaceAll("%", "%%"));
}

/**
Expand Down
16 changes: 16 additions & 0 deletions io.openems.common/test/io/openems/common/utils/JsonUtilsTest.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.openems.common.utils;

import static org.junit.Assert.assertEquals;
import static org.junit.Assert.fail;

import java.util.Optional;

Expand All @@ -9,6 +10,8 @@
import com.google.gson.JsonNull;
import com.google.gson.JsonPrimitive;

import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;

public class JsonUtilsTest {

@Test
Expand Down Expand Up @@ -39,4 +42,17 @@ public void testGetAsJsonElement() {

}

@Test
public void testGetAsBoolean() throws OpenemsNamedException {
assertEquals(true, JsonUtils.getAsBoolean(new JsonPrimitive(true)));
assertEquals(false, JsonUtils.getAsBoolean(new JsonPrimitive(false)));
assertEquals(true, JsonUtils.getAsBoolean(new JsonPrimitive("TrUe")));
assertEquals(false, JsonUtils.getAsBoolean(new JsonPrimitive("fAlSe")));
try {
JsonUtils.getAsBoolean(new JsonPrimitive("foo.bar"));
fail();
} catch (OpenemsNamedException e) {
}
}

}
12 changes: 5 additions & 7 deletions io.openems.edge.application/EdgeApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
bnd.identity;id='io.openems.edge.controller.ess.delaycharge',\
bnd.identity;id='io.openems.edge.controller.ess.delayedselltogrid',\
bnd.identity;id='io.openems.edge.controller.ess.fixactivepower',\
bnd.identity;id='io.openems.edge.controller.ess.gridoptimizedcharge',\
bnd.identity;id='io.openems.edge.controller.ess.hybrid.surplusfeedtogrid',\
bnd.identity;id='io.openems.edge.controller.ess.limittotaldischarge',\
bnd.identity;id='io.openems.edge.controller.ess.linearpowerband',\
Expand Down Expand Up @@ -94,10 +95,8 @@
bnd.identity;id='io.openems.edge.ess.generic',\
bnd.identity;id='io.openems.edge.ess.kaco.blueplanet.gridsave50',\
bnd.identity;id='io.openems.edge.ess.mr.gridcon',\
bnd.identity;id='io.openems.edge.ess.refu',\
bnd.identity;id='io.openems.edge.ess.sinexcel',\
bnd.identity;id='io.openems.edge.ess.sma',\
bnd.identity;id='io.openems.edge.ess.streetscooter',\
bnd.identity;id='io.openems.edge.evcs.cluster',\
bnd.identity;id='io.openems.edge.evcs.core',\
bnd.identity;id='io.openems.edge.evcs.hardybarth',\
Expand Down Expand Up @@ -189,6 +188,7 @@
io.openems.edge.controller.ess.delaycharge;version=snapshot,\
io.openems.edge.controller.ess.delayedselltogrid;version=snapshot,\
io.openems.edge.controller.ess.fixactivepower;version=snapshot,\
io.openems.edge.controller.ess.gridoptimizedcharge;version=snapshot,\
io.openems.edge.controller.ess.hybrid.surplusfeedtogrid;version=snapshot,\
io.openems.edge.controller.ess.limittotaldischarge;version=snapshot,\
io.openems.edge.controller.ess.linearpowerband;version=snapshot,\
Expand Down Expand Up @@ -225,10 +225,8 @@
io.openems.edge.ess.generic;version=snapshot,\
io.openems.edge.ess.kaco.blueplanet.gridsave50;version=snapshot,\
io.openems.edge.ess.mr.gridcon;version=snapshot,\
io.openems.edge.ess.refu;version=snapshot,\
io.openems.edge.ess.sinexcel;version=snapshot,\
io.openems.edge.ess.sma;version=snapshot,\
io.openems.edge.ess.streetscooter;version=snapshot,\
io.openems.edge.evcs.api;version=snapshot,\
io.openems.edge.evcs.cluster;version=snapshot,\
io.openems.edge.evcs.core;version=snapshot,\
Expand Down Expand Up @@ -295,12 +293,12 @@
org.apache.commons.math3;version='[3.6.1,3.6.2)',\
org.apache.felix.configadmin;version='[1.9.20,1.9.21)',\
org.apache.felix.eventadmin;version='[1.6.2,1.6.3)',\
org.apache.felix.http.jetty;version='[4.1.6,4.1.7)',\
org.apache.felix.http.jetty;version='[4.1.10,4.1.11)',\
org.apache.felix.http.servlet-api;version='[1.1.2,1.1.3)',\
org.apache.felix.inventory;version='[1.0.6,1.0.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.20,2.1.21)',\
org.apache.felix.webconsole;version='[4.6.0,4.6.1)',\
org.apache.felix.webconsole;version='[4.6.2,4.6.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.jsr-305;version='[3.0.2,3.0.3)',\
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ public Doc doc() {
}
}

/**
* Gets the DC-PV Power, i.e. the sum of the {@link EssDcCharger}s of this
* {@link HybridManagedSymmetricBatteryInverter}.
*
* @return the DC-PV power, or 'null' if there is no {@link EssDcCharger}
*/
public Integer getDcPvPower();

/**
* Gets the Surplus Power of the {@link EssDcCharger}s of this
* {@link HybridManagedSymmetricBatteryInverter}.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import io.openems.edge.common.channel.Doc;
import io.openems.edge.common.channel.StateChannel;
import io.openems.edge.common.channel.internal.AbstractDoc;
import io.openems.edge.common.type.TypeUtils;

/**
* This is the default implementation of the {@link OpenemsComponent} interface.
Expand Down Expand Up @@ -307,7 +308,7 @@ public Doc doc() {
}

// Set the Value
Object value = properties.get(property.getId());
Object value = TypeUtils.getAsType(property.getType(), properties.get(property.getId()));
if (value == null) {
try {
value = JsonUtils.getAsType(property.getType(), property.getDefaultValue());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -617,8 +617,8 @@ public static ModbusSlaveNatureTable getModbusSlaveNatureTable(AccessMode access
.channel(69, ChannelId.PRODUCTION_AC_ACTIVE_ENERGY, ModbusType.FLOAT64) //
.channel(73, ChannelId.PRODUCTION_DC_ACTIVE_ENERGY, ModbusType.FLOAT64) //
.channel(77, ChannelId.CONSUMPTION_ACTIVE_ENERGY, ModbusType.FLOAT64) //
.float64Reserved(81) //
.float64Reserved(85) //
.channel(81, ChannelId.ESS_DC_CHARGE_ENERGY, ModbusType.FLOAT64) //
.channel(85, ChannelId.ESS_DC_DISCHARGE_ENERGY, ModbusType.FLOAT64) //
.channel(89, ChannelId.ESS_ACTIVE_POWER_L1, ModbusType.FLOAT32) //
.channel(91, ChannelId.ESS_ACTIVE_POWER_L2, ModbusType.FLOAT32) //
.channel(93, ChannelId.ESS_ACTIVE_POWER_L3, ModbusType.FLOAT32) //
Expand All @@ -631,6 +631,7 @@ public static ModbusSlaveNatureTable getModbusSlaveNatureTable(AccessMode access
.channel(107, ChannelId.CONSUMPTION_ACTIVE_POWER_L1, ModbusType.FLOAT32) //
.channel(109, ChannelId.CONSUMPTION_ACTIVE_POWER_L2, ModbusType.FLOAT32) //
.channel(111, ChannelId.CONSUMPTION_ACTIVE_POWER_L3, ModbusType.FLOAT32) //
.channel(113, ChannelId.ESS_DISCHARGE_POWER, ModbusType.FLOAT32) //
.build();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public static <T> T getAsType(OpenemsType type, Object value) throws IllegalArgu

} else if (value instanceof String) {
String stringValue = (String) value;
if (stringValue.equalsIgnoreCase("false")) {
if (stringValue.isEmpty()) {
return null;
} else if (stringValue.equalsIgnoreCase("false")) {
return (T) Boolean.FALSE;
} else if (stringValue.equalsIgnoreCase("true")) {
return (T) Boolean.TRUE;
Expand Down Expand Up @@ -119,6 +121,9 @@ public static <T> T getAsType(OpenemsType type, Object value) throws IllegalArgu

} else if (value instanceof String) {
String stringValue = (String) value;
if (stringValue.isEmpty()) {
return null;
}
return (T) Short.valueOf(Short.parseShort(stringValue));
}
break;
Expand Down Expand Up @@ -162,6 +167,9 @@ public static <T> T getAsType(OpenemsType type, Object value) throws IllegalArgu

} else if (value instanceof String) {
String stringValue = (String) value;
if (stringValue.isEmpty()) {
return null;
}
return (T) Integer.valueOf(Integer.parseInt(stringValue));
}
break;
Expand Down Expand Up @@ -191,6 +199,9 @@ public static <T> T getAsType(OpenemsType type, Object value) throws IllegalArgu

} else if (value instanceof String) {
String stringValue = (String) value;
if (stringValue.isEmpty()) {
return null;
}
return (T) Long.valueOf(Long.parseLong(stringValue));
}
break;
Expand Down Expand Up @@ -232,6 +243,9 @@ public static <T> T getAsType(OpenemsType type, Object value) throws IllegalArgu

} else if (value instanceof String) {
String stringValue = (String) value;
if (stringValue.isEmpty()) {
return null;
}
return (T) Float.valueOf(Float.parseFloat(stringValue));
}
break;
Expand Down Expand Up @@ -261,6 +275,9 @@ public static <T> T getAsType(OpenemsType type, Object value) throws IllegalArgu

} else if (value instanceof String) {
String stringValue = (String) value;
if (stringValue.isEmpty()) {
return null;
}
return (T) Double.valueOf(Double.parseDouble(stringValue));
}
break;
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>io.openems.edge.ess.refu</name>
<name>io.openems.edge.controller.ess.gridoptimizedcharge</name>
<comment></comment>
<projects>
</projects>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Bundle-Name: OpenEMS Edge ESS Refu
Bundle-Name: OpenEMS Edge Controller Ess Grid Optimized Charge
Bundle-Vendor: FENECON 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.ess.api
io.openems.edge.controller.api,\
io.openems.edge.ess.api,\
io.openems.edge.meter.api,\
io.openems.edge.predictor.api

-testpath: \
${testpath}
11 changes: 11 additions & 0 deletions io.openems.edge.controller.ess.gridoptimizedcharge/readme.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Grid Optimized Charge

Combination of the PredictiveDelayCharge and the SellToGridPowerLimit controllers:

Delays the charging of the AC or DC storage system based on predicted production and consumption given by the PredictorManager.

Even during the delayed charging, the battery is able to force charge when the sell-to-grid power exceeds the configured "Sell-To-Grid maximum power limit".
This is mainly used when only 70 percent of the maximum production is allowed to feed in to the grid.


https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.controller.ess.gridoptimizedcharge[Source Code icon:github[]]
Loading

0 comments on commit 852257f

Please sign in to comment.