Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[dsmr] Add support for capacity tariff for Belgium #15038

Merged
merged 9 commits into from
Mar 12, 2024
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
*
* @author M. Volaart - Initial contribution
* @author Hilbrand Bouwkamp - Cosem subclasses made into factory classes and introduced quantity type
* @author Lennert Coopman - Added capacity tariff channels for Belgium: actual and current month
*/
@NonNullByDefault
public enum CosemObjectType {
Expand Down Expand Up @@ -69,6 +70,8 @@ public enum CosemObjectType {
EMETER_TARIFF_INDICATOR(new OBISIdentifier(0, 96, 14, 0), CosemString.INSTANCE),
EMETER_ACTIVE_IMPORT_POWER(new OBISIdentifier(1, 15, 7, 0), CosemQuantity.WATT),
EMETER_ACTUAL_DELIVERY(new OBISIdentifier(1, 1, 7, 0), CosemQuantity.KILO_WATT),
EMETER_ACTUAL_DEMAND(new OBISIdentifier(1, 1, 4, 0), CosemQuantity.KILO_WATT),
EMETER_MAXIMUM_DEMAND_CURRENT_MONTH(new OBISIdentifier(1, 1, 6, 0), CosemDate.INSTANCE, CosemQuantity.KILO_WATT),
EMETER_ACTUAL_PRODUCTION(new OBISIdentifier(1, 2, 7, 0), CosemQuantity.KILO_WATT),
EMETER_TRESHOLD_A_V2_1(new OBISIdentifier(1, 17, 0, 0), CosemQuantity.AMPERE),
EMETER_TRESHOLD_A(new OBISIdentifier(0, 17, 0, 0, true), CosemQuantity.AMPERE),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
* Supported meters
*
* @author M. Volaart - Initial contribution
* @author Lennert Coopman - Added capacity tariff channels for Belgium: actual and current month
*/
@NonNullByDefault
public enum DSMRMeterType {
Expand Down Expand Up @@ -341,7 +342,8 @@ public enum DSMRMeterType {
CosemObjectType.EMETER_INSTANT_POWER_PRODUCTION_L2, CosemObjectType.EMETER_INSTANT_POWER_PRODUCTION_L3,
CosemObjectType.EMETER_INSTANT_CURRENT_L1, CosemObjectType.EMETER_INSTANT_CURRENT_L2,
CosemObjectType.EMETER_INSTANT_CURRENT_L3, CosemObjectType.EMETER_INSTANT_VOLTAGE_L1,
CosemObjectType.EMETER_INSTANT_VOLTAGE_L2, CosemObjectType.EMETER_INSTANT_VOLTAGE_L3
CosemObjectType.EMETER_INSTANT_VOLTAGE_L2, CosemObjectType.EMETER_INSTANT_VOLTAGE_L3,
CosemObjectType.EMETER_ACTUAL_DEMAND, CosemObjectType.EMETER_MAXIMUM_DEMAND_CURRENT_MONTH
}),

/** Belgium Smart Gas Meter for the e-MUCS specification */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@
<channel id="emeter_instant_voltage_l1" typeId="instantVoltageL1Type"/>
<channel id="emeter_instant_voltage_l2" typeId="instantVoltageL2Type"/>
<channel id="emeter_instant_voltage_l3" typeId="instantVoltageL3Type"/>
<channel id="emeter_actual_demand" typeId="actualDeliveryType"/>
<channel id="emeter_maximum_demand_current_month" typeId="actualDeliveryType"/>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should create a specific channel type in the channeltypes_electricity.xml. The way it's done here means in the user interface the user will see 3 times the same channel label and not be able to distinguish from the label what the channel is for.

Also put the channels in logical position in the list of channels, and not just add them add the end of the list of channels. For example after the emeter_actual_production channel.

The emeter_maximum_demand_current_month also as a timestamp. You could also add this as a channel. (Same channel name with _timestamp appended: emeter_maximum_demand_current_month_timestamp)

</channels>
<config-description-ref uri="thing-type:dsmr:meterdescriptor"/>
</thing-type>
Expand Down