creepymonster / nightscout-to-libreview

Transfer your diabetes data from Nightscout to LibreView.
30 stars 35 forks source link

Libre View failed auth. #4

Closed Tores86 closed 1 year ago

Tores86 commented 1 year ago

authLibreView authLibreView, response undefined libre auth failed!

Hello. This is that your program show me. Libre view using two-factor authentication, may be this is related.

creepymonster commented 1 year ago

Hello,

please try to answer the question 'if you have problems with your transfer, recreate your device id' with true.

I think this fixes the problem. The two factor authentication is not really a two factor authentication - the API does not expect a second factor, only the client :)

Tores86 commented 1 year ago

Yes i try it, but it didn't work.

[root@cgm nightscout-to-libreview]# npm start

nightscout-to-libreview@1.0.0 start /root/nightscout-to-libreview node .

prompt: please enter your nightscout url: (https://cgm.****.*) prompt: please enter your nightscout token: (nsll-*****) prompt: please enter your libreview username: (tores@**.**) prompt: please enter your libreview password: (*****) prompt: please enter the year you want to transfer to libreview: (2022) prompt: please enter the month you want to transfer to libreview: (10) prompt: if you have problems with your transfer, recreate your device id: (false) true transfer time span 2022-10-01 2022-11-01 glucose entries url https://cgm.********.**/api/v1/entries.json?find[dateString][$gte]=2022-10-01&find[dateString][$lte]=2022-11-01&count=131072&token=nsll-** entries url https://cgm.********.**/api/v1/treatments.json?find[created_at][$gte]=2022-10-01&find[created_at][$lte]=2022-11-01&find[eventType]=Meal%20Bolus&count=131072&token=nsll-**** entries url https://cgm.********.**/api/v1/treatments.json?find[created_at][$gte]=2022-10-01&find[created_at][$lte]=2022-11-01&find[eventType]=Carb%20Correction&count=131072&token=nsll-**** insulin entries url https://cgm.********.**/api/v1/treatments.json?find[created_at][$gte]=2022-10-01&find[created_at][$lte]=2022-11-01&find[eventType]=Correction%20Bolus&count=131072&token=nsll-** insulin entries url https://cgm.********.**/api/v1/treatments.json?find[created_at][$gte]=2022-10-01&find[created_at][$lte]=2022-11-01&find[eventType]=Bolus&count=131072&token=nsll-**** authLibreView authLibreView, response undefined libre auth failed!

creepymonster commented 1 year ago

I will try it again tonight and get back to you ☺️

creepymonster commented 1 year ago

For me it looks quite good - I think it can still be due to the fact that I have the European LibreView API firmly registered.

Maybe you have to change something at the displayed position.

CleanShot 2022-11-16 at 12 11 14@2x

CleanShot 2022-11-16 at 12 15 04

Tores86 commented 1 year ago

MMM yeah https://api.libreview.ru but no data uploaded, i think more differents are there..... authLibreView authLibreView, response undefined transferLibreView glucose entries 1474 food entries 55 insulin entries 160 transferLibreView, response undefined

But in libreview clean screen =(

You take this link when do a manual upload?

creepymonster commented 1 year ago

The api-eu appears several times in libre.js - there are hole more than on the screenshot. Maybe the specification is still wrong when uploading.

Tores86 commented 1 year ago

Thank You Very MUCH!!!! It Work. i must change one more option.

modelName: "com.abbott.librelink.ru"

I do not know how it affected, but it helped, now everything works. Thank you.

Do you have example to add it to crontab?

creepymonster commented 1 year ago

Thank you for pointing this out.

The whole script is not really very user friendly and deserves some more attention one day ☺️