Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Two-factor authentication is now mandatory. #25

Closed
JimboJamez opened this issue Jun 1, 2023 · 6 comments
Closed

Two-factor authentication is now mandatory. #25

JimboJamez opened this issue Jun 1, 2023 · 6 comments

Comments

@JimboJamez
Copy link

I'd really love to get this integration up and running in my HA setup. As a type 1 diabetic for the past 43 years it would be awesome to be able to have access to my levels trhough a card. I have attemtped to install as per the instructions, but can not get past the integration log in screen in HA. I believe that this is because MFA is now compulsory on all accounts:

Minimed

The code is coming to my email account from Minimed when I hit submit, but there is no way to validate this in the integration. Is this currently being looked at?

@JimboJamez JimboJamez changed the title Two-factor authentication is mandetory Two-factor authentication is now mandatory. Jun 1, 2023
@hhuitema
Copy link

hhuitema commented Jun 1, 2023

There is a problem when enabling 2FA on existing carelink accounts, you cannot de-activate it.
However just started (not finished) a new carelink partner account (which you would need for purely monitoring) and the 2FA is optional. So my suggestion for you is to create a new account and use that in HA.

Screenshot is in dutch, but it is recognizable that 2fa is optional

image

@yo-han
Copy link
Owner

yo-han commented Jun 1, 2023

The code to implement 2FA is already found. Alle we need is some time or someone to implement and test it. For me at the moment it is hard to find the time to take up this project.

@JimboJamez
Copy link
Author

Thanks @hhuitema

I've done that and have now configured Carelink integtaion in HA:

image

I have an issue now where the following is occurring:

image

The error in the log is:

This error originated from a custom integration.

Logger: custom_components.carelink
Source: custom_components/carelink/__init__.py:135
Integration: carelink
First occurred: 5:02:52 PM (5 occurrences)
Last logged: 5:04:10 PM

Unexpected error fetching carelink data: 'NoneType' object has no attribute 'setdefault'
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/update_coordinator.py", line 258, in _async_refresh
    self.data = await self._async_update_data()
  File "/config/custom_components/carelink/__init__.py", line 135, in _async_update_data
    recent_data.setdefault("clientTimeZoneName"), "Europe/London"
AttributeError: 'NoneType' object has no attribute 'setdefault'

Any idea what is causing this?

@hhuitema
Copy link

hhuitema commented Jun 1, 2023

Yes this is a known issue since a few weeks. Medtronic allowed partner accounts to monitor more than one patient. So the api call to retrieve data needs to provide the patient username as a parameter to retrieve information.

in essence the workaround for the moment for this intergration is to edit api.py file of the integration on line 135
change
user_json = {"username": username, "role": role}
to
user_json = {"username": username, "role": role, "patientId":"TheUserNameAsSeenunderSettingsinCareLinkConnect"}

and it works again.

@JimboJamez
Copy link
Author

Thanks for all your help @hhuitema , I've got it running now!

@warmfire540
Copy link

Thanks for this feed everyone - got this working in US now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants