Which timestamp(s) is/are correct?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
SumDum
Posts: 9
Joined: Thursday 28 November 2019 10:28
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Which timestamp(s) is/are correct?

Post by SumDum »

Hi,

I have Domoticz logging a number of temperatures from 1-wire sensors using an I2C interface. In the local logs the timestamps are always on the 5 minute, near enough:

Code: Select all

2022-03-12 17:10:00	67.6
2022-03-12 17:15:00	67.6
2022-03-12 17:20:00	67.5
2022-03-12 17:25:00	67.4
The sensors are also being sent to MQTT for a bit of tag adjustment before onward logging to influx. The MQTT timestamps match the LastUpdate field in the JSON:

Code: Select all

{
	"Battery" : 255,
	"LastUpdate" : "2022-03-12 17:28:19",
	"RSSI" : 12,
	"description" : "",
	"dtype" : "Temp",
	"hwid" : "2",
	"id" : "AA07",
	"idx" : 5,
	"name" : "TankTop",
	"nvalue" : 0,
	"stype" : "LaCrosse TX3",
	"svalue1" : "67.4",
	"unit" : 7
}
{
	"Battery" : 255,
	"LastUpdate" : "2022-03-12 17:23:14",
	"RSSI" : 12,
	"description" : "",
	"dtype" : "Temp",
	"hwid" : "2",
	"id" : "AA07",
	"idx" : 5,
	"name" : "TankTop",
	"nvalue" : 0,
	"stype" : "LaCrosse TX3",
	"svalue1" : "67.5",
	"unit" : 7
}
{
	"Battery" : 255,
	"LastUpdate" : "2022-03-12 17:18:09",
	"RSSI" : 12,
	"description" : "",
	"dtype" : "Temp",
	"hwid" : "2",
	"id" : "AA07",
	"idx" : 5,
	"name" : "TankTop",
	"nvalue" : 0,
	"stype" : "LaCrosse TX3",
	"svalue1" : "67.6",
	"unit" : 7
}
{
	"Battery" : 255,
	"LastUpdate" : "2022-03-12 17:13:04",
	"RSSI" : 12,
	"description" : "",
	"dtype" : "Temp",
	"hwid" : "2",
	"id" : "AA07",
	"idx" : 5,
	"name" : "TankTop",
	"nvalue" : 0,
	"stype" : "LaCrosse TX3",
	"svalue1" : "67.6",
	"unit" : 7
}
I'm guessing the internal log time is correct as that exists without the MQTT push. Readings are taken on the 5 minute.
But is the MQTT task resampling the sensors? Or is it delayed logging of the previously captured data? That would mean the timestamps are only relevant to the MQTT publish and not the data capture.

Thanks
SumDum
Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests