From e232b875fad5240edc61e33561a2ac8be6eab341 Mon Sep 17 00:00:00 2001 From: Gunnar Skjold Date: Tue, 23 Aug 2022 21:07:06 +0200 Subject: [PATCH] Fixed Aidon timestamp --- src/IEC6205675.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/IEC6205675.cpp b/src/IEC6205675.cpp index 15cb81d5..8ebe54f8 100644 --- a/src/IEC6205675.cpp +++ b/src/IEC6205675.cpp @@ -266,7 +266,9 @@ IEC6205675::IEC6205675(const char* d, uint8_t useMeterType, MeterConfig* meterCo if(meterTs != NULL) { AmsOctetTimestamp* amst = (AmsOctetTimestamp*) meterTs; time_t ts = decodeCosemDateTime(amst->dt); - if(meterType == AmsTypeKamstrup || meterType == AmsTypeAidon) { + if(meterType == AmsTypeAidon) { + meterTimestamp = ts - 3600; + } else if(meterType == AmsTypeKamstrup) { meterTimestamp = tz.toUTC(ts); } else { meterTimestamp = ts;