jwoglom / tconnectsync

Syncs insulin pump data from Tandem t:connect to Nightscout for the t:slim X2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Set up tconnectsync - login issues

bjornoleh opened this issue · comments

Hi, I am helping someone with tconnectsync for the first time, and I am facing some issues.

When running sudo docker run --env-file=.env jwoglom/tconnectsync --check-login, it seems the .env file is read and it does seem to log into Nightscout, but apart from that it is complaining about credentials. Did I get the wrong credentials from those I am helping, or is there something I am missing? Is there any account activation they would have to do to make this work? I don't have any first hand experience with their t:connect app (iOS). I can get more details later, but this is what I have now.

Setup details

  • Operating system: Ubuntu 20.04
  • tconnectsync version (from --version): 0.9.3
  • On what platform are you using the t:connect mobile app?: iOS
  • What version are you using of the t:connect mobile app?

I could not locate tconnectsync-check-output.log, but I don't se any sensitive info in the output, so am posting that here:

tconnectsync version 0.9.3
Python version 3.9.16 (main, Feb  4 2023, 03:27:06) 
[GCC 10.2.1 20210110]
System platform linux
Running checks with time range 2023-02-12 22:23:19.723088 to 2023-02-13 22:23:19.723088
Current time: 2023-02-13 22:23:19.723710
time.tzname: ('UTC', 'UTC')
Loading secrets...
TIMEZONE_NAME: Europe/Berlin
-----
Logging in to t:connect ControlIQ API...
2023-02-13 22:23:19 INFO     Logging in to ControlIQApi...
2023-02-13 22:23:20 INFO     Reported tconnect software version: t:connect 7.14.0.1
Error occurred querying ControlIQ API for dashboard_summary:
Traceback (most recent call last):
  File "/home/appuser/tconnectsync/check.py", line 85, in check_login
    summary = tconnect.controliq.dashboard_summary(time_start, time_end)
  File "/home/appuser/tconnectsync/api/__init__.py", line 31, in controliq
    self._ciq = ControlIQApi(self.email, self.password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 25, in __init__
    self.login(email, password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 38, in login
    raise ApiLoginException(req.status_code, 'Error logging in to t:connect. Check your login credentials.')
tconnectsync.api.common.ApiLoginException: Error logging in to t:connect. Check your login credentials. (HTTP 200)

Querying ControlIQ therapy_timeline...
2023-02-13 22:23:20 INFO     Logging in to ControlIQApi...
2023-02-13 22:23:21 INFO     Reported tconnect software version: t:connect 7.14.0.1
Error occurred querying ControlIQ therapy_timeline:
Traceback (most recent call last):
  File "/home/appuser/tconnectsync/check.py", line 99, in check_login
    tt = tconnect.controliq.therapy_timeline(time_start, time_end)
  File "/home/appuser/tconnectsync/api/__init__.py", line 31, in controliq
    self._ciq = ControlIQApi(self.email, self.password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 25, in __init__
    self.login(email, password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 38, in login
    raise ApiLoginException(req.status_code, 'Error logging in to t:connect. Check your login credentials.')
tconnectsync.api.common.ApiLoginException: Error logging in to t:connect. Check your login credentials. (HTTP 200)

Querying ControlIQ therapy_events...
2023-02-13 22:23:21 INFO     Logging in to ControlIQApi...
2023-02-13 22:23:21 INFO     Reported tconnect software version: t:connect 7.14.0.1
Error occurred querying ControlIQ therapy_events:
Traceback (most recent call last):
  File "/home/appuser/tconnectsync/check.py", line 115, in check_login
    androidevents = tconnect.controliq.therapy_events(time_start, time_end)
  File "/home/appuser/tconnectsync/api/__init__.py", line 31, in controliq
    self._ciq = ControlIQApi(self.email, self.password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 25, in __init__
    self.login(email, password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 38, in login
    raise ApiLoginException(req.status_code, 'Error logging in to t:connect. Check your login credentials.')
tconnectsync.api.common.ApiLoginException: Error logging in to t:connect. Check your login credentials. (HTTP 200)

-----
Initializing t:connect WS2 API...
2023-02-13 22:23:22 INFO     Logging in to ControlIQApi...
2023-02-13 22:23:22 INFO     Reported tconnect software version: t:connect 7.14.0.1
Error occurred querying WS2 API. This is okay so long as you are not using the PUMP_EVENTS or IOB sync features.
Traceback (most recent call last):
  File "/home/appuser/tconnectsync/check.py", line 127, in check_login
    summary = tconnect.ws2.basaliqtech(time_start, time_end)
  File "/home/appuser/tconnectsync/api/__init__.py", line 43, in ws2
    self.controliq
  File "/home/appuser/tconnectsync/api/__init__.py", line 31, in controliq
    self._ciq = ControlIQApi(self.email, self.password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 25, in __init__
    self.login(email, password)
  File "/home/appuser/tconnectsync/api/controliq.py", line 38, in login
    raise ApiLoginException(req.status_code, 'Error logging in to t:connect. Check your login credentials.')
tconnectsync.api.common.ApiLoginException: Error logging in to t:connect. Check your login credentials. (HTTP 200)

Not able to log in to WS2 API, so skipping therapy_timeline_csv
-----
Logging in to t:connect Android API...
Error occurred querying Android API:
Traceback (most recent call last):
  File "/home/appuser/tconnectsync/check.py", line 156, in check_login
    summary = tconnect.android.user_profile()
  File "/home/appuser/tconnectsync/api/__init__.py", line 55, in android
    self._android = AndroidApi(self.email, self.password)
  File "/home/appuser/tconnectsync/api/android.py", line 44, in __init__
    self.login(email, password)
  File "/home/appuser/tconnectsync/api/android.py", line 65, in login
    raise ApiLoginException(r.status_code, 'Received HTTP %s during login: %s' % (r.status_code, r.text))
tconnectsync.api.common.ApiLoginException: Received HTTP 400 during login: {"statusCode":400,"status":400,"code":400,"message":"Bad Request","name":"invalid_request"} (HTTP 400)

-----
Logging in to Nightscout...
-----
Last basal start time: None (n/a)
Last basal duration: None
Last reading time: None (n/a)
-----
API errors occurred. Please check the errors above.
Created file tconnectsync-check-output.log containing additional debugging information.
For support, you can upload this file to https://github.com/jwoglom/tconnectsync/issues/new
The file -- but NOT the output printed above -- has been sanitized to remove sensitive data.
Please verify and remove any sensitive data, such as your Nightscout URL/secret and pump serial number,
as necessary.

Hey @bjornoleh -- I would try first ensuring they can log in to the t:connect website. I've seen some reports of this before and it typically occurs in users who have never used the online application and have only ever logged in via the mobile app. You might need to reset their password in the app (even if its to the same existing password, if tandem allows). If that still doesn't help, have them go to tconnect.tandemdiabetes.com and follow the "create account" instructions, which will use the desktop t:connect uploader application and should definitely set it up. Otherwise if they still can't log in to the website I'd contact tandem.

I'm having the same issue. I'm trying to set tconnectsync up on a new laptop. It worked on the old one (which is at home so I can't easily compare settings or versions, but I suspect that the version of tconnectsync is not as recent). I can log into both the t:connect website and app just fine, and just confirmed the password. Any other suggestions?

@clegoues any chance that your password has special characters in it? You might be specifying it as an environment variable or in the .env file improperly. I've added some additional logging to show when tconnectsync falls back on the default credentials (which won't work)

Hi,

we are trying to have another go at this again. Unfortunately the issue seems to be related to the fact that that t:connect is not available in this region (Scandinavia). Support pointed us to Diasend and Glooko as alternative portals available here. I don't suppose tconnectsync is able to interface these portals?