Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LWT messages no longer contain tst timestamp in 2.5.0 and 2.5.3 #1766

Open
mcnewton opened this issue Jul 23, 2024 · 3 comments
Open

LWT messages no longer contain tst timestamp in 2.5.0 and 2.5.3 #1766

mcnewton opened this issue Jul 23, 2024 · 3 comments
Labels

Comments

@mcnewton
Copy link

  • App build number: 2.5.0 (420500002)
  • Android version: 14
  • Device: OnePlus 9
  • Installation source: Google Play Store

Since 2.5.0, the lwt messages (MQTT) no longer contain the tst timestamp.

This isn't a huge concern, I import all MQTT messages into Elasticsearch and if there is no timestamp then they get the current time at import. LWTs aren't that interesting, and time of import is usually fine.

However if normal logging fail for any reason, I will process and re-import data recorded by recorder. When doing this, all LWTs end up inserted at the time of import rather than when they were generated. I could parse the timestamp written by recorder, but I'm lazy :) - it's still not accurate though, as it's not when the LWT was generated.

As noted on Mastodon, this could be created_at instead. I'm not really sure it makes much difference for LWT. For location, tst and created_at may be different. For LWTs, they are both the same value. In theory the correct solution is to leave tst (regression from previous behaviour) and also add created_at (to fill in complete data to match location messages), but I'm not sure it's really worth having both. Personal preference would probably be to just add tst back and not worry about it.

@jpmens
Copy link
Member

jpmens commented Jul 23, 2024

Thank you for the report, @mcnewton: I agree with your evaluation. tst should come back, and we could add created_at (which is the more precise term) additionally.

@jpmens jpmens added the bug label Jul 23, 2024
@growse growse closed this as completed in 67a5306 Jul 26, 2024
@jpmens
Copy link
Member

jpmens commented Nov 7, 2024

2.5.3 here. LWT doesn't contain tst:

{"_type": "lwt"}

@jpmens jpmens reopened this Nov 7, 2024
@jpmens jpmens changed the title LWT messages no longer contain tst timestamp in 2.5.0 LWT messages no longer contain tst timestamp in 2.5.0 and 2.5.3 Nov 7, 2024
@growse
Copy link
Collaborator

growse commented Nov 9, 2024

Eurgh, I had a test for this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants