AndroidAPS icon indicating copy to clipboard operation
AndroidAPS copied to clipboard

suggestion: implement batching for uploads

Open cascer1 opened this issue 1 year ago • 3 comments

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.

cascer1 avatar Sep 30 '24 04:09 cascer1

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 avatar Oct 01 '24 17:10 vanelsberg

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.

vanelsberg avatar Oct 01 '24 17:10 vanelsberg

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?

cascer1 avatar Oct 03 '24 05:10 cascer1

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?

When slow is enabled NSClient is delaying for 1 second between processing records (I think this lowers stressing the phones CPU and as such its power usage)

vanelsberg avatar Oct 07 '24 17:10 vanelsberg

NSC v3 is the future and there will not be any difference in battery consumption

MilosKozak avatar Nov 01 '24 14:11 MilosKozak