volkszaehler / vzlogger

Logging utility for various meters & sensors
http://wiki.volkszaehler.org/software/controller/vzlogger
GNU General Public License v3.0
145 stars 124 forks source link

Use other Timestamp request #570

Open YARD2 opened 1 year ago

YARD2 commented 1 year ago

Hi,

I have the problem with Holley DTZ541. The timestamp of 1.8.0 and 2.8.0 having the wrong timestamp, but the rest of the ID e.g. 16.7.0 has the right ones. Would it be possible to check if the other values are ok, and use it also for the first ones ? Currently I use "use_local_time": true but I think using the right ones form the meter would be better.

[Jan 24 16:49:08][mtr0] Reading: id=1-0:1.8.0255/ObisIdentifier:1-0:1.8.0255 value=2167.50 ts=21441000 [Jan 24 16:49:08][mtr0] Reading: id=1-0:2.8.0255/ObisIdentifier:1-0:2.8.0255 value=0.00 ts=21441000 [Jan 24 16:49:08][mtr0] Reading: id=1-0:16.7.0255/ObisIdentifier:1-0:16.7.0255 value=310.00 ts=1674575348527

r00t- commented 1 year ago

currently vzlogger uses each reading's timestamp for that reading: https://github.com/volkszaehler/vzlogger/blob/929a8d65bf125ec35a1692711f101f03168864a3/src/protocols/MeterSML.cpp#L330

messing with this seems rather... messy...

some of the considerations made here apply: https://github.com/volkszaehler/vzlogger/pull/476#pullrequestreview-627218150 (it's unfortunate that we parse the sml telegram entry by entry and create readings, so we don't have the data from other readings around (anymore or not yet), either to use data from them, or to manipulate their timestamps retroactively.)

YARD2 commented 1 year ago

Thx for explanation. Then it would really be a bit complicated.