nightscout / nightscout-connect

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

Steps to get this working? #3

Open billreed85 opened 1 year ago

billreed85 commented 1 year ago

I am probably missing something very obvious, but I did the following on my Heroku Nightscout install:

  1. Add 'connect' to the ENABLE config var list.
  2. Added new config vars for: CONNECT_SOURCE, CONNECT_LINK_UP_USERNAME, CONNECT_LINK_UP_PASSWORD, CONNECT_LINK_UP_REGION, CONNECT_LINK_UP_PATIENT_ID

There is no data coming into the Nightscout site from my Libre 3. Any thoughts on the best way to move forward?

bewest commented 1 year ago

Howdy @billreed85, thanks very much for your interest! To get this running in Nightscout, you'll need to use a branch: wip/bewest/nightscout-connect.

bewest commented 1 year ago

It's now possible to use Nightscout's dev branch.

Chapagain43 commented 1 year ago

same here.... Pulling this in Azure "nightscout/cgm-remote-monitor-development:latest" With the following configurations but nothing is getting populated in the website { "name": "API_SECRET", "value": "xxxx", "slotSetting": false }, { "name": "CONNECT_LINK_UP_CONNECTION", "value": "xxxx", "slotSetting": false }, { "name": "CONNECT_LINK_UP_PASSWORD", "value": "xxxx", "slotSetting": false }, { "name": "CONNECT_LINK_UP_REGION", "value": "US", "slotSetting": false }, { "name": "CONNECT_LINK_UP_SERVER", "value": "api-US.libreview.io", "slotSetting": false }, { "name": "CONNECT_LINK_UP_TIME_INTERVAL", "value": "1", "slotSetting": false }, { "name": "CONNECT_LINK_UP_USERNAME", "value": "xxxx", "slotSetting": false }, { "name": "CONNECT_LOG_LEVEL", "value": "info", "slotSetting": false }, { "name": "CONNECT_SOURCE", "value": "linkup", "slotSetting": false }, { "name": "DOCKER_REGISTRY_SERVER_URL", "value": "https://index.docker.io/v1", "slotSetting": false }, { "name": "ENABLE", "value": "connect", "slotSetting": false }, { "name": "MONGODB_URI", "value": "xxxx", "slotSetting": false }, { "name": "WEBSITES_ENABLE_APP_SERVICE_STORAGE", "value": "false", "slotSetting": false } ]

bewest commented 1 year ago

@Chapagain43, I think you have the wrong image/tag name. Try this one instead: https://hub.docker.com/r/nightscout/cgm-remote-monitor/tags

nightscout/cgm-remote-monitor:latest_dev should resolve to the latest dev image published recently by the build bot.

Chapagain43 commented 1 year ago

Awesome, thank you. site is working with latest dev version with the above configurations to pull from librelink will leave it alone but for last 5 minutes nothing is being entered.

bewest commented 1 year ago

Also, I noticed you are interested in using libre; just this morning I pushed new code required for their recent compatibility updates. I just updated the dev branch to match, and it should be publishing an updated docker image shortly. Once a new image is listed, it's worth retrying.

bewest commented 1 year ago

You can convince yourself that the plugin is available by leaving out your password or username. If the plugin is configure to be used, but the credentials are empty, it should generate a boot error page that clearly explains the issue.

Chapagain43 commented 1 year ago

Boom! Left password out and as expected it threw an error.

LibreLinkUp Password is required. CONNECT_LINK_UP_PASSWORD must be the password for the LibreLinkUp User in order to login. {"stack":"Error: CONNECT_LINK_UP_PASSWORD at Function.validate_inputs [as validate] (/opt/app/node_modules/nightscout-connect/lib/sources/librelinkup.js:219:156) at manage (/opt/app/node_modules/nightscout-connect/index.js:49:26) at setupConnect (/opt/app/lib/server/bootevent.js:323:58) at Object. (/opt/app/node_modules/bootevent/index.js:12:7) at EventEmitter.saw.nest (/opt/app/node_modules/chainsaw/index.js:86:12) at Object.acquire (/opt/app/node_modules/bootevent/index.js:10:9) at saw.next (/opt/app/node_modules/chainsaw/index.js:62:18) at setupListeners (/opt/app/lib/server/bootevent.js:318:5) at Object. (/opt/app/node_modules/bootevent/index.js:12:7) at EventEmitter.saw.nest (/opt/app/node_modules/chainsaw/index.js:86:12)","message":"CONNECT_LINK_UP_PASSWORD"}

Chapagain43 commented 1 year ago

@bewest, Really appreciate you walking me thru this. I will repull the dev docker in the AM tomorrow to see if it starts to write. Just to clarify: in the LibreLinkUp it required the nightscout website and api token, assuming from the readme file here no need to include these?

Chapagain43 commented 1 year ago

Nothing is being posted in the nightscout site. not sure but should the logs show activity regarding the “connect”? Not seeing any activity in the logs.

bewest commented 1 year ago

Maybe get in touch with me via bewest@gmail.com or on FB. It would help to be able to test out with credentials that have data. I don't use Libre, so I was only able to directly test basic login.

jonisaksson commented 11 months ago

I have the same problem. It doesnt seem to pull any data through from LibreLinkUp. Was there a solution found for this issue?

bewest commented 11 months ago

In order for this to work, you must invite yourself as a follower in LibreView/LibreLinkUp/Libre. The credentials used are the LibreView credentials. Hope this helps.

jonisaksson commented 11 months ago

Thank you Ben, Unfortunately can’t I seem to get any data to flow through to nightscout I am following myself, so I am running the Librelinkup app on my iphone and I can see the data in there, so I know the data is getting populated in LibreLinkUp

I am running Nightscout 15.0 (latest dev)

CONNECT_SOURCE = LINKUP CONNECT_LINK_UP_USERNAME = xxxx CONNECT_LINK_UP_PASSWORD = yyyy CONNECT_LINK_UP_REGION = EU

I have tried changing the region to EU2 to see if that helps (as I am in the UK) but no data is coming through on either region settings.

I deleted the CONNECT_LINK_UP_PASSWORD, and I got an error saying “LibreLinkUp Password is required. “ so the user credentials for librelinkup seem to be correct Any idea what to test to get the root of this problem

From: Ben West @.> Sent: Monday, August 21, 2023 8:12 PM To: nightscout/nightscout-connect @.> Cc: jonisaksson @.>; Comment @.> Subject: Re: [nightscout/nightscout-connect] Steps to get this working? (Issue #3)

In order for this to work, you must invite yourself as a follower in LibreView/LibreLinkUp/Libre. The credentials used are the LibreView credentials. Hope this helps.

— Reply to this email directly, view it on GitHubhttps://github.com/nightscout/nightscout-connect/issues/3#issuecomment-1686882593, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO7EPBSXIG2SQIHM5NCUFIDXWOXJ3ANCNFSM6AAAAAAYPQEHMM. You are receiving this because you commented.Message ID: @.**@.>>

bewest commented 11 months ago

There are two passwords, one for LibreLinkup and one for LibreView. It's possible for them to not match, worth triple checking.

jonisaksson commented 11 months ago

Thanks Ben, I did reset both password to be the same password, just to be on the safe side. During my troubleshooting, I did notice that if you enter the wrong password in the Nightscout, it doesn’t throw an error message, but it will lock the LibreView account ‘due to too many login attempts’. That made me hopeful, thinking that I had found why I wasn’t getting any data through but even after using 2FA to ‘reopen’ the libreview account, there is still no data flowing through.

It did make me think though, there would be good if there was some code that validated that a connection has been made. At the moment you only get an error message if you have no password, so you no idea what is actually happening as you could be entering the wrong password or the Librelink account could be locked, or something else could be wrong.

Anyway, I am still stuck with not getting any data through… any ideas on what I should look for? There is nothing in the logs, the LibreView password is definitely the right one now.

From: Ben West @.> Sent: Tuesday, August 22, 2023 4:27 PM To: nightscout/nightscout-connect @.> Cc: jonisaksson @.>; Comment @.> Subject: Re: [nightscout/nightscout-connect] Steps to get this working? (Issue #3)

There are two passwords, one for LibreLinkup and one for LibreView. It's possible for them to not match, worth triple checking.

— Reply to this email directly, view it on GitHubhttps://github.com/nightscout/nightscout-connect/issues/3#issuecomment-1688430785, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO7EPBXK52GOHCJEFNVRAFTXWTFU3ANCNFSM6AAAAAAYPQEHMM. You are receiving this because you commented.Message ID: @.**@.>>

bewest commented 11 months ago

Ok, if you could email me at bewest at medicaldatanetworks.com or gmail.com I will take a look in my development environment. Otherwise I don't have any access to testing or development. It would help if you could set a temporary password and send it to my email. Make sure to mention nightscout-connect and libre in the subject. Out of curiosity, are you able to get it to work with https://github.com/timoschlueter/nightscout-librelink-up?

jonisaksson commented 11 months ago

Thank you Ben.

I will send you an email with my login details to Libreview I have to be honest, I haven’t tried Librelink up

From: Ben West @.> Sent: Tuesday, August 22, 2023 6:49 PM To: nightscout/nightscout-connect @.> Cc: jonisaksson @.>; Comment @.> Subject: Re: [nightscout/nightscout-connect] Steps to get this working? (Issue #3)

Ok, if you could email me at bewest at medicaldatanetworks.com or gmail.com I will take a look in my development environment. Otherwise I don't have any access to testing or development. It would help if you could set a temporary password and send it to my email. Make sure to mention nightscout-connect and libre in the subject. Out of curiosity, are you able to get it to work with https://github.com/timoschlueter/nightscout-librelink-up?

— Reply to this email directly, view it on GitHubhttps://github.com/nightscout/nightscout-connect/issues/3#issuecomment-1688650179, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO7EPBV4MJV2R25TOTRYQX3XWTWKHANCNFSM6AAAAAAYPQEHMM. You are receiving this because you commented.Message ID: @.**@.>>

bewest commented 11 months ago

@jonisaksson thanks for your help! I found several issues that needed to be fixed in order for this to work.

How often does LibreLinkUp update with new data for you? Updated in latest feature branch: https://github.com/nightscout/nightscout-connect/pull/19

jonisaksson commented 11 months ago

Thank you Ben!

I haven’t been using the Libre as a CGM (rather used xDrip4iOS), so I think it only updates when I scan the sensor. The plan is to move to use Libreview with the CGM feature and have nightscout feed xDrip4iOS (in follower mode)

From: Ben West @.> Sent: Tuesday, August 22, 2023 11:00 PM To: nightscout/nightscout-connect @.> Cc: jonisaksson @.>; Mention @.> Subject: Re: [nightscout/nightscout-connect] Steps to get this working? (Issue #3)

@jonisakssonhttps://github.com/jonisaksson thanks for your help! I found several issues that needed to be fixed in order for this to work.

How often does LibreLinkUp update with new data for you? Updated in latest feature branch: #19https://github.com/nightscout/nightscout-connect/pull/19

— Reply to this email directly, view it on GitHubhttps://github.com/nightscout/nightscout-connect/issues/3#issuecomment-1688985932, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AO7EPBTWSWSV62UVRRN4XETXWUTVZANCNFSM6AAAAAAYPQEHMM. You are receiving this because you were mentioned.Message ID: @.**@.>>