Optional NUL after checksum
My smart meter returns 00 0D 0A after the checksum, not just 0D 0A.
This commit is contained in:
parent
c78ebe3e2d
commit
e3203a5334
@ -51,7 +51,7 @@ class TelegramBuffer(object):
|
|||||||
# - The checksum is optional '{0,4}' because not all telegram versions
|
# - The checksum is optional '{0,4}' because not all telegram versions
|
||||||
# support it.
|
# support it.
|
||||||
return re.findall(
|
return re.findall(
|
||||||
r'\/[^\/]+?\![A-F0-9]{0,4}\r\n',
|
r'\/[^\/]+?\![A-F0-9]{0,4}\0?\r\n',
|
||||||
self._buffer,
|
self._buffer,
|
||||||
re.DOTALL
|
re.DOTALL
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user