pageauc / speed-camera

A Unix, Windows, Raspberry Pi Object Speed Camera using python, opencv, video streaming, motion tracking. Includes a Standalone Web Server Interface, Image Search using opencv template match and a whiptail Admin Menu Interface Includes picam and webcam Plugins for motion track security camera configuration including rclone sync script. watch-app allows remotely controller camera configuration from a remote storage service name. Uses sqlite3 and gnuplot for reporting. Recently added openalpr license plate reader support.
Apache License 2.0
983 stars 172 forks source link

Use standard timestamp format in single CSV column #68

Closed balsama closed 3 years ago

balsama commented 3 years ago

Currently, the date and time of each CSV entry is split into several columns. Specifically:

| YYYYMMDD | HH | MM | {other columns} |

This PR changes the format to a standard timestamp (including seconds) in a single column:

| YYYY-MM-DD HH:MM:SS | {other columns} |
pageauc commented 3 years ago

There is some cleanup required for comments in log_to_csv function. Let me know if you want to do this or me. Also the sql DB still has date, hrs, min as separate fields and remain unchanged. I find the sql db is better to query and manipulate data than managing using the csv file data (My preference).. Let me know about updating code comments in the log_to_csv function. Thanks Claude ...

balsama commented 3 years ago

I think I found the comment you were referring to (line 913).

I also updated the DB schema in the same way as well as the data inserted..

I should note, I understand you might have very good reason for wanting the hours/minutes in separate columns. I'm not sure if this is desired or not 😅

balsama commented 3 years ago

Oh wow! Merged! Thanks!

You might be interested in this article: https://mass.streetsblog.org/2021/02/26/how-to-build-a-homemade-speed-camera/

Thanks for this awesome work.

pageauc commented 3 years ago

I will do some testing but may have to start a fresh database to accommodate the new schema. Read your article and will add link on github. No winter in Texas this year. This is our first winter in Canada in 12 years. Hoping to head south to Texas in the Fall. In the mean time locked down at home. I can monitor our place in Texas using a rpi in a security camera case using my pi-timolo program that puts motion tracking and/or timelapse images/video up on my google drive. Also have a humidity and temperature RPI in our mobile home in Texas that updates a Personal Weather station on the Weather underground. https://www.wunderground.com/dashboard/pws/KTXDONNA3/graph/2021-02-24/2021-02-24/weekly

Regards Claude ...