From 28e3c51f0d5cfea4e8f5f4a2c5f9dbcf9bcc7e89 Mon Sep 17 00:00:00 2001 From: Hans Erik van Elburg Date: Sun, 21 Nov 2021 16:08:47 +0100 Subject: [PATCH] fix pylama errors on PR92 + editorial fix --- dsmr_parser/clients/protocol.py | 2 +- test/example_telegrams.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/dsmr_parser/clients/protocol.py b/dsmr_parser/clients/protocol.py index f46aea5..52f8383 100644 --- a/dsmr_parser/clients/protocol.py +++ b/dsmr_parser/clients/protocol.py @@ -113,7 +113,7 @@ class DSMRProtocol(asyncio.Protocol): self.telegram_buffer.append(data) for telegram in self.telegram_buffer.get_all(): - # ensure actual telegram is ascii (7-bit) only (IEC 646 required in section 5.4 of IEC 62056-21) + # ensure actual telegram is ascii (7-bit) only (ISO 646:1991 IRV required in section 5.5 of IEC 62056-21) telegram = telegram.encode("latin1").decode("ascii") self.handle_telegram(telegram) diff --git a/test/example_telegrams.py b/test/example_telegrams.py index c59280c..1ccb8ce 100644 --- a/test/example_telegrams.py +++ b/test/example_telegrams.py @@ -136,7 +136,7 @@ TELEGRAM_V5 = ( # # last two lines are added by the COM-1 Ethernet Gateway -TELEGRAM_ESY5Q3DB1024_V304 = ( # Easymeter an Hauptstromzähler +TELEGRAM_ESY5Q3DB1024_V304 = ( '/ESY5Q3DB1024 V3.04\r\n' '\r\n' '1-0:0.0.0*255(0272031312565)\r\n' @@ -150,10 +150,11 @@ TELEGRAM_ESY5Q3DB1024_V304 = ( # Easymeter an Hauptstromzähler '0-0:96.1.255*255(1ESY1313002565)\r\n' '!\r\n' ' 25803103\r\n' - '\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\r\n' + '\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' + '\xff\xff\xff\xff\xff\r\n' ) -TELEGRAM_ESY5Q3DA1004_V304 = ( # Easymeter an Wärmepumpe +TELEGRAM_ESY5Q3DA1004_V304 = ( '/ESY5Q3DA1004 V3.04\r\n' '\r\n' '1-0:0.0.0*255(1336001560)\r\n'