ruuvi / com.ruuvi.station.ios

iOS Ruuvi Station
BSD 3-Clause "New" or "Revised" License
34 stars 21 forks source link

Unify stored data history length with Android #206

Closed laurijamsa closed 3 years ago

laurijamsa commented 3 years ago

RuuviTag firmware 3.29.3's memory spec says:

"History size on the firmware is 3500 temperature + pressure + humidity data points. History is logged in the firmware once in ~5 minutes, for a total memory length of 12 days."

Currently, the mobile apps' history is limited to 72 hours (and iOS had a bug that stored longer to the RAM). Now, we should unify the apps and allow longer GATT history sync.

One possible way to handle this would be not to limit the history length on the mobile apps by days but instead by data points (for example 10k). But then we'd need some kind of a calendar approach on the browsing and maybe some quick zooming level buttons like "1 day, 1 week, full history". But we'll need these things anyways later when Ruuvi Network with cloud history becomes available.

So, this issue is not an assignment just yet. Let's decide first how to implement this so that it'll be ready for the future, too.

andreevdenis commented 3 years ago

Why is limiting by data points is only possible way? 10k of points can be anything: 1 day of data or 1 week

DG12 commented 3 years ago

Different uses, i.e. intervals, should take advantage of available memory in firmware regardless of the time period covered. Mobile app should retrieve all points (since last sync) Especially for later export.

rinat-enikeev commented 3 years ago

and iOS had a bug that stored longer to the RAM

Also the bug mentioned in the description should be fixed in this task.

rinat-enikeev commented 3 years ago

The final decision is to store 10 days of GATT max.

DG12 commented 3 years ago

Why present an artificial limit rather than use all available memory. Ten days (of time) will contain very few data points if the logging_interval is every 15 minutes and the RuuviTag is left in the field for more than a month (2,880 data points). See Lauri's original post here.

rinat-enikeev commented 3 years ago

you can play with Defaults in 0.6.3(3), the 0.6.3(4) is a Release Candidate.

rinat-enikeev commented 3 years ago

@markoaamunkajo you can set "Pruning Offset Hours" to 1 hour to limit the history length from 10 days to 1 hour and ensure that the shown interval is 1 hour.

markoaamunkajo commented 3 years ago

QA passed