nightscout / nightscout-connect

Single entry point for bridging cloud resources containing diabetes data to Nightscout.
GNU Affero General Public License v3.0
31 stars 33 forks source link

Question/idea: Passthrough of cloud connection status to AAPS/xDrip etc? #7

Open ogsadmin opened 1 year ago

ogsadmin commented 1 year ago

Hi,

without any knowledge about the inner workings of nightscout, would it in general be possible to pass some (status) information from the cloud provider connection to the "end device" (like xDrip, AAPS)?

My use case is: From time to time, the LibreLinkUp site requires accepting new EULAs. Without this, no access to the readings is possible (see https://github.com/timoschlueter/nightscout-librelink-up/issues/100). So far, this is indicated in xDrip/AAPS as no readings available for the last x minutes. In my setup (currently running nightscout-librelink-up, not nightscout-connect), I'll have to dig through the server logs and find the error message...

As I am considering testing/switching to nightscout-connect, I wonder how this and similar cases are handled - it would be very helpful to see some more detailed status message on the end device, e.g. Cloud EULA changed, please acknowledge...

Thanks!

bewest commented 1 year ago

Good idea! There is a clear message that comes back from Libre and Carelink that denotes when some kind of account maintenance/EULA is needed. This message could be integrated into Nightscout in a few different ways. One way would be to add an announcement/note type of event to Nightscout, so it shows up in the UI. How often would you expect to see the announcement? If a new announcement is created every 5 minutes, it might fill Nightscout with many such announcements, is that a problem?

bewest commented 1 year ago

In case you are interested, here's how carelink summarizes the information to create an additional devicestatus record. https://github.com/nightscout/nightscout-connect/blob/main/lib/sources/minimedcarelink/index.js#L531-L532 I think an approachable technique would be similar to catch the eula_updates_require=true scenario and insert a similar treatment record with a note to log into libre.

ogsadmin commented 1 year ago

Thanks for the quick feedback!

And yes, this sounds like a good way to implement it - I actually don't care (or after thinking twice, it would actually be good), if the message is repeated every 5 minutes. In this case, no more readings are available, so one needs to take some action quickly anyway...