Skip to content

Commit

Permalink
Merge branch 'release/2021.12.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
sfeilmeier committed Jul 1, 2021
2 parents 852257f + 4b99c24 commit 8543174
Show file tree
Hide file tree
Showing 68 changed files with 1,556 additions and 705 deletions.
2 changes: 1 addition & 1 deletion cnf/checkstyle.xml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<message key="name.invalidPattern" value="Class type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="MethodTypeParameterName">
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]*[T]$)"/>
<property name="format" value="(^[A-Z][0-9]?)$|([A-Z][a-zA-Z0-9]$)"/>
<message key="name.invalidPattern" value="Method type name ''{0}'' must match pattern ''{1}''."/>
</module>
<module name="InterfaceTypeParameterName">
Expand Down
2 changes: 1 addition & 1 deletion cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@
<!-- Used by io.openems.backend.metadata.odoo -->
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.2.21</version>
<version>42.2.22</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.11.0
Version 2021.12.0
:sectnums:
:sectnumlevels: 4
:toc:
Expand Down
2 changes: 1 addition & 1 deletion io.openems.backend.application/BackendApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -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.21,42.2.22)'
org.postgresql.jdbc;version='[42.2.22,42.2.23)'
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,11 @@ private void handleEdgeConfigNotification(EdgeConfigNotification message, WsData
// forward
try {
this.parent.uiWebsocket.sendBroadcast(edgeId, new EdgeRpcNotification(edgeId, message));
} catch (OpenemsNamedException | NullPointerException e) {
} catch (OpenemsNamedException e) {
this.parent.logWarn(this.log, "Unable to forward EdgeConfigNotification to UI: " + e.getMessage());
} catch (NullPointerException e) {
this.parent.logWarn(this.log, "Unable to forward EdgeConfigNotification to UI: NullPointerException");
e.printStackTrace();
}
}

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 = 11;
public final static short VERSION_MINOR = 12;

/**
* The patch version of OpenEMS.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
package io.openems.common.websocket;

import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import java.util.function.Consumer;

import org.java_websocket.WebSocket;
Expand Down Expand Up @@ -51,7 +49,7 @@ public final void run() {
// Get Named Exception error response
this.parent.logWarn(this.log, "JSON-RPC Error Response: " + e.getMessage());
response = new JsonrpcResponseError(request.getId(), e);
} catch (ExecutionException | InterruptedException | TimeoutException e) {
} catch (Exception e) {
// Get GENERIC error response
this.parent.logWarn(this.log, "JSON-RPC Error Response. " + e.getClass().getSimpleName() + ". " //
+ "Request: " + this.request.toString() + ". " //
Expand Down
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
import org.slf4j.LoggerFactory;

import io.openems.common.channel.AccessMode;
import io.openems.common.exceptions.OpenemsException;
import io.openems.common.exceptions.OpenemsError.OpenemsNamedException;
import io.openems.common.exceptions.OpenemsException;
import io.openems.edge.battery.api.Battery;
import io.openems.edge.battery.bmw.enums.BmsState;
import io.openems.edge.battery.bmw.enums.State;
Expand Down Expand Up @@ -451,9 +451,7 @@ protected ModbusProtocol defineModbusProtocol() throws OpenemsException {
// not defined by "BCS_HL-SW_Operating-Instructions_V1.0.2_under_work_ChL.pdf"
m(BMWChannelId.SERIAL_NUMBER, new UnsignedDoublewordElement(1048)),
// not defined by "BCS_HL-SW_Operating-Instructions_V1.0.2_under_work_ChL.pdf"
m(BMWChannelId.SERIAL_NUMBER, new UnsignedDoublewordElement(1050)),
// not defined by "BCS_HL-SW_Operating-Instructions_V1.0.2_under_work_ChL.pdf"
m(BMWChannelId.SOFTWARE_VERSION, new UnsignedDoublewordElement(1052)) //
m(BMWChannelId.SOFTWARE_VERSION, new UnsignedDoublewordElement(1050)) //
));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,8 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
.text("Initialization failure")), //
FAILURE_EEPROM(Doc.of(Level.FAULT) //
.text("EEPROM fault")), //
FAILURE_EEPROM2(Doc.of(Level.FAULT) //
.text("EEPROM2 fault")), //
FAILURE_INTRANET_COMMUNICATION(Doc.of(Level.FAULT) //
.text("Intranet communication fault")), //
FAILURE_TEMP_SAMPLING_LINE(Doc.of(Level.FAULT) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ protected ModbusProtocol defineModbusProtocol() throws OpenemsException {
.bit(1, BatteryBoxC130.ChannelId.ALARM_BCU_NTC) //
.bit(2, BatteryBoxC130.ChannelId.ALARM_CONTACTOR_ADHESION) //
.bit(3, BatteryBoxC130.ChannelId.ALARM_BCU_BMU_COMMUNICATION)//
.bit(4, BatteryBoxC130.ChannelId.FAILURE_EEPROM) //
.bit(4, BatteryBoxC130.ChannelId.FAILURE_EEPROM2) //
.bit(5, BatteryBoxC130.ChannelId.ALARM_CURRENT_SENSOR) //
.bit(6, BatteryBoxC130.ChannelId.ALARM_INSULATION_CHECK) //
.bit(7, BatteryBoxC130.ChannelId.ALARM_BAU_COMMUNICATION) //
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ protected ModbusProtocol defineModbusProtocol() throws OpenemsException {
), //

new FC16WriteRegistersTask(this.getAddressContactorControl(ADDRESS_OFFSET_RACK_3),
m(ClusterVersionBChannelId.RACK_2_POSITIVE_CONTACTOR,
m(ClusterVersionBChannelId.RACK_3_POSITIVE_CONTACTOR,
new UnsignedWordElement(this.getAddressContactorControl(ADDRESS_OFFSET_RACK_3))) //
), //
new FC3ReadRegistersTask(this.getAddressContactorControl(ADDRESS_OFFSET_RACK_3), Priority.HIGH,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public class SingleRack extends AbstractOpenemsModbusComponent
private int unsuccessfulStarts = 0;
private LocalDateTime startAttemptTime = null;

// indicates that system is stopping; during that time no commands should be
// Indicates that system is stopping; during that time no commands should be
// sent
private boolean isStopping = false;

Expand Down Expand Up @@ -1106,7 +1106,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
.text("Voltage sampling fault")), //
FAILURE_LTC6803(Doc.of(Level.FAULT) //
.text("LTC6803 fault")), //
FAILURE_CONNECTOR_WIRE(Doc.of(Level.FAULT) //
FAILURE_CONNECTOR_WIRE(Doc.of(Level.WARNING) //
.text("connector wire fault")), //
FAILURE_SAMPLING_WIRE(Doc.of(Level.FAULT) //
.text("sampling wire fault")), //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.openems.edge.battery.soltaro.cluster.versionb;

import org.junit.Before;
import org.junit.Test;

import io.openems.edge.battery.soltaro.cluster.versionc.ResetChannelSources;
import io.openems.edge.battery.soltaro.common.enums.BatteryState;
import io.openems.edge.battery.soltaro.common.enums.ModuleType;
import io.openems.edge.bridge.modbus.test.DummyModbusBridge;
Expand All @@ -13,6 +15,11 @@ public class ClusterVersionBTest {
private static final String BATTERY_ID = "battery0";
private static final String MODBUS_ID = "modbus0";

@Before
public void before() {
ResetChannelSources.run();
}

@Test
public void test() throws Exception {
new ComponentTest(new ClusterVersionB()) //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package io.openems.edge.battery.soltaro.cluster.versionc;

import org.junit.Before;
import org.junit.Test;

import io.openems.edge.battery.soltaro.common.enums.ModuleType;
Expand All @@ -13,6 +14,11 @@ public class ClusterVersionCImplTest {
private static final String BATTERY_ID = "battery0";
private static final String MODBUS_ID = "modbus0";

@Before
public void before() {
ResetChannelSources.run();
}

@Test
public void test() throws Exception {
new ComponentTest(new ClusterVersionCImpl()) //
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package io.openems.edge.battery.soltaro.cluster.versionc;

import io.openems.edge.battery.api.Battery;
import io.openems.edge.battery.protection.BatteryProtection;
import io.openems.edge.battery.soltaro.cluster.SoltaroCluster;
import io.openems.edge.common.channel.ChannelId;

/**
* Reset Channel sources to avoid 'Unable to add Modbus mapping' errors on
* running all tests at once.
*/
public class ResetChannelSources {

public static void run() {
resetChannelSources(Battery.ChannelId.values());
resetChannelSources(BatteryProtection.ChannelId.values());
resetChannelSources(SoltaroCluster.ChannelId.values());
}

private static void resetChannelSources(ChannelId[] channelIds) {
for (ChannelId channelId : channelIds) {
channelId.doc().source(null);
}
}

}
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.openems.edge.battery.soltaro.single.versiona;

import org.junit.Before;
import org.junit.Test;

import io.openems.edge.battery.soltaro.cluster.versionc.ResetChannelSources;
import io.openems.edge.battery.soltaro.common.enums.BatteryState;
import io.openems.edge.bridge.modbus.test.DummyModbusBridge;
import io.openems.edge.common.test.ComponentTest;
Expand All @@ -12,6 +14,11 @@ public class SingleRackTest {
private static final String BATTERY_ID = "battery0";
private static final String MODBUS_ID = "modbus0";

@Before
public void before() {
ResetChannelSources.run();
}

@Test
public void test() throws Exception {
new ComponentTest(new SingleRack()) //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.openems.edge.battery.soltaro.single.versionb;

import org.junit.Before;
import org.junit.Test;

import io.openems.edge.battery.soltaro.cluster.versionc.ResetChannelSources;
import io.openems.edge.battery.soltaro.common.enums.ModuleType;
import io.openems.edge.bridge.modbus.test.DummyModbusBridge;
import io.openems.edge.common.startstop.StartStopConfig;
Expand All @@ -14,6 +16,11 @@ public class SingleRackVersionBImplTest {
private static final String BATTERY_ID = "battery0";
private static final String MODBUS_ID = "modbus0";

@Before
public void before() {
ResetChannelSources.run();
}

@Test
public void test() throws Exception {
new ComponentTest(new SingleRackVersionBImpl()) //
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
package io.openems.edge.battery.soltaro.single.versionc;

import org.junit.Before;
import org.junit.Test;

import io.openems.edge.battery.soltaro.cluster.versionc.ResetChannelSources;
import io.openems.edge.battery.soltaro.common.enums.ModuleType;
import io.openems.edge.bridge.modbus.test.DummyModbusBridge;
import io.openems.edge.common.startstop.StartStopConfig;
Expand All @@ -13,6 +15,11 @@ public class SingleRackVersionCImplTest {
private static final String BATTERY_ID = "battery0";
private static final String MODBUS_ID = "modbus0";

@Before
public void before() {
ResetChannelSources.run();
}

@Test
public void test() throws Exception {
new ComponentTest(new SingleRackVersionCImpl()) //
Expand Down
Loading

0 comments on commit 8543174

Please sign in to comment.