msupply-foundation / msupply-cold-chain

Android application for viewing and monitoring temperatures of fridges
GNU General Public License v3.0
3 stars 3 forks source link

Sensor battery fluctuations #246

Closed louisaw123 closed 7 months ago

louisaw123 commented 1 year ago

Describe the bug Battery sensor suddenly dropped to 12%. On refreshing the screen it then changed to 48%. Breach alert for low battery also lighted up and on self-resolution of the battery sensor the breach alert stopped.

image

IMAGE 2023-08-24 17:03:25

image

Pictures show battery % dropping dramatically very suddenly and then going back to prior battery %. Screenshots have been provided by client's Pharmacy Team.

To Reproduce Unclear, however this is a common occurrence. https://docs.google.com/spreadsheets/d/1NpYpGs-mBIhhNx-4-oC1aylwXNn_0Q9tx4_EOJC9FjU/edit#gid=0

adamdewey commented 1 year ago

dev team - please consult with me before starting any work here

adamdewey commented 11 months ago

More reports of complaints about this coming in from the field. e.g. often jumping from 50 to 48 to 52, even down to 28.

Could we perhaps improve the accuracy by taking an average of, say, the last 20 or 50 battery readings (rounded to the nearest integer)

jmbrunskill commented 11 months ago

More reports of complaints about this coming in from the field. e.g. often jumping from 50 to 48 to 52, even down to 28.

Could we perhaps improve the accuracy by taking an average of, say, the last 20 or 50 battery readings (rounded to the nearest integer)

I'm not sure if I just missed it, but it seems like we might not be recording historical battery readings, can't see it in my postgres at least? @Mai21 can you fill us in on that?

adamdewey commented 11 months ago

@jmbrunskill - correct, we're not currently.

@Mai21 has done some magic to create a temporary table in postgres so we can see if it improves things, seems it would be a big improvement if we average the level over a 24 hour period:

image

mark-prins commented 7 months ago

Perhaps revisit after #243 as we need historical data in order to average Actual battery reading is from the sensor, and we have no control of the validity

marthakeezy commented 3 months ago

Moving to 'Not Ready to Test' as we are waiting for historical data as per Mark's comment above ^