forked from OpenEMS/openems
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Backport from FEMS for 2022.06 (OpenEMS#1850)
- Common: - Add type casting to JsonUtils - WebSocket reconnect: small fixes - Backend: - Updates to Alerting Service - EdgeWebsocket: trim apikey - Edge: - Battery: - Add FENECON Commercial Battery - Soltaro Cluster C: fix possible race condition on init - Battery Inverter: - Sinexcel: large improvements - Controller: - Api.Backend: fix data send on duplicated Component-ID - ESS GridOptimizedCharge: large improvements - Timedata: - RRD4j: better handling for missing database files - Influx: enable GZIP and improve logging - Edge.Common: - Refactor ComponentManager - Add Yuriy Guskovs Plot library for tests
- Loading branch information
1 parent
4aec48a
commit e17b229
Showing
64 changed files
with
5,599 additions
and
495 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
28 changes: 28 additions & 0 deletions
28
io.openems.common/src/io/openems/common/function/ThrowingTriFunction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package io.openems.common.function; | ||
|
||
/** | ||
* This interface is similar to the java.util interface | ||
* {@link ThrowingBiFunction}. Difference is, that it allows to pass to the | ||
* apply() method one more parameter. | ||
* | ||
* @param <T> the apply methods first argument type | ||
* @param <U> the apply methods second argument type | ||
* @param <S> the apply methods third argument type | ||
* @param <R> the type of the result of the function | ||
* @param <E> the exception type | ||
*/ | ||
@FunctionalInterface | ||
public interface ThrowingTriFunction<T, U, S, R, E extends Exception> { | ||
|
||
/** | ||
* Applies this function to the given arguments. | ||
* | ||
* @param t the first function argument | ||
* @param u the second function argument | ||
* @param s the third function argument | ||
* @return the function result | ||
* @throws E on error | ||
*/ | ||
public R apply(T t, U u, S s) throws E; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="con" path="aQute.bnd.classpath.container"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-11"/> | ||
<classpathentry kind="src" output="bin" path="src"/> | ||
<classpathentry kind="src" output="bin_test" path="test"> | ||
<attributes> | ||
<attribute name="test" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/bin_test/ | ||
/generated/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>io.openems.edge.battery.fenecon.commercial</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>bndtools.core.bndbuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>bndtools.core.bndnature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
Bundle-Name: OpenEMS Edge Battery FENECON Commercial | ||
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.battery.api,\ | ||
io.openems.edge.bridge.modbus,\ | ||
io.openems.edge.common,\ | ||
io.openems.edge.ess.api,\ | ||
io.openems.edge.io.api,\ | ||
|
||
-testpath: \ | ||
${testpath},\ | ||
com.ghgande.j2mod |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
= Battery FENECON Commercial | ||
|
||
https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.battery.fenecon.commercial[Source Code icon:github[]] |
87 changes: 87 additions & 0 deletions
87
...ommercial/src/io/openems/edge/battery/fenecon/commercial/BatteryProtectionDefinition.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,87 @@ | ||
package io.openems.edge.battery.fenecon.commercial; | ||
|
||
import io.openems.edge.battery.protection.force.ForceCharge; | ||
import io.openems.edge.battery.protection.force.ForceDischarge; | ||
import io.openems.edge.common.linecharacteristic.PolyLine; | ||
|
||
public class BatteryProtectionDefinition implements io.openems.edge.battery.protection.BatteryProtectionDefinition { | ||
|
||
@Override | ||
public int getInitialBmsMaxEverChargeCurrent() { | ||
return 100; // [A] | ||
} | ||
|
||
@Override | ||
public int getInitialBmsMaxEverDischargeCurrent() { | ||
return 100; // [A] | ||
} | ||
|
||
// Over voltage Protection | ||
@Override | ||
public PolyLine getChargeVoltageToPercent() { | ||
return PolyLine.create() // | ||
.addPoint(3000, 0.1) // | ||
.addPoint(Math.nextUp(3000), 1) // | ||
.addPoint(3485, 1) // | ||
.addPoint(3490, 0.9) // | ||
.addPoint(3570, 0.01) // | ||
.addPoint(3600, 0.01) // | ||
.addPoint(Math.nextDown(3600), 0) // | ||
.addPoint(3600, 0) // | ||
.build(); | ||
} | ||
|
||
// Low Voltage protection | ||
@Override | ||
public PolyLine getDischargeVoltageToPercent() { | ||
return PolyLine.create() // | ||
.addPoint(3000, 0) // | ||
.addPoint(Math.nextUp(3000), 0.1) // | ||
.addPoint(3030, 0.02) // | ||
.addPoint(3050, 0.02) // | ||
.addPoint(3140, 1) // | ||
.addPoint(3600, 1) // | ||
.addPoint(Math.nextUp(3600), 1) // | ||
.build(); | ||
} | ||
|
||
@Override | ||
public PolyLine getChargeTemperatureToPercent() { | ||
return PolyLine.create() // | ||
.addPoint(0, 0) // | ||
.addPoint(Math.nextUp(0), 0.01) // | ||
.addPoint(15, 1) // | ||
.addPoint(50, 1) // | ||
.addPoint(Math.nextDown(54), 0.01) // | ||
.addPoint(55, 0) // | ||
.build(); | ||
} | ||
|
||
@Override | ||
public PolyLine getDischargeTemperatureToPercent() { | ||
return PolyLine.create() // | ||
.addPoint(0, 0) // | ||
.addPoint(Math.nextUp(0), 0.01) // | ||
.addPoint(10, 1) // | ||
.addPoint(50, 1) // | ||
.addPoint(Math.nextDown(54), 0.01) // | ||
.addPoint(55, 0) // | ||
.build(); | ||
} | ||
|
||
@Override | ||
public ForceDischarge.Params getForceDischargeParams() { | ||
return new ForceDischarge.Params(3700, 3630, 3610); | ||
} | ||
|
||
@Override | ||
public ForceCharge.Params getForceChargeParams() { | ||
return new ForceCharge.Params(2850, 2950, 3030); | ||
} | ||
|
||
@Override | ||
public Double getMaxIncreaseAmperePerSecond() { | ||
return 0.5; // [A] per second | ||
} | ||
|
||
} |
Oops, something went wrong.