Skip to content

Commit 5e7d18c

Browse files
authored
Introduce ElectricityMeter as replacement for SymmetricMeter & AsymmetricMeter (OpenEMS#2144)
Distinguishing between `SymmetricMeter` and `AsymmetricMeter` and having `AsymmetricMeter extends SymmetricMeter` did never really make sense physically. In fact the _asymmetric_ meter (i.e. the three-phase meter) is the _most normal_ case. Special cases are: - a _symmetric_ meter, i.e. one that has the same values on all phases; this can be handled entirely by deriving the individual phase values from the sum values, via dividing the power by three. - a _single-phase_ meter, i.e. one that only has values on one phase. This requires active configuration and then allows setting the other phases to zero. The `SinglePhaseMeter` Nature is kept, because it allows a use-case when UI should really only show one value for these devices. The special cases can be represented properly by this newly introduced `ElectricityMeter`, which combines most of the Channels and replaces SymmetricMeter and AsymmetricMeter entirely. It also clearly distinguishes _electricity meters_ from _heat meters_ that are slowly coming to OpenEMS. This PR includes: - Replace SymmetricMeter and AsymmetricMeter - Breaking: - Renamed Meter.Virtual.Asymmetric.Add -> Meter.Virtual.Add - Dropped Meter.Virtual.Symmetric.Add - Renamed Meter.Virtual.Symmetric.Subtract -> Meter.Virtual.Subtract - Simulator Grid Meter Reacting: add Voltage and Current sum and per phase for better testing - UI fixes - show negative current per phase - fix translation issues It also tries to clarify the sometimes confusing representation of positive and negative values for Power and Current. See the Javadoc in ElectricityMeter and the discussion at https://community.openems.io/t/change-energy-channel-assignment-based-on-meter-type/1603/6. As this PR touches a lot of files, it is kept as small, simple and non-breaking as possible. Follow-up PRs will add more features,
1 parent 0d6e3f2 commit 5e7d18c

File tree

238 files changed

+3366
-4039
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+3366
-4039
lines changed

doc/modules/ROOT/pages/coreconcepts.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ To group these similar devices and services, OpenEMS defines "Natures" as sets o
106106
That is, a Nature extends a normal Java interface with channels.
107107

108108
Examples of abstracting physical devices using Natures are:
109-
- "SymmetricMeter" for power meters
109+
- "ElectricityMeter" for electricity meters
110110
- "SymmetricEss" for symmetric battery energy storage systems
111111
- "Evcs" for electric vehicle charging stations.
112112

doc/modules/ROOT/pages/edge/implement.adoc

+16-16
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,16 @@ Afterwards adjust the following content in the template `MeterSimulatedImpl.Java
202202
configurationPolicy = ConfigurationPolicy.REQUIRE //
203203
)
204204
----
205-
. Make the class implement the `SymmetricMeter` nature:
205+
. Make the class implement the `ElectricityMeter` nature:
206206
+
207207
[source,java]
208208
----
209-
public class MeterSimulatedImpl extends AbstractOpenemsModbusComponent implements MeterSimulated, SymmetricMeter, OpenemsComponent, ModbusComponent {
209+
public class MeterSimulatedImpl extends AbstractOpenemsModbusComponent implements MeterSimulated, ElectricityMeter, OpenemsComponent, ModbusComponent {
210210
----
211-
. Eclipse will underline `SymmetricMeter` and show you the error *SymmetricMeter cannot be resolved to a type*. Resolve it by importing adding an `import io.openems.edge.meter.api.SymmetricMeter;`.
211+
. Eclipse will underline `ElectricityMeter` and show the error *ElectricityMeter cannot be resolved to a type*. Resolve it by adding the line `import io.openems.edge.meter.api.ElectricityMeter;` to the import section of the file.
212212
+
213-
NOTE: The easiest way to fix these kind of import errors is to to selecto btn:[Source] → btn:[Organize Imports] in the menu or simply press btn:[Ctrl] + btn:[Shift] + btn:[o]. Alternatively click the 'error light bulb' next to the line with the error and select btn:[Import 'SymmetricMeter' (io.openems.edge.meter.api)].
214-
. Eclipse still complains and now underlines the class name `MeterSimulated` with the error *The type MeterSimulated must implement the inherited abstract method SymmetricMeter.getMeterType()*. Resolve it by adding an implementation of the `getMeterType()` method:
213+
NOTE: The easiest way to fix these kind of import errors is to select btn:[Source] → btn:[Organize Imports] in the menu or simply press btn:[Ctrl] + btn:[Shift] + btn:[o]. Alternatively click the 'light bulb' next to the line with the error and select btn:[Import 'ElectricityMeter' (io.openems.edge.meter.api)].
214+
. Eclipse still complains and now underlines the class name `MeterSimulated` with the error *The type MeterSimulated must implement the inherited abstract method ElectricityMeter.getMeterType()*. Resolve it by adding an implementation of the `getMeterType()` method:
215215
+
216216
[source,java]
217217
----
@@ -220,14 +220,14 @@ public MeterType getMeterType() {
220220
return this.config.type();
221221
}
222222
----
223-
. Tell the OpenEMS framework that `MeterSimulated` provides the SymmetricMeter *Channels*, by adjusting the constructor:
223+
. Tell the OpenEMS framework that `MeterSimulated` provides the ElectricityMeter *Channels*, by adjusting the constructor:
224224
+
225225
[source,java]
226226
----
227227
public MeterSimulatedImpl() {
228228
super(//
229229
OpenemsComponent.ChannelId.values(), //
230-
SymmetricMeter.ChannelId.values(), //
230+
ElectricityMeter.ChannelId.values(), //
231231
ModbusComponent.ChannelId.values(), //
232232
MeterSimulated.ChannelId.values() //
233233
);
@@ -252,7 +252,7 @@ with
252252
protected ModbusProtocol defineModbusProtocol() throws OpenemsException {
253253
return new ModbusProtocol(this, //
254254
new FC3ReadRegistersTask(1000, Priority.HIGH,
255-
m(SymmetricMeter.ChannelId.ACTIVE_POWER, new SignedWordElement(1000))));
255+
m(ElectricityMeter.ChannelId.ACTIVE_POWER, new SignedWordElement(1000))));
256256
}
257257
----
258258
+
@@ -293,8 +293,8 @@ import io.openems.edge.bridge.modbus.api.task.FC3ReadRegistersTask;
293293
import io.openems.edge.common.channel.Doc;
294294
import io.openems.edge.common.component.OpenemsComponent;
295295
import io.openems.edge.common.taskmanager.Priority;
296+
import io.openems.edge.meter.api.ElectricityMeter;
296297
import io.openems.edge.meter.api.MeterType;
297-
import io.openems.edge.meter.api.SymmetricMeter;
298298
299299
@Designate(ocd = Config.class, factory = true) // <1>
300300
@Component(// <2>
@@ -303,14 +303,14 @@ import io.openems.edge.meter.api.SymmetricMeter;
303303
configurationPolicy = ConfigurationPolicy.REQUIRE // <5>
304304
)
305305
public class MeterSimulatedImpl extends AbstractOpenemsModbusComponent // <6>
306-
implements MeterSimulated, SymmetricMeter, OpenemsComponent, ModbusComponent { // <7>
306+
implements MeterSimulated, ElectricityMeter, OpenemsComponent, ModbusComponent { // <7>
307307
308308
private Config config = null;
309309
310310
public MeterSimulatedImpl() {
311311
super(// <8>
312312
OpenemsComponent.ChannelId.values(), //
313-
SymmetricMeter.ChannelId.values(), //
313+
ElectricityMeter.ChannelId.values(), //
314314
ModbusComponent.ChannelId.values(), //
315315
MeterSimulated.ChannelId.values() //
316316
);
@@ -341,7 +341,7 @@ public class MeterSimulatedImpl extends AbstractOpenemsModbusComponent // <6>
341341
protected ModbusProtocol defineModbusProtocol() throws OpenemsException { // <13>
342342
return new ModbusProtocol(this, // <14>
343343
new FC3ReadRegistersTask(1000, Priority.HIGH, // <15>
344-
m(SymmetricMeter.ChannelId.ACTIVE_POWER, new SignedWordElement(1000)))); // <16>
344+
m(ElectricityMeter.ChannelId.ACTIVE_POWER, new SignedWordElement(1000)))); // <16>
345345
}
346346
347347
@Override
@@ -364,7 +364,7 @@ public class MeterSimulatedImpl extends AbstractOpenemsModbusComponent // <6>
364364
+
365365
NOTE: If the device was using another protocol, it is advisable to use the *AbstractOpenemsComponent* class as a convenience layer instead of implementing everything required by the *OpenemsComponent* interface manually.
366366
<7> The class implements *OpenemsComponent*. This makes it an xref:coreconcepts.adoc#_openems_component[OpenEMS Component].
367-
The Device that we are is a *SymmetricMeter*. We already defined the required Channels in the _initializeChannels()_ method. Additionally the Component also needs to implement the Nature interface.
367+
The Device that we are implementing is an *ElectricityMeter*. We already defined the required Channels in the _initializeChannels()_ method. Additionally the Component also needs to implement the Nature interface.
368368
+
369369
NOTE: In plain Java it is not required to add `implements OpenemsComponent` if we inherit from 'AbstractOpenemsComponent' or 'AbstractOpenemsModbusComponent'. Be aware that for OSGi dependency injection to function properly, it is still required to mention all implemented interfaces again, as it is not considering the complete inheritance tree.
370370
+
@@ -374,7 +374,7 @@ NOTE: In plain Java it is not required to add `implements OpenemsComponent` if w
374374
- This enum is empty, as we do not have custom Channels here.
375375
- ChannelId enums require a Doc object that provides meta information about the Channel - e.g. the above ACTIVE_POWER Channel is defined as `ACTIVE_POWER(new Doc().type(OpenemsType.INTEGER).unit(Unit.WATT)`
376376
====
377-
<8> We call the constructor of the super class (`AbstractOpenemsModbusComponent`/`AbstractOpenemsComponent`) to initialize the Channels of the Component. It is important to list all ChannelId-Enums of all implemented Natures. The call takes the *ChannelId* declarations and creates a Channel instance for each of them; e.g. for the `SymmetricMeter.ACTIVE_POWER` ChannelId, an object instance of `IntegerReadChannel` is created that represents the Channel.
377+
<8> We call the constructor of the super class (`AbstractOpenemsModbusComponent`/`AbstractOpenemsComponent`) to initialize the Channels of the Component. It is important to list all ChannelId-Enums of all implemented Natures. The call takes the *ChannelId* declarations and creates a Channel instance for each of them; e.g. for the `ElectricityMeter.ACTIVE_POWER` ChannelId, an object instance of `IntegerReadChannel` is created that represents the Channel.
378378
<9> The `super.activate()` method requires an instance of *ConfigurationAdmin* as a parameter. Using the *@Reference* annotation the OSGi framework is going to provide the ConfigurationAdmin service via dependency injection.
379379
<10> The Component utilizes an external Modbus Component (the _Modbus Bridge_) for the actual Modbus communication. We receive an instance of this service via dependency injection (like we did already for the _ConfigurationAdmin_ service). Most of the magic is handled by the _AbstractOpenemsModbusComponent_ implementation, but the way the OSGi framework works, we need to define the _@Reference_ explicitly here in the actual implementation of the component and call the parent `setModbus()` method.
380380
<11> The *activate()* method (marked by the *@Activate* annotation) is called on activation of an object instance of this Component. It comes with a ComponentContext and an instance of a configuration in the form of a Config object. All logic for activating and deactivating the OpenEMS Component is hidden in the super classes and just needs to be called from here.
@@ -384,7 +384,7 @@ NOTE: In plain Java it is not required to add `implements OpenemsComponent` if w
384384
<15> *FC3ReadRegistersTask* is an implementation of Modbus http://www.simplymodbus.ca/FC03.htm[function code 3 "Read Holding Registers" icon:external-link[]]. Its first parameter is the start address of the register block. The second parameter is a priority information that defines how often this register block needs to be queried. Following parameters are an arbitrary number of *ModbusElements*.
385385
+
386386
NOTE: Most Modbus function codes are available by their respective _FC*_ implementation classes.
387-
<16> Here the internal *m()* method is used to make a simple 1-to-1 mapping between the Modbus element at address `1000` and the Channel _SymmetricMeter.ChannelId.ACTIVE_POWER_. The Modbus element is defined as a 16 bit word element with an signed integer value.
387+
<16> Here the internal *m()* method is used to make a simple 1-to-1 mapping between the Modbus element at address `1000` and the Channel _ElectricityMeter.ChannelId.ACTIVE_POWER_. The Modbus element is defined as a 16 bit word element with an signed integer value.
388388
+
389389
[NOTE]
390390
====
@@ -393,7 +393,7 @@ NOTE: Most Modbus function codes are available by their respective _FC*_ impleme
393393
- For more advanced channel-to-element mapping functionalities the internal *cm()* method can be used - e.g. to map one Modbus element to multiple Channels.
394394
+
395395
Using this principle a complete Modbus table consisting of multiple register blocks that need to be read or written with different Modbus function codes can be defined. For details have a look at the existing implementation classes inside the Modbus Bridge source code.
396-
<17> The SymmetricMeter Nature requires us to provide a *MeterType* via a `MeterType getMeterType()` method. The MeterType is provided by the Config.
396+
<17> The ElectricityMeter Nature requires us to provide a *MeterType* via a `MeterType getMeterType()` method. The MeterType is provided by the Config.
397397
<18> Finally it is always a good idea to define a *debugLog()* method. This method is called in each cycle by the *Controller.Debug.Log* and very helpful for continuous debugging.
398398
====
399399

io.openems.edge.batteryinverter.sunspec/readme.adoc

-4
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,4 @@ Generic implementation of SunSpec PV inverters. It is tested with
44
- KACO blueplanet TL.3 series
55
- SolarEdge SE12.5K - SE27.6K
66

7-
Implemented Natures::
8-
- ManagedSymmetricPvInverter
9-
- SymmetricMeter
10-
117
https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.pvinverter.sunspec[Source Code icon:github[]]

io.openems.edge.bosch.bpts5hybrid/src/io/openems/edge/bosch/bpts5hybrid/meter/BoschBpts5HybridMeter.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
import io.openems.edge.common.channel.Doc;
44
import io.openems.edge.common.component.OpenemsComponent;
5-
import io.openems.edge.meter.api.SymmetricMeter;
5+
import io.openems.edge.meter.api.ElectricityMeter;
66

7-
public interface BoschBpts5HybridMeter extends SymmetricMeter, OpenemsComponent {
7+
public interface BoschBpts5HybridMeter extends ElectricityMeter, OpenemsComponent {
88

99
public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
1010
;

io.openems.edge.bosch.bpts5hybrid/src/io/openems/edge/bosch/bpts5hybrid/meter/BoschBpts5HybridMeterImpl.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
import io.openems.edge.common.component.AbstractOpenemsComponent;
2323
import io.openems.edge.common.component.OpenemsComponent;
2424
import io.openems.edge.common.event.EdgeEventConstants;
25+
import io.openems.edge.meter.api.ElectricityMeter;
2526
import io.openems.edge.meter.api.MeterType;
26-
import io.openems.edge.meter.api.SymmetricMeter;
2727

2828
@Designate(ocd = Config.class, factory = true)
2929
@Component(//
@@ -35,7 +35,7 @@
3535
EdgeEventConstants.TOPIC_CYCLE_EXECUTE_WRITE, //
3636
})
3737
public class BoschBpts5HybridMeterImpl extends AbstractOpenemsComponent
38-
implements BoschBpts5HybridMeter, SymmetricMeter, OpenemsComponent {
38+
implements BoschBpts5HybridMeter, ElectricityMeter, OpenemsComponent {
3939

4040
@Reference(policy = ReferencePolicy.STATIC, policyOption = ReferencePolicyOption.GREEDY, cardinality = ReferenceCardinality.MANDATORY)
4141
private BoschBpts5HybridCore core;
@@ -46,7 +46,7 @@ public class BoschBpts5HybridMeterImpl extends AbstractOpenemsComponent
4646
public BoschBpts5HybridMeterImpl() {
4747
super(//
4848
OpenemsComponent.ChannelId.values(), //
49-
SymmetricMeter.ChannelId.values(), //
49+
ElectricityMeter.ChannelId.values(), //
5050
BoschBpts5HybridMeter.ChannelId.values() //
5151
);
5252
}

io.openems.edge.common/src/io/openems/edge/common/sum/Sum.java

+17-17
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
156156
* Grid: Active Power.
157157
*
158158
* <ul>
159-
* <li>Interface: Sum (origin: SymmetricMeter))
159+
* <li>Interface: Sum (origin: ElectricityMeter))
160160
* <li>Type: Integer
161161
* <li>Unit: W
162162
* <li>Range: negative values for Consumption (power that is 'leaving the
@@ -173,7 +173,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
173173
* Grid: Active Power L1.
174174
*
175175
* <ul>
176-
* <li>Interface: Sum (origin: SymmetricMeter / AsymmetricMeter)
176+
* <li>Interface: Sum (origin: ElectricityMeter)
177177
* <li>Type: Integer
178178
* <li>Unit: W
179179
* <li>Range: negative values for Consumption (power that is 'leaving the
@@ -190,7 +190,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
190190
* Grid: Active Power L2.
191191
*
192192
* <ul>
193-
* <li>Interface: Sum (origin: SymmetricMeter / AsymmetricMeter)
193+
* <li>Interface: Sum (origin: ElectricityMeter)
194194
* <li>Type: Integer
195195
* <li>Unit: W
196196
* <li>Range: negative values for Consumption (power that is 'leaving the
@@ -207,7 +207,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
207207
* Grid: Active Power L3.
208208
*
209209
* <ul>
210-
* <li>Interface: Sum (origin: SymmetricMeter / AsymmetricMeter)
210+
* <li>Interface: Sum (origin: ElectricityMeter)
211211
* <li>Type: Integer
212212
* <li>Unit: W
213213
* <li>Range: negative values for Consumption (power that is 'leaving the
@@ -224,7 +224,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
224224
* Grid: Minimum Ever Active Power.
225225
*
226226
* <ul>
227-
* <li>Interface: Sum (origin: SymmetricMeter))
227+
* <li>Interface: Sum (origin: ElectricityMeter))
228228
* <li>Type: Integer
229229
* <li>Unit: W
230230
* <li>Range: negative values or '0'
@@ -237,7 +237,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
237237
* Grid: Maximum Ever Active Power.
238238
*
239239
* <ul>
240-
* <li>Interface: Sum (origin: SymmetricMeter)
240+
* <li>Interface: Sum (origin: ElectricityMeter)
241241
* <li>Type: Integer
242242
* <li>Unit: W
243243
* <li>Range: positive values or '0'
@@ -250,7 +250,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
250250
* Production: Active Power.
251251
*
252252
* <ul>
253-
* <li>Interface: Sum (origin: SymmetricMeter and ESS DC Charger)
253+
* <li>Interface: Sum (origin: ElectricityMeter and ESS DC Charger)
254254
* <li>Type: Integer
255255
* <li>Unit: W
256256
* <li>Range: should be only positive
@@ -264,7 +264,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
264264
* Production: AC Active Power.
265265
*
266266
* <ul>
267-
* <li>Interface: Sum (origin: SymmetricMeter)
267+
* <li>Interface: Sum (origin: ElectricityMeter)
268268
* <li>Type: Integer
269269
* <li>Unit: W
270270
* <li>Range: should be only positive
@@ -278,7 +278,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
278278
* Production: AC Active Power L1.
279279
*
280280
* <ul>
281-
* <li>Interface: Sum (origin: SymmetricMeter / AsymmetricMeter)
281+
* <li>Interface: Sum (origin: ElectricityMeter)
282282
* <li>Type: Integer
283283
* <li>Unit: W
284284
* <li>Range: should be only positive
@@ -292,7 +292,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
292292
* Production: AC Active Power L2.
293293
*
294294
* <ul>
295-
* <li>Interface: Sum (origin: SymmetricMeter / AsymmetricMeter)
295+
* <li>Interface: Sum (origin: ElectricityMeter)
296296
* <li>Type: Integer
297297
* <li>Unit: W
298298
* <li>Range: should be only positive
@@ -306,7 +306,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
306306
* Production: AC Active Power L3.
307307
*
308308
* <ul>
309-
* <li>Interface: Sum (origin: SymmetricMeter / AsymmetricMeter)
309+
* <li>Interface: Sum (origin: ElectricityMeter)
310310
* <li>Type: Integer
311311
* <li>Unit: W
312312
* <li>Range: should be only positive
@@ -334,7 +334,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
334334
* Production: Maximum Ever Active Power.
335335
*
336336
* <ul>
337-
* <li>Interface: Sum (origin: SymmetricMeter))
337+
* <li>Interface: Sum (origin: ElectricityMeter))
338338
* <li>Type: Integer
339339
* <li>Unit: W
340340
* <li>Range: positive values or '0'
@@ -347,7 +347,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
347347
* Production: Maximum Ever AC Active Power.
348348
*
349349
* <ul>
350-
* <li>Interface: Sum (origin: SymmetricMeter))
350+
* <li>Interface: Sum (origin: ElectricityMeter))
351351
* <li>Type: Integer
352352
* <li>Unit: W
353353
* <li>Range: positive values or '0'
@@ -518,7 +518,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
518518
* Grid: Buy-from-grid Energy ("Production").
519519
*
520520
* <ul>
521-
* <li>Interface: Sum (origin: SymmetricMeter)
521+
* <li>Interface: Sum (origin: ElectricityMeter)
522522
* <li>Type: Integer
523523
* <li>Unit: Wh_Σ
524524
* </ul>
@@ -530,7 +530,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
530530
* Grid: Sell-to-grid Energy ("Consumption").
531531
*
532532
* <ul>
533-
* <li>Interface: Sum (origin: SymmetricMeter)
533+
* <li>Interface: Sum (origin: ElectricityMeter)
534534
* <li>Type: Long
535535
* <li>Unit: Wh_Σ
536536
* </ul>
@@ -553,7 +553,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
553553
* Production: AC Energy.
554554
*
555555
* <ul>
556-
* <li>Interface: Sum (origin: SymmetricMeter)
556+
* <li>Interface: Sum (origin: ElectricityMeter)
557557
* <li>Type: Long
558558
* <li>Unit: Wh_Σ
559559
* </ul>
@@ -577,7 +577,7 @@ public enum ChannelId implements io.openems.edge.common.channel.ChannelId {
577577
* Consumption: Energy.
578578
*
579579
* <ul>
580-
* <li>Interface: Sum (origin: SymmetricMeter)
580+
* <li>Interface: Sum (origin: ElectricityMeter)
581581
* <li>Type: Long
582582
* <li>Unit: Wh_Σ
583583
* </ul>

io.openems.edge.controller.api.rest/readme.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ The `GET` api also understands regular expressions. Send a GET request to http:/
4343
"address":"pvInverter0/ActivePower",
4444
"type":"INTEGER",
4545
"accessMode":"RO",
46-
"text":"Negative values for Consumption; positive for Production",
46+
"text":"",
4747
"unit":"W",
4848
"value":90
4949
},
@@ -59,7 +59,7 @@ The `GET` api also understands regular expressions. Send a GET request to http:/
5959
"address":"meter0/ActivePower",
6060
"type":"INTEGER",
6161
"accessMode":"RO",
62-
"text":"Negative values for Consumption; positive for Production",
62+
"text":"",
6363
"unit":"W",
6464
"value":465
6565
},

io.openems.edge.controller.asymmetric.balancingcosphi/src/io/openems/edge/controller/asymmetric/balancingcosphi/ControllerAsymmetricBalancingCosPhiImpl.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
import io.openems.edge.ess.power.api.PowerException;
2525
import io.openems.edge.ess.power.api.Pwr;
2626
import io.openems.edge.ess.power.api.Relationship;
27-
import io.openems.edge.meter.api.AsymmetricMeter;
27+
import io.openems.edge.meter.api.ElectricityMeter;
2828

2929
@Designate(ocd = Config.class, factory = true)
3030
@Component(//
@@ -71,7 +71,7 @@ protected void deactivate() {
7171

7272
@Override
7373
public void run() throws OpenemsNamedException {
74-
AsymmetricMeter meter = this.componentManager.getComponent(this.meterId);
74+
ElectricityMeter meter = this.componentManager.getComponent(this.meterId);
7575
ManagedAsymmetricEss ess = this.componentManager.getComponent(this.essId);
7676

7777
this.addConstraint(ess, Phase.L1, meter.getActivePowerL1(), meter.getReactivePowerL1(), ess.getActivePowerL1(),

0 commit comments

Comments
 (0)