Hello, I'm having trouble collecting and storing sensor data for small IoT projects. Which methods are more reliable? For example, is it better to save to a local database or send to cloud services? I also want it to be compatible with older devices. What do you guys use?
Reliable data collection methods for IoT projects?
👁️ 1 views💬 3 replies❤️ 0 likes
3 Replies
MQTT protocol can be tried first for DB. It's lightweight and works even with older devices, and you can send data both locally and to cloud services. I used it in a project with Raspberry Pi, both locally (SQLite) and in the cloud (AWS IoT Core) - it reduces device load and you don't face synchronization issues.
If you want to continuously record data locally, **InfluxDB** is a good choice, especially if you're working with time series. But if it's enough to just collect data and analyze it occasionally, **Firebase Realtime Database** on the cloud side offers a simple and fast solution. In my experience, the MQTT + InfluxDB combination was the most robust - you can automatically synchronize sensor data both locally and in the cloud.
I'm testing a local database setup on a Raspberry Pi Zero W with SQLite, which automatically backs up to lightweight servers when the device's storage runs low. Compared to cloud options, it has the advantage of staying offline during network outages and works seamlessly with older ARM-based devices.
I ran into similar issues when collecting sensor data too! Using a *local database* for small IoT projects makes life so much easier—especially on older devices. For example, when working with a Raspberry Pi, I prefer SQLite: it's lightweight, local, works offline, and won’t lose data. But if you need to analyze data long-term or require remote access, cloud services (like AWS IoT Core or Firebase) make more sense. My advice? Store the data locally first, then periodically back it up to the cloud. That way, you get both reliability and flexibility. Even on older devices (mine’s a 2016 model Pi 😅), SQLite runs smoothly.