timoschlueter / nightscout-librelink-up

Script written in TypeScript that uploads CGM readings from LibreLink Up to Nightscout.
MIT License
196 stars 249 forks source link

Moved nightscout code into separated folder #122

Closed 3timeslazy closed 6 months ago

3timeslazy commented 8 months ago

Hi there,

First of all, thank you for your work. This script vastly improved my quality of life.

Secondly, in return I'd like to contribute to this project by adding support for the Nightscout V3 API. Prior to that, I wanted to slightly refactor the code to make it easy to work with two different versions and do not break anything else.

Current PR is the first of two I'm going to raise. Its goal is to prepare the code for the support of two versions without actual support for the new version. It includes:

In the second PR I'm going to:

I do so to make the review easier for you and me

Thank you in advance!

timtheis commented 8 months ago

I have discovered that Nightscout already has a built in capability to do this using connect. (https://github.com/nightscout/nightscout-connect) Scroll down towards the bottom for Libre Link Up instructions.

Be sure to look at PR35 for a mod that fixes some problems with the current implementation, but has not been put into production yet. (https://github.com/nightscout/nightscout-connect/issues/35 )

3timeslazy commented 8 months ago

@timtheis thank you for you suggestion!

I've tried the nightscout-connect prior to raising this PR and frankly I didn't like it. It's nice to have it as a plugin embedded into the server, but it's not nice when the plugin crashes the whole server.

So, for now, I'd prefer to have it as a separate process running next to the server. I could have contributed to the nightscout itself but it's going to take much longer than patching the script I already know

UPD: I checked it again and it seems possible to run the connect as a sidecar, so I'm going to give it a try one more time. Thanks!

timtheis commented 8 months ago

I understand your concern. I just wanted to be sure you were aware of another possible solution. To date, connect linkup hasn’t crashed my Nightscout server.

On Sun, Jan 28, 2024 at 6:32 AM Vladimir Fetisov @.***> wrote:

@timtheis https://github.com/timtheis thank you for you suggestion!

I've tried the nightscout-connect prior to raising this PR and frankly I didn't like it. It's nice to have it as a plugin embedded into the server, but it's not nice when the plugin crashes the whole server.

So, for now, I'd prefer to have it as a separate process running next to the server. I could have contributed to the nightscout itself but it's going to take much longer than patching the script I already know

— Reply to this email directly, view it on GitHub https://github.com/timoschlueter/nightscout-librelink-up/pull/122#issuecomment-1913563281, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA23W6O7NNMJIGGIE2JPDG3YQYZLTAVCNFSM6AAAAABCOCHE3GVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGU3DGMRYGE . You are receiving this because you were mentioned.Message ID: @.***>

timoschlueter commented 7 months ago

@3timeslazy I checked the PR. From my point of view it's ready to be merged. As you seem to have discovered the sidecar solution of nightscout-connect for your purpose, are you still working on implementing v3 based on your interface? :)

3timeslazy commented 7 months ago

Hi @timoschlueter

Sorry, I missed your messages. Sure, I’m going to finish my work. I see that the CI is falling, so as soon as I have time, I’ll check what’s falling, fix it and raise the second PR with the V3 implementation