adamd9 / Nightscout-MacOS-Menu-Bar

15 stars 4 forks source link

Only 10 minutes of history #49

Closed stncttr908 closed 9 months ago

stncttr908 commented 9 months ago

First of all thanks for the great little app! It makes keeping an eye on my readings while at my laptop a breeze. One thing I've noticed with my setup is I only retrieve 10 minutes of history. This has been true since 2.4 when I discovered this great app, and same with 2.5, with an upgrade to Sonoma in between. Anything I could check in this app or in my Nightscout installation would be appreciated. Thanks!

Screenshot 2023-12-11 at 7 35 07 PM
adamd9 commented 9 months ago

Hey @stncttr908 , thanks for the feedback! Hmm yeah sound like it's getting slightly different data from your Nightscout, but I'm sure we can sort that out!

In the app, can you select "Report an issue" and include the URL of your Nightscout, and if you use an access token, please share with me a token that you can delete later - then I can take a look at the responses coming back from your NS app :-)

stncttr908 commented 9 months ago

That will be tricky since I am self hosted at home and I use a VPN for access when I’m elsewhere. Anything else I can capture for you?

adamd9 commented 9 months ago

Oh I see! Ok, so you can easily hit the same API that the app uses in your browser, just open a tab and enter this URL:

**<your nightscout site>**/api/v1/entries?token=**<your token>**

e.g.

https://my.nightscout.com/api/v1/entries?token=app-8csbac4751f19e15

Take whatever the output is, and email me via the "Report an issue" option with the detail.

By the way, what kind of CGM do you use? My running theory is that the API is limited to the last 10 measurements, so if your CGM measures more frequently (like say, every minute), then that would explain it!

stncttr908 commented 9 months ago

Oh I see! Ok, so you can easily hit the same API that the app uses in your browser, just open a tab and enter this URL:

**<your nightscout site>**/api/v1/entries?token=**<your token>**

e.g.

https://my.nightscout.com/api/v1/entries?token=app-8csbac4751f19e15

Take whatever the output is, and email me via the "Report an issue" option with the detail.

By the way, what kind of CGM do you use? My running theory is that the API is limited to the last 10 measurements, so if your CGM measures more frequently (like say, every minute), then that would explain it!

Thank you, I just sent it over as requested. I am using a FreeStyle Libre 3 pulling the data in via this tool, so it gets published up to Abbott's services and then pulled down every minute into Nightscout.

https://github.com/timoschlueter/nightscout-librelink-up/tree/main

stncttr908 commented 9 months ago

Also worth noting if I do the following I get the correct number of entries, but I am not sure if I can possibly alter my Nightscout URL field:

http://<nightscout url>/api/v1/entries?count=30&token=<token>

adamd9 commented 9 months ago

Thanks @stncttr908 , yeah so I think the theory is right - because your device uploads more frequently, and the API is limited to the last 10, it's not giving enough data.

There is a newer version of the API to return readings - let me research and get back to you via this thread. I definitely want the app to support this!

adamd9 commented 9 months ago

Hey @stncttr908 , thanks for the suggestion - I was able to fix this without switching to a totally different API version (which would have been a bigger rewrite) by just requesting the last 60 entries instead of the default 10. This works now whether you get readings every 5 minutes, one minute, or anything in between!

I'll post here once the new version is approved and in the store.

stncttr908 commented 9 months ago

Hey @stncttr908 , thanks for the suggestion - I was able to fix this without switching to a totally different API version (which would have been a bigger rewrite) by just requesting the last 60 entries instead of the default 10. This works now whether you get readings every 5 minutes, one minute, or anything in between!

I'll post here once the new version is approved and in the store.

Amazing, thanks very much! Just a reminder to create that KoFi/Patreon 😎

adamd9 commented 9 months ago

New version is approved and in the App Store (wow, so fast!)!

Ha yes - I added it to the readme just just a few mins ago :-)

image

https://ko-fi.com/adamdinneen