Skip to content

Commit

Permalink
FEMS Backports 2024-12-01 (#2894)
Browse files Browse the repository at this point in the history
# Edge
- Carlo Gavazzi Meter: fix scaling and extended DummyModbusBridge testing
  - Fixes scaling of Carlo Gavazzi meter
  - Currently the current is way too high (x100)
  - Added JUnit tests
- BMW Battery: backports of improvements.
- Meter : Implementation of Simens Sicam meter
- Time-of-Use-Tariff & EnergyScheduler V2 improvements
  - Allow managed consumption in EnergyFlow
  - Fix postprocessing
  - Move version and risk-level to EnergyScheduler
  - Implement Codec for Jenetics
  - Prepare attachments to OneSimulationContext
  - Optimizer: improve thread interrupt
  - Rework InitialPopulation to use int[][] instead of Chromosome
  - Fix immediate reaction to configuration change events
  - Prepare integration of EVCS

# UI
- Use dataService subcribe for energymonitor channels
  - Replace energymonitor `currentData` subscribe with dataService subscribe
- Add eslint rule for file naming conventions
  - Adding eslint rule for `kebab-case` file naming convention, turned to `off` regarding too many changes needed
- Adjust live reload behavior
  - Adjust pull to refresh, to be more appearant and give user feedback if live data is still up to date -> didnt update in `20` seconds
  - make banner sticky
- AppCenter: added uninstallation confirm button
  - added confirmation button when deinstalling an app

---------

Co-authored-by: Fabian Brandtner <[email protected]>
Co-authored-by: Pooran Chandrashekaraiah <[email protected]>
Co-authored-by: Lukas Rieger <[email protected]>
Co-authored-by: Stefan Feilmeier <[email protected]>
Co-authored-by: Michael Grill <[email protected]>
  • Loading branch information
6 people authored Nov 30, 2024
1 parent 7540025 commit 923265e
Show file tree
Hide file tree
Showing 117 changed files with 4,236 additions and 2,064 deletions.
18 changes: 17 additions & 1 deletion io.openems.common/src/io/openems/common/channel/Unit.java
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ public enum Unit {
*/
THOUSANDTH("‰"),

/**
* Ten Thousandth [‰], 0-10000.
*/
TENTHOUSANDTH("0.1‰"),

/**
* On or Off.
*/
Expand Down Expand Up @@ -91,6 +96,11 @@ public enum Unit {
*/
VOLT("V"),

/**
* Unit of Voltage [dV].
*/
DEZIVOLT("dV", VOLT, -1),

/**
* Unit of Voltage [mV].
*/
Expand All @@ -110,6 +120,11 @@ public enum Unit {
*/
AMPERE("A"),

/**
* Unit of Current [dA].
*/
DEZIAMPERE("dA", AMPERE, -1),

/**
* Unit of Current [mA].
*/
Expand Down Expand Up @@ -368,7 +383,8 @@ public String format(Object value, OpenemsType type) {
MILLIWATT, WATT_HOURS, OHM, KILOOHM, SECONDS, AMPERE_HOURS, HOUR, CUMULATED_SECONDS, KILOAMPERE_HOURS,
KILOVOLT_AMPERE, KILOVOLT_AMPERE_REACTIVE, KILOVOLT_AMPERE_REACTIVE_HOURS, KILOWATT_HOURS, MICROOHM,
MILLIAMPERE_HOURS, MILLIOHM, MILLISECONDS, MINUTE, THOUSANDTH, VOLT_AMPERE_HOURS,
VOLT_AMPERE_REACTIVE_HOURS, WATT_HOURS_BY_WATT_PEAK, CUMULATED_WATT_HOURS, BAR, MILLIBAR -> //
VOLT_AMPERE_REACTIVE_HOURS, WATT_HOURS_BY_WATT_PEAK, CUMULATED_WATT_HOURS, BAR, MILLIBAR, TENTHOUSANDTH,
DEZIAMPERE, DEZIVOLT -> //
value + " " + this.symbol;

case ON_OFF -> //
Expand Down
11 changes: 11 additions & 0 deletions io.openems.common/src/io/openems/common/oem/OpenemsEdgeOem.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package io.openems.common.oem;

import io.openems.common.types.Tuple;

public interface OpenemsEdgeOem {

// NOTE: Following values are adopted from SunSpec "Common Model"
Expand Down Expand Up @@ -139,5 +141,14 @@ public record OAuthClientRegistration(String clientId, String clientSecret) {
public default OAuthClientRegistration getRabotChargeCredentials() {
return null;
}

/**
* Gets the OEM authorization for Battery.BMW.
*
* @return the value
*/
public default Tuple<String, String> getBmwBatteryAuth() {
return null;
}

}
18 changes: 18 additions & 0 deletions io.openems.common/src/io/openems/common/types/Tuple.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package io.openems.common.types;

public record Tuple<A, B>(A a, B b) {

/**
* Factory for a {@link Tuple}.
*
* @param <A> Type of a
* @param <B> Type of b
* @param a value a
* @param b value b
* @return a new Tuple
*/
public static <A, B> Tuple<A, B> of(A a, B b) {
return new Tuple<>(a, b);
}

}
4 changes: 3 additions & 1 deletion io.openems.edge.battery.bmw/bnd.bnd
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,10 @@ Bundle-Version: 1.0.0.${tstamp}
com.ghgande.j2mod,\
io.openems.common,\
io.openems.edge.battery.api,\
io.openems.edge.bridge.http,\
io.openems.edge.bridge.modbus,\
io.openems.edge.common
io.openems.edge.common,\
io.openems.edge.io.api,\

-testpath: \
${testpath}
Loading

0 comments on commit 923265e

Please sign in to comment.