diff --git a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/java/org/opensmartgridplatform/dlms/objectconfig/DlmsObjectType.java b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/java/org/opensmartgridplatform/dlms/objectconfig/DlmsObjectType.java index 23137b43855..88bdba51719 100644 --- a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/java/org/opensmartgridplatform/dlms/objectconfig/DlmsObjectType.java +++ b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/java/org/opensmartgridplatform/dlms/objectconfig/DlmsObjectType.java @@ -57,9 +57,13 @@ public enum DlmsObjectType { AVERAGE_VOLTAGE_L3, NUMBER_OF_POWER_FAILURES, NUMBER_OF_LONG_POWER_FAILURES, + THRESHOLD_VOLTAGE_SAG, + TIME_THRESHOLD_VOLTAGE_SAG, NUMBER_OF_VOLTAGE_SAGS_FOR_L1, NUMBER_OF_VOLTAGE_SAGS_FOR_L2, NUMBER_OF_VOLTAGE_SAGS_FOR_L3, + THRESHOLD_VOLTAGE_SWELL, + TIME_THRESHOLD_VOLTAGE_SWELL, NUMBER_OF_VOLTAGE_SWELLS_FOR_L1, NUMBER_OF_VOLTAGE_SWELLS_FOR_L2, NUMBER_OF_VOLTAGE_SWELLS_FOR_L3, diff --git a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr22.json b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr22.json index b3cdccdcc84..42661a2ad1c 100644 --- a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr22.json +++ b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr22.json @@ -413,6 +413,66 @@ } ] }, + { + "tag": "THRESHOLD_VOLTAGE_SWELL", + "description": "Threshold for voltage swell ", + "class-id": 3, + "version": 0, + "obis": "1.0.12.35.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 253, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, V", + "access": "R" + } + ] + }, + { + "tag": "TIME_THRESHOLD_VOLTAGE_SWELL", + "description": "Time threshold for voltage swell", + "class-id": 3, + "version": 0, + "obis": "1.0.12.44.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 30, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, s", + "access": "R" + } + ] + }, { "tag": "NUMBER_OF_VOLTAGE_SWELLS_FOR_L1", "description": "Number of voltage swells in phase L1", @@ -479,6 +539,66 @@ } ] }, + { + "tag": "THRESHOLD_VOLTAGE_SAG", + "description": "Threshold for voltage sag", + "class-id": 3, + "version": 0, + "obis": "1.0.12.31.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 207, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, V", + "access": "R" + } + ] + }, + { + "tag": "TIME_THRESHOLD_VOLTAGE_SAG", + "description": "Time threshold for voltage sag ", + "class-id": 3, + "version": 0, + "obis": "1.0.12.43.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 30, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, s", + "access": "R" + } + ] + }, { "tag": "NUMBER_OF_VOLTAGE_SAGS_FOR_L1", "description": "Number of voltage sags in phase L1", diff --git a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr422.json b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr422.json index bd5cbfa95ba..b433f65b92f 100644 --- a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr422.json +++ b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-dsmr422.json @@ -606,6 +606,66 @@ } ] }, + { + "tag": "THRESHOLD_VOLTAGE_SWELL", + "description": "Threshold for voltage swell", + "class-id": 3, + "version": 0, + "obis": "1.0.12.35.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 253, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, V", + "access": "R" + } + ] + }, + { + "tag": "TIME_THRESHOLD_VOLTAGE_SWELL", + "description": "Time threshold for voltage swell", + "class-id": 3, + "version": 0, + "obis": "1.0.12.44.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 30, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, s", + "access": "R" + } + ] + }, { "tag": "NUMBER_OF_VOLTAGE_SWELLS_FOR_L1", "description": "Number of voltage swells in phase L1", @@ -687,6 +747,66 @@ } ] }, + { + "tag": "THRESHOLD_VOLTAGE_SAG", + "description": "Threshold for voltage sag", + "class-id": 3, + "version": 0, + "obis": "1.0.12.31.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 207, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, V", + "access": "R" + } + ] + }, + { + "tag": "TIME_THRESHOLD_VOLTAGE_SAG", + "description": "Time threshold for voltage sag ", + "class-id": 3, + "version": 0, + "obis": "1.0.12.43.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 30, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, s", + "access": "R" + } + ] + }, { "tag": "NUMBER_OF_VOLTAGE_SAGS_FOR_L1", "description": "Number of voltage sags in phase L1", diff --git a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-smr500.json b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-smr500.json index d22ddd5b5c0..44610095baa 100644 --- a/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-smr500.json +++ b/osgp/protocol-adapter-dlms/osgp-dlms/src/main/resources/dlmsprofiles/dlmsprofile-smr500.json @@ -1845,6 +1845,66 @@ } ] }, + { + "tag": "THRESHOLD_VOLTAGE_SAG", + "description": "Threshold for voltage sag", + "class-id": 3, + "version": 0, + "obis": "1.0.12.31.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 207, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, V", + "access": "R" + } + ] + }, + { + "tag": "TIME_THRESHOLD_VOLTAGE_SAG", + "description": "Time threshold for voltage sag ", + "class-id": 3, + "version": 0, + "obis": "1.0.12.43.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 60, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, s", + "access": "R" + } + ] + }, { "tag": "NUMBER_OF_VOLTAGE_SAGS_FOR_L1", "description": "Number of voltage sags in phase L1", @@ -1911,6 +1971,66 @@ } ] }, + { + "tag": "THRESHOLD_VOLTAGE_SWELL", + "description": "Threshold for voltage swell", + "class-id": 3, + "version": 0, + "obis": "1.0.12.35.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 253, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, V", + "access": "R" + } + ] + }, + { + "tag": "TIME_THRESHOLD_VOLTAGE_SWELL", + "description": "Time threshold for voltage swell", + "class-id": 3, + "version": 0, + "obis": "1.0.12.44.0.255", + "group": "ELECTRICITY", + "meterTypes": [ + "SP", + "PP" + ], + "attributes": [ + { + "id": 2, + "description": "value", + "datatype": "long-unsigned", + "valuetype": "SET_BY_CLIENT", + "value": 60, + "access": "RW" + }, + { + "id": 3, + "description": "scaler_unit", + "datatype": "scal_unit_type", + "valuetype": "FIXED_IN_PROFILE", + "value": "0, s", + "access": "R" + } + ] + }, { "tag": "NUMBER_OF_VOLTAGE_SWELLS_FOR_L1", "description": "Number of voltage swells in phase L1", diff --git a/osgp/protocol-adapter-dlms/osgp-dlms/src/test/java/org/opensmartgridplatform/dlms/services/Protocol.java b/osgp/protocol-adapter-dlms/osgp-dlms/src/test/java/org/opensmartgridplatform/dlms/services/Protocol.java index 415631a406f..3b32d633cab 100644 --- a/osgp/protocol-adapter-dlms/osgp-dlms/src/test/java/org/opensmartgridplatform/dlms/services/Protocol.java +++ b/osgp/protocol-adapter-dlms/osgp-dlms/src/test/java/org/opensmartgridplatform/dlms/services/Protocol.java @@ -11,13 +11,13 @@ @Getter public enum Protocol { - DSMR_2_2("DSMR", "2.2", 52, 2, 4, 6, 14, 0, 0, 0, 0, false, false), - DSMR_4_2_2("DSMR", "4.2.2", 94, 11, 27, 6, 14, 6, 13, 5, 6, true, false), - SMR_4_3("SMR", "4.3", 95, 11, 27, 6, 14, 6, 13, 6, 7, true, false), - SMR_5_0_0("SMR", "5.0.0", 116, 11, 27, 6, 14, 6, 15, 9, 14, true, true), - SMR_5_1("SMR", "5.1", 120, 11, 27, 6, 14, 6, 15, 9, 14, true, true), - SMR_5_2("SMR", "5.2", 159, 11, 27, 6, 14, 6, 15, 10, 15, true, true), - SMR_5_5("SMR", "5.5", 163, 11, 27, 6, 14, 6, 15, 10, 15, true, true); + DSMR_2_2("DSMR", "2.2", 56, 2, 4, 6, 14, 0, 0, 0, 0, false, false), + DSMR_4_2_2("DSMR", "4.2.2", 98, 11, 27, 6, 14, 6, 13, 5, 6, true, false), + SMR_4_3("SMR", "4.3", 99, 11, 27, 6, 14, 6, 13, 6, 7, true, false), + SMR_5_0_0("SMR", "5.0.0", 120, 11, 27, 6, 14, 6, 15, 9, 14, true, true), + SMR_5_1("SMR", "5.1", 124, 11, 27, 6, 14, 6, 15, 9, 14, true, true), + SMR_5_2("SMR", "5.2", 163, 11, 27, 6, 14, 6, 15, 10, 15, true, true), + SMR_5_5("SMR", "5.5", 167, 11, 27, 6, 14, 6, 15, 10, 15, true, true); private final String name; private final String version;