guidosch / bikecounter

This repository contains the hardware and software components of a PIR based tracking device to monitor the usage of local bike trails. The data is sent over LoRaWAN to TTN and from there to a Google Cloud backend which stores the data and provides api endpoints for the data visualization web UI.
Creative Commons Zero v1.0 Universal
5 stars 0 forks source link

Entries in DB with date 1970-01-20 #80

Closed guidosch closed 1 year ago

guidosch commented 1 year ago

There are many entries in the DB with timestamp=0. Couting showed something like 30 entires only for antennentrail-1. We may should also send the timestamp from TTN to have an idea when this happens.

Bildschirm­foto 2023-02-17 um 22 20 59
guidosch commented 1 year ago

Dates are not 0 but 1970-01-20, hmmm even more strange. Check with Tobias before deletion.

guidosch commented 1 year ago

Not only Antennentrail but also all the others with latest software version.

MeierTobias commented 1 year ago

I think this problem is already solved. The first package of the device is the time synchronization message. This contains a wrong timestamp (uninitialized) which triggers the cloud function to send a downlink message with the correction parameter. I updated the cloud function to check if the received message is a sync message and if so to not save it into the DB. But I think this change was applied a few weeks after the software update due to the lack of permissions to edit the cloud functions. I think these values are artifacts from that period where the cloud function did not handle that special case.

So I would say it is save to delete these entries.

MeierTobias commented 1 year ago

Related fix #62

guidosch commented 1 year ago

Deleted timestamps with year 1970. Closing issue.