Skip to content

Commit

Permalink
Implement Battery-Inverter Nature, Generic-ESS and KACO blueplanet gr…
Browse files Browse the repository at this point in the history
…idsave as SunSpec (#1099)

This pull-request contains following major developments and design ideas:

- Generic implementation of State-Machines
- Implement Start-Stop feature: new interface 'StartStoppable' marks a device or service that can be started or stopped
- Split components in Interface (Name) and implementation (NameImpl)
- Getters and Setters for Nature-Channels: see #1046 (comment)
- JUnit Test-Framework for all kinds of OpenemsComponents
- Refactoring of "Battery" interface:
-- drop 'READY_FOR_WORKING' channel
-- extends "StartStoppable"
-- To indicate, that the Battery is ready for charging/discharging, the following Channels need to be set:
--- StartStoppable.ChannelId.START_STOP must be set to 'START'
--- No 'Fault'-StateChannels are set (i.e. 'OpenemsComponent.ChannelId.STATE' is < 3)
--- CHARGE_MAX_VOLTAGE, CHARGE_MAX_CURRENT, DISCHARGE_MIN_VOLTAGE and DISCHARGE_MAX_CURRENT are != null

- New interface "BatteryInverter" (ManagedSymmetricBatteryInverter, SymmetricBatteryInverter)
- Implement Generic ManagedSymmetricEss
  • Loading branch information
sfeilmeier authored Jun 4, 2020
1 parent be27c58 commit bf07607
Show file tree
Hide file tree
Showing 169 changed files with 23,599 additions and 15,115 deletions.
1 change: 1 addition & 0 deletions cnf/build.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ buildpath: \
com.google.gson;version=2.8.5

testpath: \
slf4j.simple,\
\${junit}

javac.source: 1.8
Expand Down
5 changes: 5 additions & 0 deletions cnf/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -244,5 +244,10 @@
<artifactId>slf4j-api</artifactId>
<version>1.7.30</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-simple</artifactId>
<version>1.7.30</version>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,19 @@

/**
* Wraps a JSON-RPC Request for a specific Edge-ID.
*
* <pre>
* {
* "jsonrpc": "2.0",
* "id": "UUID",
* "method": "edgeRpc",
* "params": {
* "edgeId": string,
* "payload": {
* }
* }
* }
* </pre>
*/
public class EdgeRpcRequest extends JsonrpcRequest {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,24 @@
import io.openems.common.types.ChannelAddress;
import io.openems.common.utils.JsonUtils;

/**
* Represents a JSON-RPC Request for 'queryHistoricTimeseriesExportXlxs'.
*
* <pre>
* {
* "jsonrpc": "2.0",
* "id": "UUID",
* "method": "queryHistoricTimeseriesExportXlxs",
* "params": {
* "timezone": Number,
* "fromDate": YYYY-MM-DD,
* "toDate": YYYY-MM-DD,
* "dataChannels": ChannelAddress[],
* "energyChannels": ChannelAddress[]
* }
* }
* </pre>
*/
public class QueryHistoricTimeseriesExportXlxsRequest extends JsonrpcRequest {

public final static String METHOD = "queryHistoricTimeseriesExportXlxs";
Expand Down
14 changes: 14 additions & 0 deletions io.openems.common/src/io/openems/common/types/OptionsEnum.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.openems.common.types;

import com.google.common.base.CaseFormat;

public interface OptionsEnum {

/**
Expand All @@ -23,6 +25,18 @@ public interface OptionsEnum {
*/
OptionsEnum getUndefined();

/**
* Gets the name in CamelCase format.
*
* <p>
* If {@link #getName()} returns 'MY_VALUE' this method returns 'MyValue'.
*
* @return the Name in CamelCase format
*/
public default String asCamelCase() {
return CaseFormat.UPPER_UNDERSCORE.to(CaseFormat.UPPER_CAMEL, this.getName());
}

/**
* Gets whether the current enum represents the 'UNDEFINED' value.
*
Expand Down
9 changes: 8 additions & 1 deletion io.openems.edge.application/EdgeApp.bndrun
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
bnd.identity;id='org.apache.felix.inventory',\
bnd.identity;id='io.openems.edge.application',\
bnd.identity;id='io.openems.edge.battery.bydcommercial',\
bnd.identity;id='io.openems.edge.batteryinverter.kaco.blueplanetgridsave',\
bnd.identity;id='io.openems.edge.batteryinverter.sunspec',\
bnd.identity;id='io.openems.edge.battery.soltaro',\
bnd.identity;id='io.openems.edge.bridge.mbus',\
bnd.identity;id='io.openems.edge.bridge.modbus',\
Expand Down Expand Up @@ -78,6 +80,7 @@
bnd.identity;id='io.openems.edge.ess.cluster',\
bnd.identity;id='io.openems.edge.ess.core',\
bnd.identity;id='io.openems.edge.ess.fenecon.commercial40',\
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',\
Expand Down Expand Up @@ -136,6 +139,9 @@
io.openems.edge.battery.api;version='[1.0.0,1.0.1)',\
io.openems.edge.battery.bydcommercial;version='[1.0.0,1.0.1)',\
io.openems.edge.battery.soltaro;version='[1.0.0,1.0.1)',\
io.openems.edge.batteryinverter.api;version='[1.0.0,1.0.1)',\
io.openems.edge.batteryinverter.kaco.blueplanetgridsave;version='[1.0.0,1.0.1)',\
io.openems.edge.batteryinverter.sunspec;version='[1.0.0,1.0.1)',\
io.openems.edge.bridge.mbus;version='[1.0.0,1.0.1)',\
io.openems.edge.bridge.modbus;version='[1.0.0,1.0.1)',\
io.openems.edge.bridge.onewire;version='[1.0.0,1.0.1)',\
Expand Down Expand Up @@ -187,6 +193,7 @@
io.openems.edge.ess.cluster;version='[1.0.0,1.0.1)',\
io.openems.edge.ess.core;version='[1.0.0,1.0.1)',\
io.openems.edge.ess.fenecon.commercial40;version='[1.0.0,1.0.1)',\
io.openems.edge.ess.generic;version='[1.0.0,1.0.1)',\
io.openems.edge.ess.kaco.blueplanet.gridsave50;version='[1.0.0,1.0.1)',\
io.openems.edge.ess.mr.gridcon;version='[1.0.0,1.0.1)',\
io.openems.edge.ess.refu;version='[1.0.0,1.0.1)',\
Expand Down Expand Up @@ -262,4 +269,4 @@
org.ops4j.pax.logging.pax-logging-log4j1;version='[2.0.3,2.0.4)',\
org.osgi.util.function;version='[1.1.0,1.1.1)',\
org.osgi.util.promise;version='[1.1.1,1.1.2)',\
rrd4j;version='[3.6.0,3.6.1)'
rrd4j;version='[3.6.0,3.6.1)'
Loading

0 comments on commit bf07607

Please sign in to comment.