From ad6ab304f5c28279bd8c22d760883775c939adce Mon Sep 17 00:00:00 2001 From: Thomas Neele Date: Sat, 15 Sep 2018 21:18:36 +0200 Subject: [PATCH] Added serial settings for DSMR v5.0 --- dsmr_parser/clients/__init__.py | 2 +- dsmr_parser/clients/settings.py | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/dsmr_parser/clients/__init__.py b/dsmr_parser/clients/__init__.py index 2a3b1fd..7323ecd 100644 --- a/dsmr_parser/clients/__init__.py +++ b/dsmr_parser/clients/__init__.py @@ -1,5 +1,5 @@ from dsmr_parser.clients.settings import SERIAL_SETTINGS_V2_2, \ - SERIAL_SETTINGS_V4 + SERIAL_SETTINGS_V4, SERIAL_SETTINGS_V5 from dsmr_parser.clients.serial_ import SerialReader, AsyncSerialReader from dsmr_parser.clients.protocol import create_dsmr_protocol, \ create_dsmr_reader, create_tcp_dsmr_reader diff --git a/dsmr_parser/clients/settings.py b/dsmr_parser/clients/settings.py index 2c2677c..26502d0 100644 --- a/dsmr_parser/clients/settings.py +++ b/dsmr_parser/clients/settings.py @@ -20,3 +20,13 @@ SERIAL_SETTINGS_V4 = { 'rtscts': 0, 'timeout': 20 } + +SERIAL_SETTINGS_V5 = { + 'baudrate': 115200, + 'bytesize': serial.EIGHTBITS, + 'parity': serial.PARITY_NONE, + 'stopbits': serial.STOPBITS_ONE, + 'xonxoff': 0, + 'rtscts': 0, + 'timeout': 20 +}