Skip to content

Commit

Permalink
Merge branch 'release/2021.18.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Oct 21, 2021
2 parents e048c39 + 195b402 commit 17c5e12
Show file tree
Hide file tree
Showing 439 changed files with 12,673 additions and 4,953 deletions.
2 changes: 1 addition & 1 deletion cnf/build.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ buildpath: \
osgi.core;version='7.0.0',\
osgi.cmpn;version='7.0.0',\
slf4j.api;version='1.7.32',\
com.google.guava;version='30.1.1',\
com.google.guava;version='31.0.1',\
com.google.gson;version='2.8.8'

testpath: \
Expand Down
10 changes: 5 additions & 5 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<version>30.1.1-jre</version>
<version>31.0.1-jre</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
Expand Down Expand Up @@ -228,7 +228,7 @@
<!-- HTML processing -->
<groupId>org.jsoup</groupId>
<artifactId>jsoup</artifactId>
<version>1.14.2</version>
<version>1.14.3</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
Expand Down Expand Up @@ -263,18 +263,18 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.function</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.util.promise</artifactId>
<version>1.1.1</version>
<version>1.2.0</version>
</dependency>
<dependency>
<!-- Used by io.openems.backend.metadata.odoo -->
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.23</version>
<version>42.3.0</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.17.0
Version 2021.18.0
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down
9 changes: 5 additions & 4 deletions io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
-runbundles: \
Java-WebSocket;version='[1.5.2,1.5.3)',\
com.google.gson;version='[2.8.8,2.8.9)',\
com.google.guava;version='[30.1.1,30.1.2)',\
com.google.guava;version='[31.0.1,31.0.2)',\
com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\
com.zaxxer.HikariCP;version='[4.0.3,4.0.4)',\
io.openems.backend.application;version=snapshot,\
Expand All @@ -59,6 +59,7 @@
io.openems.shared.influxdb;version=snapshot,\
io.openems.wrapper.fastexcel;version=snapshot,\
io.openems.wrapper.influxdb-java;version=snapshot,\
io.openems.wrapper.okhttp;version=snapshot,\
io.openems.wrapper.opczip;version=snapshot,\
org.apache.commons.commons-fileupload;version='[1.4.0,1.4.1)',\
org.apache.commons.commons-io;version='[2.8.0,2.8.1)',\
Expand All @@ -76,6 +77,6 @@
org.ops4j.pax.logging.pax-logging-api;version='[2.0.10,2.0.11)',\
org.ops4j.pax.logging.pax-logging-log4j1;version='[2.0.10,2.0.11)',\
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.23,42.2.24)'
org.osgi.util.function;version='[1.2.0,1.2.1)',\
org.osgi.util.promise;version='[1.2.0,1.2.1)',\
org.postgresql.jdbc;version='[42.3.0,42.3.1)'
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
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.ModbusComponent;
import io.openems.edge.bridge.modbus.api.ModbusProtocol;
import io.openems.edge.common.channel.Doc;
import io.openems.edge.common.component.OpenemsComponent;
Expand All @@ -25,13 +26,14 @@
immediate = true, //
configurationPolicy = ConfigurationPolicy.REQUIRE //
)
public class MyModbusDeviceImpl extends AbstractOpenemsModbusComponent implements MyModbusDevice, OpenemsComponent {
public class MyModbusDeviceImpl extends AbstractOpenemsModbusComponent implements MyModbusDevice, ModbusComponent, OpenemsComponent {

private Config config = null;

public MyModbusDevice() {
super(//
OpenemsComponent.ChannelId.values(), //
ModbusComponent.ChannelId.values(), //
MyModbusDevice.ChannelId.values() //
);
}
Expand Down
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 = 17;
public final static short VERSION_MINOR = 18;

/**
* The patch version of OpenEMS.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ public static GetEdgeConfigRequest from(JsonrpcRequest r) throws OpenemsExceptio
return new GetEdgeConfigRequest(r);
}

public GetEdgeConfigRequest() {
super(METHOD);
}

private GetEdgeConfigRequest(JsonrpcRequest request) {
super(request, METHOD);
}
Expand Down
2 changes: 1 addition & 1 deletion io.openems.common/src/io/openems/common/session/Role.java
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public Role assertIsAtLeast(String resource, Role role) throws OpenemsNamedExcep
// Ok
return this;
} else {
throw OpenemsError.COMMON_ROLE_ACCESS_DENIED.exception(resource, this);
throw OpenemsError.COMMON_ROLE_ACCESS_DENIED.exception(resource, this.toString());
}
}

Expand Down
25 changes: 15 additions & 10 deletions io.openems.edge.application/EdgeApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
bnd.identity;id='io.openems.edge.battery.fenecon.home',\
bnd.identity;id='io.openems.edge.batteryinverter.kaco.blueplanetgridsave',\
bnd.identity;id='io.openems.edge.batteryinverter.refu88k',\
bnd.identity;id='io.openems.edge.batteryinverter.sinexcel',\
bnd.identity;id='io.openems.edge.batteryinverter.sunspec',\
bnd.identity;id='io.openems.edge.battery.soltaro',\
bnd.identity;id='io.openems.edge.bosch.bpts5hybrid',\
Expand All @@ -57,19 +58,20 @@
bnd.identity;id='io.openems.edge.controller.debug.log',\
bnd.identity;id='io.openems.edge.controller.ess.acisland',\
bnd.identity;id='io.openems.edge.controller.ess.activepowervoltagecharacteristic',\
bnd.identity;id='io.openems.edge.controller.ess.cycle',\
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.emergencycapacityreserve',\
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',\
bnd.identity;id='io.openems.edge.controller.ess.mindischargeperiod',\
bnd.identity;id='io.openems.edge.controller.ess.onefullcycle',\
bnd.identity;id='io.openems.edge.controller.ess.predictivedelaycharge',\
bnd.identity;id='io.openems.edge.controller.ess.reactivepowervoltagecharacteristic',\
bnd.identity;id='io.openems.edge.controller.ess.selltogridlimit',\
bnd.identity;id='io.openems.edge.controller.ess.standby',\
bnd.identity;id='io.openems.edge.controller.ess.timeofusetariff.discharge',\
bnd.identity;id='io.openems.edge.controller.evcs',\
bnd.identity;id='io.openems.edge.controller.evcs.fixactivepower',\
bnd.identity;id='io.openems.edge.controller.generic.jsonlogic',\
Expand All @@ -96,7 +98,6 @@
bnd.identity;id='io.openems.edge.ess.fenecon.commercial40',\
bnd.identity;id='io.openems.edge.ess.generic',\
bnd.identity;id='io.openems.edge.ess.mr.gridcon',\
bnd.identity;id='io.openems.edge.ess.sinexcel',\
bnd.identity;id='io.openems.edge.ess.sma',\
bnd.identity;id='io.openems.edge.evcs.cluster',\
bnd.identity;id='io.openems.edge.evcs.core',\
Expand All @@ -112,6 +113,7 @@
bnd.identity;id='io.openems.edge.fenecon.pro',\
bnd.identity;id='io.openems.edge.goodwe',\
bnd.identity;id='io.openems.edge.io.kmtronic',\
bnd.identity;id='io.openems.edge.io.offgridswitch',\
bnd.identity;id='io.openems.edge.io.revpi',\
bnd.identity;id='io.openems.edge.io.shelly',\
bnd.identity;id='io.openems.edge.io.wago',\
Expand Down Expand Up @@ -152,7 +154,7 @@
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.8,2.8.9)',\
com.google.guava;version='[30.1.1,30.1.2)',\
com.google.guava;version='[31.0.1,31.0.2)',\
com.google.guava.failureaccess;version='[1.0.1,1.0.2)',\
com.sun.jna;version='[5.9.0,5.9.1)',\
io.openems.common;version=snapshot,\
Expand All @@ -165,6 +167,7 @@
io.openems.edge.batteryinverter.api;version=snapshot,\
io.openems.edge.batteryinverter.kaco.blueplanetgridsave;version=snapshot,\
io.openems.edge.batteryinverter.refu88k;version=snapshot,\
io.openems.edge.batteryinverter.sinexcel;version=snapshot,\
io.openems.edge.batteryinverter.sunspec;version=snapshot,\
io.openems.edge.bosch.bpts5hybrid;version=snapshot,\
io.openems.edge.bridge.mbus;version=snapshot,\
Expand All @@ -189,19 +192,20 @@
io.openems.edge.controller.debug.log;version=snapshot,\
io.openems.edge.controller.ess.acisland;version=snapshot,\
io.openems.edge.controller.ess.activepowervoltagecharacteristic;version=snapshot,\
io.openems.edge.controller.ess.cycle;version=snapshot,\
io.openems.edge.controller.ess.delaycharge;version=snapshot,\
io.openems.edge.controller.ess.delayedselltogrid;version=snapshot,\
io.openems.edge.controller.ess.emergencycapacityreserve;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,\
io.openems.edge.controller.ess.mindischargeperiod;version=snapshot,\
io.openems.edge.controller.ess.onefullcycle;version=snapshot,\
io.openems.edge.controller.ess.predictivedelaycharge;version=snapshot,\
io.openems.edge.controller.ess.reactivepowervoltagecharacteristic;version=snapshot,\
io.openems.edge.controller.ess.selltogridlimit;version=snapshot,\
io.openems.edge.controller.ess.standby;version=snapshot,\
io.openems.edge.controller.ess.timeofusetariff.discharge;version=snapshot,\
io.openems.edge.controller.evcs;version=snapshot,\
io.openems.edge.controller.evcs.fixactivepower;version=snapshot,\
io.openems.edge.controller.generic.jsonlogic;version=snapshot,\
Expand Down Expand Up @@ -229,7 +233,6 @@
io.openems.edge.ess.fenecon.commercial40;version=snapshot,\
io.openems.edge.ess.generic;version=snapshot,\
io.openems.edge.ess.mr.gridcon;version=snapshot,\
io.openems.edge.ess.sinexcel;version=snapshot,\
io.openems.edge.ess.sma;version=snapshot,\
io.openems.edge.evcs.api;version=snapshot,\
io.openems.edge.evcs.cluster;version=snapshot,\
Expand All @@ -247,6 +250,7 @@
io.openems.edge.goodwe;version=snapshot,\
io.openems.edge.io.api;version=snapshot,\
io.openems.edge.io.kmtronic;version=snapshot,\
io.openems.edge.io.offgridswitch;version=snapshot,\
io.openems.edge.io.revpi;version=snapshot,\
io.openems.edge.io.shelly;version=snapshot,\
io.openems.edge.io.wago;version=snapshot,\
Expand Down Expand Up @@ -291,6 +295,7 @@
io.openems.wrapper.eu.chargetime.ocpp;version=snapshot,\
io.openems.wrapper.fastexcel;version=snapshot,\
io.openems.wrapper.influxdb-java;version=snapshot,\
io.openems.wrapper.okhttp;version=snapshot,\
io.openems.wrapper.opczip;version=snapshot,\
io.openems.wrapper.paho-mqttv5;version=snapshot,\
io.openems.wrapper.sdnotify;version=snapshot,\
Expand All @@ -307,12 +312,12 @@
org.apache.felix.webconsole;version='[4.7.0,4.7.1)',\
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.2,1.14.3)',\
org.jsoup;version='[1.14.3,1.14.4)',\
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.10,2.0.11)',\
org.ops4j.pax.logging.pax-logging-log4j1;version='[2.0.10,2.0.11)',\
org.osgi.util.function;version='[1.1.0,1.1.1)',\
org.osgi.util.promise;version='[1.1.1,1.1.2)',\
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)'
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,9 @@ protected Double getForceCurrent(Integer minCellVoltage, Integer maxCellVoltage)
case WAIT_FOR_FORCE_MODE:
return null;
case FORCE_MODE:
return -1.;
// TODO Plan is making the value adaptive, i.e. start with 1 A; if voltage still
// decreases, then slowly increase force charge current.
return -2.;
case BLOCK_MODE:
return 0.;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,18 +207,30 @@ public void test() throws Exception {
.timeleap(clock, 60, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3660) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_CHARGE_MAX_CURRENT, -2) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Force-Discharge") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3640) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_CHARGE_MAX_CURRENT, -2) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #1") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3639) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #1 still reduce by 1") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3638) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #1 still reduce by 1") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3610) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, 0) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #2") //
Expand All @@ -232,18 +244,30 @@ public void test() throws Exception {
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3660) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_CHARGE_MAX_CURRENT, -2) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Force-Discharge") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3640) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_CHARGE_MAX_CURRENT, -2) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #1") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3639) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #1 still reduce by 1") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3638) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, -1) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #1 still reduce by 1") //
.timeleap(clock, 1, ChronoUnit.SECONDS) //
.input(BATTERY_MAX_CELL_VOLTAGE, 3637) //
.onAfterProcessImage(() -> sut.apply()) //
.output(BATTERY_CHARGE_MAX_CURRENT, 0) //
.output(BATTERY_DISCHARGE_MAX_CURRENT, 80)) //
.next(new TestCase("Block Charge #2") //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,9 @@ public void testForceDischarge() {
assertEquals(null, sut.getForceCurrent(3000, 3660));
clock.leap(1, ChronoUnit.MINUTES);
// Enter FORCE_MODE -> force discharge
assertEquals(-1., sut.getForceCurrent(3000, 3660), 0.001);
assertEquals(-2., sut.getForceCurrent(3000, 3660), 0.001);
clock.leap(1, ChronoUnit.SECONDS);
assertEquals(-1., sut.getForceCurrent(3000, 3650), 0.001);
assertEquals(-2., sut.getForceCurrent(3000, 3650), 0.001);
// Enter BLOCK_MODE -> no charge/discharge
assertEquals(0, sut.getForceCurrent(3000, 3639), 0.001);
assertEquals(0, sut.getForceCurrent(3000, 3600), 0.001);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
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.BitsWordElement;
import io.openems.edge.bridge.modbus.api.element.SignedWordElement;
Expand Down Expand Up @@ -55,7 +56,7 @@
property = EventConstants.EVENT_TOPIC + "=" + EdgeEventConstants.TOPIC_CYCLE_AFTER_PROCESS_IMAGE //
)
public class BmwBatteryImpl extends AbstractOpenemsModbusComponent
implements BmwBattery, Battery, OpenemsComponent, EventHandler, ModbusSlave, StartStoppable {
implements BmwBattery, Battery, ModbusComponent, OpenemsComponent, EventHandler, ModbusSlave, StartStoppable {

private final Logger log = LoggerFactory.getLogger(BmwBatteryImpl.class);

Expand Down Expand Up @@ -85,6 +86,7 @@ protected void setModbus(BridgeModbus modbus) {
public BmwBatteryImpl() {
super(//
OpenemsComponent.ChannelId.values(), //
ModbusComponent.ChannelId.values(), //
Battery.ChannelId.values(), //
StartStoppable.ChannelId.values(), //
BMWChannelId.values() //
Expand Down
Loading

0 comments on commit 17c5e12

Please sign in to comment.