I am creating an application with InfluxDB as my database, used to read sensor information and display it on an HMI-like interface, based on a Raspberry Pi 4 with Balena. The general architecture of the application is:
Sensor Readings --> Python Influx Client --> InfluxDB --> ExpressJS Influx Query --> ReactJS Frontend
Everything works great when the Pi is connected to the internet, but although I am using Balena, I cannot guarantee that our devices will always have a stable internet connection.
This raises a problem with Influx, since it obviously can’t get the time from an NTP server if there is no internet connection. Is there any way around this? I am graphing data, and for that purpose I more or less just need some sort of timestamp associated with my measurements. For this application, it isn’t really important if the date/time is spot on.
Do I need to add an RPi RTC module?