pazaan / 600SeriesAndroidUploader

Your Medtronic 600-series pump data, direct to Nightscout
http://pazaan.github.io/600SeriesAndroidUploader/
MIT License
189 stars 311 forks source link

Set pump time #151

Open Tausta opened 7 years ago

Tausta commented 7 years ago

Nowadays uploader checks pump time and compare it to phone time. Then this time offset has been used to manipulate pump records timestamp. But with medical devices records, typically communication devises do not manipulate records.

Better solution:

Especially if in the future pump history records are transferred to NS, it is important that uploader is as transparent as possible.

volkerrichert commented 7 years ago

Is there a way to set the pump time remotely? I can't remember someone.

pazaan commented 7 years ago

There is a protocol message for setting the time. I haven't documented it yet.

volkerrichert commented 7 years ago

Ah, ok. Cool. Maybe we should add an option to enable sync time and not just change it.

Pogman commented 7 years ago

I added a warning message and a help message that's in v5.1 of the uploader for this. If the time difference is over 10 minutes the user gets this warning.

I don't think it's a good idea to change anything on the pump via the uploader. At least for something that's being released to the general public.

volkerrichert commented 7 years ago

me, too. Reading is fine, but writing... So maybe an option or a message an an upload to NS as a message

Tausta commented 7 years ago

Yep, of course this kind of feature have to be by default off. But option that user can activate. I also think that by default uploader should not manipulate history records timestamps.

Tausta commented 7 years ago

Sorry, wrong button. Reopen.

volkerrichert commented 7 years ago

This may cause issues finding old records.

Pogman commented 7 years ago

interesting point... that could be why the pump uses 2 time data points, the RTC and the OFFSET.

pazaan commented 7 years ago

It is indeed. Changing pump date/time changes offset, not RTC. Agree with not writing data to the pump.

Pogman commented 7 years ago

Things can get messy if the time on the uploader device is changed. The new treatment stuff I've been working on relies on good uploader records and time moving forward. Need to think a bit on this type of situation....

Tausta commented 7 years ago

I fully agree that writing data to the pump must be done with special care and avoiding risks. If automatic time sync is too big step, maybe manual time sync can be first step. Can in uploader menu be "Sync pump time", and when user activate it uploader tries to set pump time.

volkerrichert commented 7 years ago

The first step should be a warming and maybe an icon

Pogman commented 7 years ago

The warning is already in there:

https://github.com/pazaan/600SeriesAndroidUploader/blob/d582d467fa67d9062a1227e3e2ba8b77068f4d83/app/src/main/java/info/nightscout/android/medtronic/service/MedtronicCnlIntentService.java#L293