nightscout / AndroidAPS

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

[EOPATCH2] unable to change profile #2239

Closed MarvelousMarvin closed 1 year ago

MarvelousMarvin commented 1 year ago

Reporting bugs

MilosKozak commented 1 year ago

logs?

MarvelousMarvin commented 1 year ago

I did send them by email right after the incident. They just got back to me.

Screenshot_20221130-110529~2

I haven't figured out yet how to post them here.

MarvelousMarvin commented 1 year ago

AndroidAPS._2022-11-2901-00-01.18.zip AndroidAPS._2022-11-2901-00-01.17.zip AndroidAPS._2022-11-2901-00-01.16.zip AndroidAPS._2022-11-2901-00-01.15.zip AndroidAPS._2022-11-2901-00-01.14.zip AndroidAPS._2022-11-2901-00-01.13.zip AndroidAPS._2022-11-2901-00-01.12.zip AndroidAPS._2022-11-2901-00-01.11.zip AndroidAPS._2022-11-2901-00-01.10.zip AndroidAPS._2022-11-2901-00-01.1.zip AndroidAPS._2022-11-2901-00-01.0.zip AndroidAPS._2022-11-2816-35-24.16.zip AndroidAPS._2022-11-2816-35-24.15.zip AndroidAPS._2022-11-2901-00-01.3.zip AndroidAPS._2022-11-2901-00-01.2.zip AndroidAPS._2022-11-2901-00-01.5.zip AndroidAPS._2022-11-2901-00-01.4.zip AndroidAPS._2022-11-2901-00-01.7.zip AndroidAPS._2022-11-2901-00-01.6.zip AndroidAPS._2022-11-2901-00-01.8.zip AndroidAPS._2022-11-2901-00-01.9.zip

Sorry, I have uploaded whole of 29 November. 🫣

MilosKozak commented 1 year ago

there is only message in log that driver reported fail. is it a reproducible error?

MilosKozak commented 1 year ago

note: log .5.zip

MarvelousMarvin commented 1 year ago

Every time when I'm changing profile I get the same error.

Screenshot_20221201-134316

MilosKozak commented 1 year ago

turn on all PUMP logging

MarvelousMarvin commented 1 year ago

I have tried to send a recent low by mail

Not sure if the correct logging is on. Couldn't figure out wich one was missing

jbr7rr commented 1 year ago

I have the same problem with eoPatch, Build: ca06b948bf-2022.11.30 After intial pairing I was able to set the profile at different percentages. But after about 2 Hours The profile was unable to switch back from a 130% temp profile.

However after suspending the pump from the eopatch screen, en re-enabling from the same screen, the driver was able to set the profile again.

19:29 > 130% ends > failure 19:31 > Manual set > failure 19:32 > Manual set > failure 19:41 > Manual set > failure 19:44 > Manual set after workaround > success

See logs AndroidAPS._2022-12-01_Logs_jb.zip

MarvelousMarvin commented 1 year ago

Workaround does work. Great!

My best guess is that the pump doesn't accept profile change during active mode.

jbr7rr commented 1 year ago

I added some additional logging and catched the error again. The function setNewBasalProfile returns early at this line: https://github.com/nightscout/AndroidAPS/blob/6172ca8d6391eae90ad273f2e7c1e7504bd78683/pump/eopatch/src/main/java/info/nightscout/androidaps/plugins/pump/eopatch/EopatchPumpPlugin.kt#L180

That this is triggered when a bolus is active I understand, but what needs to happen when a temp basal is active? I think temp basal should be cancelled and the new profile set?

Still figuring out how to implement that. Not that familier with Kotlin and AAPS code base :)

Edit: Working here on a fix, but like I said still learning Kotlin, It works but its dirty https://github.com/jbr7rr/AndroidAPS/tree/fix-unable-to-set-profile-eopatch

Edit: Also noted that the basalrate of the pump is not synced correctly in other cases. Will figure out when this happens and discuss that in a separate issue

MilosKozak commented 1 year ago

fixed by https://github.com/nightscout/AndroidAPS/commit/0c833d087ba0bdd57824cfa92a3fa28eb7d5db0c