nightscout / AndroidAPS

Opensource automated insulin delivery system (closed loop)
https://wiki.aaps.app
GNU Affero General Public License v3.0
701 stars 1.72k forks source link

suggestion: implement batching for uploads #3447

Open cascer1 opened 4 days ago

cascer1 commented 4 days ago

AAPS always uploads data to nightscout as soon as it is available. Usually I think this is a good thing, but especially when my mobile data reception is poor this can eat through my battery quite quickly.

I'd love if there were some setting (in nsclient?) that's an intermediary because the options we have now. Uploading only on wifi isn't frequent enough for me, so maybe a slider for "when on mobile data, upload only once every x minutes". That way we can reduce the number of new connection attempts and thus I believe save some battery.

vanelsberg commented 3 days ago

I'd love if there were some setting

I think it is already there. Did you try "Slow down uploads" (NSClient->Preferences->Advanced Settings)?

vanelsberg commented 3 days ago

eat through my battery quite quickly.

Btw: In case you are experiencing battery usage higher than expected, make sure to regular execute a "Database Cleanup". You also may consider resetting the database. In some cases, database problems can cause high battery usage.

cascer1 commented 1 day ago

Oh look, slow down uploads does look like what I want. I can't find any more details in the documentation (other than the recommendation to leave it disabled). How does it work?