From a2b9fe5e3bda547bac91df264c6cd1289f786768 Mon Sep 17 00:00:00 2001 From: yada75 Date: Wed, 18 Jan 2023 19:31:39 +0100 Subject: [PATCH 1/5] Update obis_references.py --- dsmr_parser/obis_references.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/dsmr_parser/obis_references.py b/dsmr_parser/obis_references.py index b09252b..da3ae9b 100644 --- a/dsmr_parser/obis_references.py +++ b/dsmr_parser/obis_references.py @@ -12,11 +12,11 @@ ELECTRICITY_USED_TARIFF_1 = r'\d-\d:1\.8\.1.+?\r\n' ELECTRICITY_USED_TARIFF_2 = r'\d-\d:1\.8\.2.+?\r\n' ELECTRICITY_DELIVERED_TARIFF_1 = r'\d-\d:2\.8\.1.+?\r\n' ELECTRICITY_DELIVERED_TARIFF_2 = r'\d-\d:2\.8\.2.+?\r\n' -CURRENT_REACTIVE_EXPORTED = r'\d-\d:3\.7\.0.+?\r\n' +CURRENT_REACTIVE_IMPORTED = r'\d-\d:3\.7\.0.+?\r\n' ELECTRICITY_REACTIVE_IMPORTED_TOTAL = r'\d-\d:3\.8\.0.+?\r\n' ELECTRICITY_REACTIVE_IMPORTED_TARIFF_1 = r'\d-\d:3\.8\.1.+?\r\n' ELECTRICITY_REACTIVE_IMPORTED_TARIFF_2 = r'\d-\d:3\.8\.2.+?\r\n' -CURRENT_REACTIVE_IMPORTED = r'\d-\d:4\.7\.0.+?\r\n' +CURRENT_REACTIVE_EXPORTED = r'\d-\d:4\.7\.0.+?\r\n' ELECTRICITY_REACTIVE_EXPORTED_TOTAL = r'\d-\d:4\.8\.0.+?\r\n' ELECTRICITY_REACTIVE_EXPORTED_TARIFF_1 = r'\d-\d:4\.8\.1.+?\r\n' ELECTRICITY_REACTIVE_EXPORTED_TARIFF_2 = r'\d-\d:4\.8\.2.+?\r\n' @@ -48,6 +48,12 @@ INSTANTANEOUS_ACTIVE_POWER_L3_POSITIVE = r'\d-\d:61\.7\.0.+?\r\n' INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE = r'\d-\d:22\.7\.0.+?\r\n' INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE = r'\d-\d:42\.7\.0.+?\r\n' INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE = r'\d-\d:62\.7\.0.+?\r\n' +INSTANTANEOUS_REACTIVE_POWER_L1_POSITIVE = r'\d-\d:23\.7\.0.+?\r\n' +INSTANTANEOUS_REACTIVE_POWER_L1_NEGATIVE = r'\d-\d:24\.7\.0.+?\r\n' +INSTANTANEOUS_REACTIVE_POWER_L2_POSITIVE = r'\d-\d:43\.7\.0.+?\r\n' +INSTANTANEOUS_REACTIVE_POWER_L2_NEGATIVE = r'\d-\d:44\.7\.0.+?\r\n' +INSTANTANEOUS_REACTIVE_POWER_L3_POSITIVE = r'\d-\d:63\.7\.0.+?\r\n' +INSTANTANEOUS_REACTIVE_POWER_L3_NEGATIVE = r'\d-\d:64\.7\.0.+?\r\n' EQUIPMENT_IDENTIFIER_GAS = r'\d-\d:96\.1\.0.+?\r\n' # TODO differences between gas meter readings in v3 and lower and v4 and up HOURLY_GAS_METER_READING = r'\d-\d:24\.2\.1.+?\r\n' From 21b8547655e4ed5f5142a4c804b63117989964d6 Mon Sep 17 00:00:00 2001 From: yada75 Date: Wed, 18 Jan 2023 19:34:35 +0100 Subject: [PATCH 2/5] Update obis_name_mapping.py --- dsmr_parser/obis_name_mapping.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dsmr_parser/obis_name_mapping.py b/dsmr_parser/obis_name_mapping.py index 316e43a..7213262 100644 --- a/dsmr_parser/obis_name_mapping.py +++ b/dsmr_parser/obis_name_mapping.py @@ -44,6 +44,12 @@ EN = { obis.INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE: 'INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE', obis.INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE: 'INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE', obis.INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE: 'INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE', + obis.INSTANTANEOUS_REACTIVE_POWER_L1_POSITIVE: 'INSTANTANEOUS_REACTIVE_POWER_L1_POSITIVE', + obis.INSTANTANEOUS_REACTIVE_POWER_L1_NEGATIVE: 'INSTANTANEOUS_REACTIVE_POWER_L1_NEGATIVE', + obis.INSTANTANEOUS_REACTIVE_POWER_L2_POSITIVE: 'INSTANTANEOUS_REACTIVE_POWER_L2_POSITIVE', + obis.INSTANTANEOUS_REACTIVE_POWER_L2_NEGATIVE: 'INSTANTANEOUS_REACTIVE_POWER_L2_NEGATIVE', + obis.INSTANTANEOUS_REACTIVE_POWER_L3_POSITIVE: 'INSTANTANEOUS_REACTIVE_POWER_L3_POSITIVE', + obis.INSTANTANEOUS_REACTIVE_POWER_L3_NEGATIVE: 'INSTANTANEOUS_REACTIVE_POWER_L3_NEGATIVE', obis.EQUIPMENT_IDENTIFIER_GAS: 'EQUIPMENT_IDENTIFIER_GAS', obis.HOURLY_GAS_METER_READING: 'HOURLY_GAS_METER_READING', obis.GAS_METER_READING: 'GAS_METER_READING', From 142b7359a1cbb23758c6bccf5c38a8fc8bbee630 Mon Sep 17 00:00:00 2001 From: yada75 Date: Wed, 18 Jan 2023 19:39:29 +0100 Subject: [PATCH 3/5] Update telegram_specifications.py --- dsmr_parser/telegram_specifications.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/dsmr_parser/telegram_specifications.py b/dsmr_parser/telegram_specifications.py index 2729073..214fa52 100644 --- a/dsmr_parser/telegram_specifications.py +++ b/dsmr_parser/telegram_specifications.py @@ -240,6 +240,8 @@ SWEDEN = { obis.P1_MESSAGE_TIMESTAMP: CosemParser(ValueParser(timestamp)), obis.ELECTRICITY_IMPORTED_TOTAL: CosemParser(ValueParser(Decimal)), obis.ELECTRICITY_EXPORTED_TOTAL: CosemParser(ValueParser(Decimal)), + obis.ELECTRICITY_REACTIVE_IMPORTED_TOTAL: CosemParser(ValueParser(Decimal)), + obis.ELECTRICITY_REACTIVE_EXPORTED_TOTAL: CosemParser(ValueParser(Decimal)), obis.CURRENT_ELECTRICITY_USAGE: CosemParser(ValueParser(Decimal)), obis.CURRENT_ELECTRICITY_DELIVERY: CosemParser(ValueParser(Decimal)), obis.INSTANTANEOUS_ACTIVE_POWER_L1_POSITIVE: CosemParser(ValueParser(Decimal)), @@ -248,6 +250,12 @@ SWEDEN = { obis.INSTANTANEOUS_ACTIVE_POWER_L1_NEGATIVE: CosemParser(ValueParser(Decimal)), obis.INSTANTANEOUS_ACTIVE_POWER_L2_NEGATIVE: CosemParser(ValueParser(Decimal)), obis.INSTANTANEOUS_ACTIVE_POWER_L3_NEGATIVE: CosemParser(ValueParser(Decimal)), + obis.INSTANTANEOUS_REACTIVE_POWER_L1_POSITIVE: CosemParser(ValueParser(Decimal)), + obis.INSTANTANEOUS_REACTIVE_POWER_L1_NEGATIVE: CosemParser(ValueParser(Decimal)), + obis.INSTANTANEOUS_REACTIVE_POWER_L2_POSITIVE: CosemParser(ValueParser(Decimal)), + obis.INSTANTANEOUS_REACTIVE_POWER_L2_NEGATIVE: CosemParser(ValueParser(Decimal)), + obis.INSTANTANEOUS_REACTIVE_POWER_L3_POSITIVE: CosemParser(ValueParser(Decimal)), + obis.INSTANTANEOUS_REACTIVE_POWER_L3_NEGATIVE: CosemParser(ValueParser(Decimal)), obis.INSTANTANEOUS_VOLTAGE_L1: CosemParser(ValueParser(Decimal)), obis.INSTANTANEOUS_VOLTAGE_L2: CosemParser(ValueParser(Decimal)), obis.INSTANTANEOUS_VOLTAGE_L3: CosemParser(ValueParser(Decimal)), From 02eb3a34dd1f651d94caca4510fceadf4ebd8d2f Mon Sep 17 00:00:00 2001 From: yada75 Date: Wed, 18 Jan 2023 20:02:54 +0100 Subject: [PATCH 4/5] Update obis_name_mapping.py --- dsmr_parser/obis_name_mapping.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/dsmr_parser/obis_name_mapping.py b/dsmr_parser/obis_name_mapping.py index 7213262..cc85a02 100644 --- a/dsmr_parser/obis_name_mapping.py +++ b/dsmr_parser/obis_name_mapping.py @@ -11,9 +11,11 @@ EN = { obis.P1_MESSAGE_HEADER: 'P1_MESSAGE_HEADER', obis.P1_MESSAGE_TIMESTAMP: 'P1_MESSAGE_TIMESTAMP', obis.ELECTRICITY_IMPORTED_TOTAL: 'ELECTRICITY_IMPORTED_TOTAL', + obis.ELECTRICITY_REACTIVE_IMPORTED_TOTAL: 'ELECTRICITY_REACTIVE_IMPORTED_TOTAL', obis.ELECTRICITY_USED_TARIFF_1: 'ELECTRICITY_USED_TARIFF_1', obis.ELECTRICITY_USED_TARIFF_2: 'ELECTRICITY_USED_TARIFF_2', obis.ELECTRICITY_EXPORTED_TOTAL: 'ELECTRICITY_EXPORTED_TOTAL', + obis.ELECTRICITY_REACTIVE_EXPORTED_TOTAL: 'ELECTRICITY_REACTIVE_EXPORTED_TOTAL', obis.ELECTRICITY_DELIVERED_TARIFF_1: 'ELECTRICITY_DELIVERED_TARIFF_1', obis.ELECTRICITY_DELIVERED_TARIFF_2: 'ELECTRICITY_DELIVERED_TARIFF_2', obis.ELECTRICITY_ACTIVE_TARIFF: 'ELECTRICITY_ACTIVE_TARIFF', From ca8392504dc11a9293029e78c2b28e0b1ef7257f Mon Sep 17 00:00:00 2001 From: Nigel Dokter Date: Wed, 8 Feb 2023 12:02:14 +0100 Subject: [PATCH 5/5] Release 1.1.0 --- CHANGELOG.rst | 5 +++++ setup.py | 4 ++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index ada6184..588657e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,11 @@ Change Log ---------- +**1.1.0** (2023-02-08) + +- Add instantaneous reactive power + fixed swapped reactive total import export (`pull request #124 `_ by `yada75 `_) + + **1.0.0** (2022-12-22) - switched to new numbering scheme https://semver.org/ diff --git a/setup.py b/setup.py index f7b1896..e381170 100644 --- a/setup.py +++ b/setup.py @@ -4,10 +4,10 @@ setup( name='dsmr-parser', description='Library to parse Dutch Smart Meter Requirements (DSMR)', author='Nigel Dokter and many others', - author_email='nigel@nldr.net', + author_email='mail@nldr.net', license='MIT', url='https://github.com/ndokter/dsmr_parser', - version='1.0.0', + version='1.1.0', packages=find_packages(exclude=('test', 'test.*')), install_requires=[ 'pyserial>=3,<4',