Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d7f30b5069 | ||
|
|
b42ceb6555 | ||
|
|
3cf627eedc | ||
|
|
d680d44683 | ||
|
|
6387cc4440 | ||
|
|
61985c5c89 |
+14
-13
@@ -1,30 +1,31 @@
|
||||
Change Log
|
||||
----------
|
||||
|
||||
**1.4.0** (2024-03-12)
|
||||
- Q3D add CURRENT_ELECTRICITY_DELIVERY
|
||||
(`PR #149 <https://github.com/ndokter/dsmr_parser/pull/149>`_ by `Aeroid <https://github.com/Aeroid>`_)
|
||||
- Copy head_parsers list on construct.
|
||||
(`PR #150 <https://github.com/ndokter/dsmr_parser/pull/150>`_ by `dupondje <https://github.com/dupondje>`_)
|
||||
**1.4.1** (2024-03-12)
|
||||
|
||||
- Avoid loading timezone at runtime (`PR #157 <https://github.com/ndokter/dsmr_parser/pull/157>`_ by `dupondje <https://github.com/elupus>`_)
|
||||
|
||||
**1.4.0** (2024-03-12)
|
||||
|
||||
- Mbus alt (`PR #142 <https://github.com/ndokter/dsmr_parser/pull/142>`_ by `dupondje <https://github.com/dupondje>`_)
|
||||
- Q3D add CURRENT_ELECTRICITY_DELIVERY (`PR #149 <https://github.com/ndokter/dsmr_parser/pull/149>`_ by `Aeroid <https://github.com/Aeroid>`_)
|
||||
- Copy head_parsers list on construct. (`PR #150 <https://github.com/ndokter/dsmr_parser/pull/150>`_ by `dupondje <https://github.com/dupondje>`_)
|
||||
|
||||
**1.3.2** (2024-01-29)
|
||||
- Fix unit test for pyton 3.12
|
||||
(`PR #148 <https://github.com/ndokter/dsmr_parser/pull/148>`_ by `ndokter <https://github.com/ndokter>`_)
|
||||
|
||||
- Fix unit test for pyton 3.12 (`PR #148 <https://github.com/ndokter/dsmr_parser/pull/148>`_ by `ndokter <https://github.com/ndokter>`_)
|
||||
|
||||
**1.3.1** (2023-11-06)
|
||||
- Fix parsing peak usage with invalid timestamps
|
||||
(`PR #143 <https://github.com/ndokter/dsmr_parser/pull/143>`_ by `dupondje <https://github.com/dupondje>`_)
|
||||
|
||||
- Fix parsing peak usage with invalid timestamps (`PR #143 <https://github.com/ndokter/dsmr_parser/pull/143>`_ by `dupondje <https://github.com/dupondje>`_)
|
||||
|
||||
**1.3.0** (2023-08-01)
|
||||
|
||||
- added E.ON Hungary; refactored DSMR specifications to fix obis reference conflicts
|
||||
(`PR #137 <https://github.com/ndokter/dsmr_parser/pull/137>`_ by `balazs92117 <https://github.com/balazs92117>`_)
|
||||
- added E.ON Hungary; refactored DSMR specifications to fix obis reference conflicts (`PR #137 <https://github.com/ndokter/dsmr_parser/pull/137>`_ by `balazs92117 <https://github.com/balazs92117>`_)
|
||||
|
||||
**1.2.4** (2023-07-11)
|
||||
|
||||
- EQUIPMENT IDENTIFIER is wrong for Fluvius meters when other mbus devices are present
|
||||
(`PR #133 <https://github.com/ndokter/dsmr_parser/pull/133>`_ by `ejpalacios <https://github.com/ejpalacios>`_)
|
||||
- EQUIPMENT IDENTIFIER is wrong for Fluvius meters when other mbus devices are present (`PR #133 <https://github.com/ndokter/dsmr_parser/pull/133>`_ by `ejpalacios <https://github.com/ejpalacios>`_)
|
||||
|
||||
|
||||
**1.2.3** (2023-04-18)
|
||||
|
||||
@@ -73,7 +73,7 @@ class FileReader(object):
|
||||
try:
|
||||
yield self.telegram_parser.parse(telegram)
|
||||
except InvalidChecksumError as e:
|
||||
logger.warning(str(e))
|
||||
logger.info(str(e))
|
||||
except ParseError as e:
|
||||
logger.error('Failed to parse telegram: %s', e)
|
||||
|
||||
|
||||
@@ -158,7 +158,7 @@ class DSMRProtocol(asyncio.Protocol):
|
||||
try:
|
||||
parsed_telegram = self.telegram_parser.parse(telegram)
|
||||
except InvalidChecksumError as e:
|
||||
self.log.warning(str(e))
|
||||
self.log.info(str(e))
|
||||
except ParseError:
|
||||
self.log.exception("failed to parse telegram")
|
||||
else:
|
||||
|
||||
@@ -37,7 +37,7 @@ class SerialReader(object):
|
||||
try:
|
||||
yield self.telegram_parser.parse(telegram)
|
||||
except InvalidChecksumError as e:
|
||||
logger.warning(str(e))
|
||||
logger.info(str(e))
|
||||
except ParseError as e:
|
||||
logger.error('Failed to parse telegram: %s', e)
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ class SocketReader(object):
|
||||
try:
|
||||
yield self.telegram_parser.parse(telegram)
|
||||
except InvalidChecksumError as e:
|
||||
logger.warning(str(e))
|
||||
logger.info(str(e))
|
||||
except ParseError as e:
|
||||
logger.error('Failed to parse telegram: %s', e)
|
||||
|
||||
|
||||
@@ -2,6 +2,10 @@ import datetime
|
||||
|
||||
import pytz
|
||||
|
||||
# TODO : Use system timezone
|
||||
# Preload timezone to avoid loading in event loop later
|
||||
local_tz = pytz.timezone('Europe/Amsterdam')
|
||||
|
||||
|
||||
def timestamp(value):
|
||||
try:
|
||||
@@ -20,8 +24,6 @@ def timestamp(value):
|
||||
else:
|
||||
is_dst = False
|
||||
|
||||
# TODO : Use system timezone
|
||||
local_tz = pytz.timezone('Europe/Amsterdam')
|
||||
localized_datetime = local_tz.localize(naive_datetime, is_dst=is_dst)
|
||||
|
||||
return localized_datetime.astimezone(pytz.utc)
|
||||
|
||||
Reference in New Issue
Block a user