NobodyForNothing / blood-pressure-monitor-fl

A cross platform app to save blood pressure values with export function
MIT License
61 stars 10 forks source link

Don't trust bluetooth date to be correct #410

Open pimlie opened 2 weeks ago

pimlie commented 2 weeks ago

What you want:

When reading a bluetooth value, check if the date is longer then X days/weeks/months/years in the past and if so ask the user if they want to set it to NOW instead

Why you want it:

The date on my device was set to somewhere in 2021. As it's quite finicky to update the date on the device, it would be great if we could validate the date received from the bluetooth device as it seems you expect that date to be somewhere around now and not more then 3 years ago ;)

Looks like the clock in my device is broken, every time it turns off it resets the clock back to 2021

NobodyForNothing commented 2 weeks ago

A dialog seems annoying, I would prefer adding a setting to always ignore it. Did I miss a usecase?

While it doesn't help with a broken clock there is a gatt standard for time syncing the app could implement (This was initially proposed by andreassch in https://github.com/NobodyForNothing/blood-pressure-monitor-fl/issues/80#issuecomment-2184949802).

pimlie commented 2 weeks ago

Did I miss a usecase?

Maybe, the main thing I would be worried about is when the app is used by less tech-savvy users who f.e. replaced the batteries of their blood pressure monitor device. Cause those cheaper devices don't have a separate battery to keep the clock in sync so after changing the batteries the clock will probably be reset to it's default value. For less tech-savvy users it would be confusing to realize after a couple of days that their measurements of the last days are 'missing' because they also didn't see the warning message... Like I'd rather block the workflow with a clear message and a clear path to resolve the issue (ie use the dialog window to toggle the settings) then showing a small warning message that people might not notice because they aren't wearing their reading glasses ;)

Setting the time using GATT would be the GOAT ofc, but then the time should preferably be set before performing a measurement not after. But not sure how long that takes and if all devices support that