bugfix; updated async client to CRC check
This commit is contained in:
parent
4b392522c3
commit
b3014823c1
@ -91,7 +91,7 @@ class TelegramParserV4(TelegramParser):
|
||||
def parse(self, line_values):
|
||||
self.validate_telegram_checksum(line_values)
|
||||
|
||||
return super(self, TelegramParserV4).parse(line_values)
|
||||
return super().parse(line_values)
|
||||
|
||||
|
||||
class TelegramParserV2_2(TelegramParser):
|
||||
|
@ -8,9 +8,15 @@ from serial_asyncio import create_serial_connection
|
||||
|
||||
from . import telegram_specifications
|
||||
from .exceptions import ParseError
|
||||
from .parsers import TelegramParser, TelegramParserV2_2
|
||||
from .serial import (SERIAL_SETTINGS_V2_2, SERIAL_SETTINGS_V4,
|
||||
is_end_of_telegram, is_start_of_telegram)
|
||||
from .parsers import (
|
||||
TelegramParserV2_2,
|
||||
TelegramParserV4
|
||||
)
|
||||
from .serial import (
|
||||
SERIAL_SETTINGS_V2_2, SERIAL_SETTINGS_V4,
|
||||
is_end_of_telegram,
|
||||
is_start_of_telegram
|
||||
)
|
||||
|
||||
|
||||
def create_dsmr_reader(port, dsmr_version, telegram_callback, loop=None):
|
||||
@ -22,7 +28,7 @@ def create_dsmr_reader(port, dsmr_version, telegram_callback, loop=None):
|
||||
serial_settings = SERIAL_SETTINGS_V2_2
|
||||
elif dsmr_version == '4':
|
||||
specifications = telegram_specifications.V4
|
||||
telegram_parser = TelegramParser
|
||||
telegram_parser = TelegramParserV4
|
||||
serial_settings = SERIAL_SETTINGS_V4
|
||||
|
||||
serial_settings['url'] = port
|
||||
|
Loading…
Reference in New Issue
Block a user