-
Notifications
You must be signed in to change notification settings - Fork 423
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**This fixes a critical bug in Time-of-Use-Tariff Optimizer in https://github.com/OpenEMS/openems/releases/tag/2025.2.0** * Edge * AppCenter: Fix selecting relays - added filter for initial check if an app can be installed based on available relays (CheckRelayCountFilters.deviceHardware) - properly handle selecting multiple relays (array value) - moved required setting to right places - added missing options hint in SelectGroupBuilder if none are available - only apply modal of safe input when confirmed * ToU Optimizer: fix BALANCING fallback schedule - A endless loop causes fallback schedule. Bug became visible after recently added null-check - Copied logic from new Optimizer.java: src/branch/develop/io.openems.edge.energy/src/io/openems/edge/energy/optimizer/Optimizer.java#L198-L202 * EVCS: new PhaseRotation which supports better Modbus handling - Native EVCS support for PhaseRotation - switched nature enum `PhaseRotation` to a new format - added method `Evcs.getPhaseRotation()` (BREAKING CHANGE) - applied code cleanup * JsonSerializer: improved serialization - added tests - added StringParser of e. g. UUID, SemanticVersion, ChannelAddress, .... - added number parsing - added polymorphic parsing for subclasses of one type - added boolean parsing - EmptyObject to reduce duplicated empty request/response - added nullable paths for every type - added primitive path with strict parsing - updated a lot of json rpc methods * UI * History consumption chart non deprecated evcs not taken into account for total consumption - in history chart "consumption". Ensure that non deprecatedEvcs (new implementations) are not added to "sonstiger Verbrauch" - if deprecatedEvcs is not implemented (chargepower channel nature) then it is added to consumption metered
- Loading branch information
1 parent
a85f5d6
commit cd0ffd1
Showing
187 changed files
with
11,683 additions
and
991 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
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
12 changes: 12 additions & 0 deletions
12
io.openems.common/src/io/openems/common/jsonrpc/serialization/BooleanPath.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,12 @@ | ||
package io.openems.common.jsonrpc.serialization; | ||
|
||
public interface BooleanPath extends JsonPath { | ||
|
||
/** | ||
* Gets the boolean value of the current path. | ||
* | ||
* @return the value | ||
*/ | ||
public boolean get(); | ||
|
||
} |
45 changes: 45 additions & 0 deletions
45
io.openems.common/src/io/openems/common/jsonrpc/serialization/BooleanPathActual.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,45 @@ | ||
package io.openems.common.jsonrpc.serialization; | ||
|
||
public final class BooleanPathActual { | ||
|
||
public static final class BooleanPathActualNonNull implements BooleanPath { | ||
|
||
private final boolean value; | ||
|
||
public BooleanPathActualNonNull(boolean value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public boolean get() { | ||
return this.value; | ||
} | ||
|
||
} | ||
|
||
public static final class BooleanPathActualNullable implements BooleanPathNullable { | ||
|
||
private final Boolean value; | ||
|
||
public BooleanPathActualNullable(Boolean value) { | ||
super(); | ||
this.value = value; | ||
} | ||
|
||
@Override | ||
public boolean isPresent() { | ||
return this.value != null; | ||
} | ||
|
||
@Override | ||
public Boolean getOrNull() { | ||
return this.value; | ||
} | ||
|
||
} | ||
|
||
private BooleanPathActual() { | ||
} | ||
|
||
} |
43 changes: 43 additions & 0 deletions
43
io.openems.common/src/io/openems/common/jsonrpc/serialization/BooleanPathDummy.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,43 @@ | ||
package io.openems.common.jsonrpc.serialization; | ||
|
||
import com.google.gson.JsonElement; | ||
|
||
public final class BooleanPathDummy { | ||
|
||
public static final class BooleanPathDummyNonNull implements BooleanPath, JsonPathDummy { | ||
|
||
@Override | ||
public boolean get() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public JsonElement buildPath() { | ||
return JsonPrimitivePathDummy.buildPath("boolean", false); | ||
} | ||
|
||
} | ||
|
||
public static final class BooleanPathDummyNullable implements BooleanPathNullable, JsonPathDummy { | ||
|
||
@Override | ||
public boolean isPresent() { | ||
return false; | ||
} | ||
|
||
@Override | ||
public Boolean getOrNull() { | ||
return null; | ||
} | ||
|
||
@Override | ||
public JsonElement buildPath() { | ||
return JsonPrimitivePathDummy.buildPath("boolean", true); | ||
} | ||
|
||
} | ||
|
||
private BooleanPathDummy() { | ||
} | ||
|
||
} |
Oops, something went wrong.