How to save values with time recording?

Hey guys!

I have a question and I hope that someone can help me a little. I am working with a buddy on an IoT project where we have integrated different sensors. The values of the sensors have to be collected and stored regularly. The important thing here: the measured data should contain the exact time.

What kind of database would be best suited for this?

Look forward to tips from you

Hey @MattHettr, welcome to Computer Forums :slight_smile:

Sounds like an interesting project - do you have any particular database in mind?

Most i.e MySQL should let you record Unix time which is a pretty precice way of recording time, at least up until 2038

Are you writing the software yourselves or using something like HomeAssistant?

By the way I have moved this topic to our Smart Home / IoT category so should someone else out there ever face a similar issue they will be able to find it easily :slight_smile:

I am not a professional, but as far as I know, you should have a time series database for such data. If I were you, I would recommend InfluxDB, because this is a DBMS which is especially designed for storing time series, because these data have to be processed in realtime. It is written in the programming language Go, if that means anything to you. It also includes a time service with NTP (Network Time Protocol) so that the time is synchronized on all systems. Because of the simple indexing of such a DBMS, high write speeds can be guaranteed, which is an advantage for such a time series analysis. It is also possible to manage InfluxDB cloud-based, either with Aiven for InfluxDB or with the InfluxDB Cloud 2.0.

Good luck with the project! Maybe you can tell us more soon - I am curious!