Giter Site home page Giter Site logo

Comments (16)

ondrej1024 avatar ondrej1024 commented on July 4, 2024

Do you get any error messages?

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

This is array from debug log:

array(12) { [0]=> string(27) "__getLoginSession() success" [1]=> string(19) "__doLogin() success" [2]=> string(21) "__doConsent() success" [3]=> string(13) "__getMyUser()" [4]=> string(11) "__getData()" [5]=> string(16) "__getMyProfile()" [6]=> string(11) "__getData()" [7]=> string(22) "__getCountrySettings()" [8]=> string(11) "__getData()" [9]=> string(18) "__getMonitorData()" [10]=> string(11) "__getData()" [11]=> string(16) "__getLast24Hours" }

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

I don't understand. Can you show the command you are launching on the command line and what is printed after that?

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

Sorry for waiting, below is a command result:

python carelink.py ‘%login%’ ‘%password%’ ‘%country%’

__getLoginSession() success
__doLogin() success
__doConsent() success
__getMyUser()
__getData()
session get response is not OK
__getData() failed
__getMyProfile()
__getData()
loginInProcess
__getCountrySettings()
__getData()
loginInProcess
__getMonitorData()
__getData()
loginInProcess

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

Can you successfully log into your Carelink account via the Carelink website?
Which website are you using: carelink.minimed.com or carelink.minimed.eu ?

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

Yes, I can. I connect via carelink.minimed.eu. I’m wondering about that: can be a problem with login for password contains special characters like “!” (exclamation)?

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

I don't think that special characters are a problem. But you could try to change your password to something simple and see if that works.
However, I see that your login procedure with the carelink_client seems to be successful. You get a problem later when downloading the user data. Actually I have no clue what could be causing this.
You could also try to use the original Java client and check if you get the same issue.

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

I tested a password which contains "!" from Europe country and the script return a json variable without errors. In original Java Client, also everything is ok.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

So are you saying the Python client is working now for you? If yes, how did you solve the problem ?

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

Java client worked ok in my account, but python script still doesn’t work in my personal account, I tested on friend’s account from Europe which have a password contains exclamation and everything is ok. However, I still have a problem with get a json data from my account.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

To verify if it's a password issue with your account, you need to change your password to a simple one and check if this works.

Otherwise you can try to force the US server in case of Canada country code in line 97:

   # Get server URL
   def __careLinkServer(self):
      return CARELINK_CONNECT_SERVER_US if self.__carelinkCountry == "us" else CARELINK_CONNECT_SERVER_EU

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

I have resolved a problem, I analysed code and tried change code in line 361.

From this:

if self.__carelinkCountry == "us" or self.__sessionMonitorData["deviceFamily"] == "BLE_X":

To:

if self.__carelinkCountry == "us" or self.__carelinkCountry == "ca" or self.__sessionMonitorData["deviceFamily"] == "BLE_X":

And all json data is returned, if you want, you can change this line in your script.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

That's interesting. However, I don't understand why the Java client is working without this change. It implements this part like this (no extra check for Canada).

if (CountryUtils.isUS(carelinkCountry) || sessionMonitorData.isBle())

I guess you found a workaround but the actual error in the Python client code is somewhere else.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

I just noticed that there has been a fix in the Java client which hasn't been ported to the Python client:
benceszasz/CareLinkJavaClient@8c17094

So you could try to replace the check for "BLE_X" with a more generic check for "BLE".

if self.__carelinkCountry == "us" or self.__sessionMonitorData["deviceFamily"].find("BLE") == 0:

I guess your problem is not caused by the country code at all, but by the fact that you are using the 770G and not the 780G.

from carelink-python-client.

ondrej1024 avatar ondrej1024 commented on July 4, 2024

I have pushed a change to the master branch. Can you please try the latest version and let me know if it is working for you?

from carelink-python-client.

Jakub-JakubIT avatar Jakub-JakubIT commented on July 4, 2024

I checked the json data after changes and everything is OK. Thank you very much for your help.

from carelink-python-client.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.