burnedikt / diasend-nightscout-bridge

Synchronize your diasend data to nightscout.
MIT License
18 stars 18 forks source link

Log errors on diasend side #40

Closed burnedikt closed 1 year ago

burnedikt commented 1 year ago

At times, diasend's API has some issues like Internal Server Errors (500) or Bad Gateway (502).

These generally don't lead to a problem as the next synchronization loop will usually work again but it would still be interesting to log (and potentially analyze) these outages. Also, it might be interesting to show the non-availability of diasend somewhere on nightscout.

funkstille commented 1 year ago

I had quiet some communication with camaps in the last days about diasend not working or is lacking about 20-30 minutes. And received some interesting (an for me unsightly) answers. CamAPS has reduced the update cycle to diasend cloud because diasend asked them to do so ("... in order to restore service, we have been asked by diasend, to reduce the frequency that data is sent from the ap to Diasend cloud. This is an interim solution until the Glooko platform becomes available....".

So from my point of view, diasend seems to be in traffic trouble because of a lot of new ypsomed customers... And maybe this bridge brings some more traffic trouble as well.

Camaps has always answered me that diasend was never meant to be a monitoring tool, but only for reporting. For me this is still incomprehensible, because from my point of view a loop / diabetes tool for children under 10 years can not work without monitoring.

I was also told that the so-called "Companion" app will be released at the end of February, which will mirror the data from the master phone in real time. However, only for Android.

Since this Answer is a little of topic, you can delete it after you have read it ;)

burnedikt commented 1 year ago

I had quiet some communication with camaps in the last days about diasend not working or is lacking about 20-30 minutes. And received some interesting (an for me unsightly) answers. CamAPS has reduced the update cycle to diasend cloud because diasend asked them to do so ("... in order to restore service, we have been asked by diasend, to reduce the frequency that data is sent from the ap to Diasend cloud. This is an interim solution until the Glooko platform becomes available....".

Thanks for sharing! Very interesting insights. I've also noticed the API to become less stable / having more outages.

So from my point of view, diasend seems to be in traffic trouble because of a lot of new ypsomed customers... And maybe this bridge brings some more traffic trouble as well.

It most certainly does - most standard diasend users will not refresh the app every minute to load data in contrast to the bridge which does exactly that.

That being said, I was aware of that from the beginning and I highly encourage everyone to adjust the polling interval to a level that balances out the need for having near-real-time information as well as not putting too much load on the servers.

In fact, I might adjust the default polling interval again to be 5 or even 10 minutes.

Camaps has always answered me that diasend was never meant to be a monitoring tool, but only for reporting. For me this is still incomprehensible, because from my point of view a loop / diabetes tool for children under 10 years can not work without monitoring.

I also understood that diasend is only a reporting tool, every aspect of the web interface and app makes it clear that it is not intended to be used as a real-time monitoring tool. But then again, that's exactly what a lot of people apparently need. However, it's also important to note that this "lot of people" may still be marginal. Me, personally, I'm not affected by diabetes but my child is. So i need to be able to remotely monitor the T1D data. The same probably applies to all parents of kids with T1D and caretakers of (e.g. elderly) people with T1D. But the majority of people is probably affected themselves by T1D in which case a mere reporting tool is all you need as no one else needs to monitor your data and you're anyways having your data always at hand. Not trying to justify that there's no proper solution for remote monitoring (that's why I built the bridge after all) but just trying to step into diasend's shoes.

I was also told that the so-called "Companion" app will be released at the end of February, which will mirror the data from the master phone in real time. However, only for Android.

The "companion" app I'm currently using is xDrip, which will at least take care of forwarding the glucose values with little to no delay to nightscout - without going through diasend. If glucose is all you care about, xDrip in Companion mode might as well be enough. Me, personally, though, I also need to monitor which treatments are given to my child so glucose only doesn't really cut it. If this new Companion app only works with Android, it'll again not cater to my family's needs, so there'll likely be a companion-to-nightscout bridge ;-)

funkstille commented 1 year ago

Since the new sync interval is now 60 minutes, 15 or even 30 minutes could be enough.

I also asked CamAPS if they would / could pass the App collected data to the phone bus. Like it is done with the hacked Dexcom, the 600 series uploader and so on. But they did not like the idea :(

But maybe there is a way to reverse engineer the companion app, like everything started with CamAPS and diasend.

I guess we have the same interests here since my son a 6 year old, who wants to go independently to the nearby playground or visit a friend without dad coming along.

burnedikt commented 1 year ago

Since the new sync interval is now 60 minutes, 15 or even 30 minutes could be enough.

Truely interesting. I've started logging the delay we're getting between an event being synchronized to the time and it currently averages at around 660 seconds (11 minutes) with a minimum of 7 seconds and a maximum of ~50 mins. However, keep in mind that adjusting the polling interval of the bridge will amplify this effect. E.g. if camaps only uploads every 30 minutes, and the bridge only polls every 30 minutes, in the worse case this could mean, events are delayed by 59 minutes.

So while it appears counterintuitive, it might actually make sense to keep the polling interval lower given that camaps sends data less frequently to prevent even longer delays. The best way would obviously be to know the exact interval and times at which data is sent from camaps but that's impossible to know so stupidly checking every x minutes seems like the only way until glooko goes live and maybe changes things for the better.

atomphil commented 1 year ago

I am still using the older mylife CamAPS FX version 1.4(160).101, which uploads to Diasend every 15 minutes. At the moment it seems to make sense not to update to 1.4(161).101.

funkstille commented 1 year ago

since the companion feature is now available... have you tried to reverse engineer the data stream of camaps companion mode by the decompiling the apk? I guess this could be the key to a CamAPS2Nightscout Bridge ;)

burnedikt commented 1 year ago

Opened a new issue to specifically discuss CamAPS companion mode: https://github.com/burnedikt/diasend-nightscout-bridge/issues/44

burnedikt commented 1 year ago

Closing this issue as there will be no more development (at least from my side) regarding the bridge from diasend to nightscout since diasend is now glooko.