-
Notifications
You must be signed in to change notification settings - Fork 432
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement Eastron SDM120 meter & update existing SDM360 (#2554)
Co-authored-by: Hans Krämer <[email protected]> Co-authored-by: Stefan Feilmeier <[email protected]>
- Loading branch information
1 parent
021e674
commit 49c8e94
Showing
21 changed files
with
471 additions
and
35 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
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...nems.edge.meter.microcare.sdm630/.project → io.openems.edge.meter.eastron/.project
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
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
...enems.edge.meter.microcare.sdm630/bnd.bnd → io.openems.edge.meter.eastron/bnd.bnd
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
Binary file not shown.
File renamed without changes.
9 changes: 6 additions & 3 deletions
9
...s.edge.meter.microcare.sdm630/readme.adoc → io.openems.edge.meter.eastron/readme.adoc
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 |
---|---|---|
@@ -1,8 +1,11 @@ | ||
= Microcare SDM 630 Meter | ||
= Eastron/Microcare SDM 630 and 120 Meter | ||
|
||
This implementation is functionally compatible with a number of energy meters with the name "SDM 630". | ||
This implementation is functionally compatible with a number of energy meters with the names: | ||
|
||
- SDM 630 and | ||
- SDM 120 | ||
Implemented Natures: | ||
- ElectricityMeter | ||
|
||
https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.meter.microcare.sdm630[Source Code icon:github[]] | ||
https://github.com/OpenEMS/openems/tree/develop/io.openems.edge.meter.eastron[Source Code icon:github[]] |
41 changes: 41 additions & 0 deletions
41
io.openems.edge.meter.eastron/src/io/openems/edge/meter/eastron/sdm120/Config.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,41 @@ | ||
package io.openems.edge.meter.eastron.sdm120; | ||
|
||
import org.osgi.service.metatype.annotations.AttributeDefinition; | ||
import org.osgi.service.metatype.annotations.ObjectClassDefinition; | ||
|
||
import io.openems.edge.meter.api.MeterType; | ||
import io.openems.edge.meter.api.SinglePhase; | ||
|
||
@ObjectClassDefinition(name = "Meter Eastron SDM 120", // | ||
description = "Implements the Eastron SDM120 meter.") | ||
@interface Config { | ||
|
||
@AttributeDefinition(name = "Component-ID", description = "Unique ID of this Component") | ||
String id() default "meter0"; | ||
|
||
@AttributeDefinition(name = "Alias", description = "Human-readable name of this Component; defaults to Component-ID") | ||
String alias() default ""; | ||
|
||
@AttributeDefinition(name = "Is enabled?", description = "Is this Component enabled?") | ||
boolean enabled() default true; | ||
|
||
@AttributeDefinition(name = "Meter-Type", description = "Grid (default), Production, Consumption") | ||
MeterType type() default MeterType.GRID; | ||
|
||
@AttributeDefinition(name = "Modbus-ID", description = "ID of Modbus bridge.") | ||
String modbus_id() default "modbus0"; | ||
|
||
@AttributeDefinition(name = "Modbus Unit-ID", description = "The Unit-ID of the Modbus device.") | ||
int modbusUnitId() default 1; | ||
|
||
@AttributeDefinition(name = "Invert Power", description = "Inverts ALL Power values, inverts current values, swaps production and consumption energy, i.e. Power is multiplied with -1.") | ||
boolean invert() default false; | ||
|
||
@AttributeDefinition(name = "Phase", description = "Which Phase is this Meter connected to?") | ||
SinglePhase phase() default SinglePhase.L1; | ||
|
||
@AttributeDefinition(name = "Modbus target filter", description = "This is auto-generated by 'Modbus-ID'.") | ||
String Modbus_target() default "(enabled=true)"; | ||
|
||
String webconsole_configurationFactory_nameHint() default "Meter Eastron SDM 120 [{id}]"; | ||
} |
32 changes: 32 additions & 0 deletions
32
...enems.edge.meter.eastron/src/io/openems/edge/meter/eastron/sdm120/MeterEastronSdm120.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,32 @@ | ||
package io.openems.edge.meter.eastron.sdm120; | ||
|
||
import io.openems.common.channel.Unit; | ||
import io.openems.common.types.OpenemsType; | ||
import io.openems.edge.common.channel.Doc; | ||
import io.openems.edge.common.component.OpenemsComponent; | ||
import io.openems.edge.common.modbusslave.ModbusSlave; | ||
import io.openems.edge.meter.api.ElectricityMeter; | ||
import io.openems.edge.meter.api.SinglePhaseMeter; | ||
|
||
public interface MeterEastronSdm120 extends SinglePhaseMeter, ElectricityMeter, OpenemsComponent, ModbusSlave { | ||
|
||
public enum ChannelId implements io.openems.edge.common.channel.ChannelId { | ||
REACTIVE_PRODUCTION_ENERGY(Doc.of(OpenemsType.INTEGER) // | ||
.unit(Unit.VOLT_AMPERE_REACTIVE_HOURS)), // | ||
REACTIVE_CONSUMPTION_ENERGY(Doc.of(OpenemsType.INTEGER) // | ||
.unit(Unit.VOLT_AMPERE_REACTIVE_HOURS)), // | ||
; | ||
|
||
private final Doc doc; | ||
|
||
private ChannelId(Doc doc) { | ||
this.doc = doc; | ||
} | ||
|
||
@Override | ||
public Doc doc() { | ||
return this.doc; | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.