Fitbit integration stopped. Please help me

I had this integration running smoothly since early 2022. All of the sudden it stopped communicating.
I have tried everything to get it active again, but failed. In desperation, I removed \config\fitbit.conf and the configuration.yaml entry:

sensor:
  - platform: fitbit
    clock_format: 24H
    monitored_resources:
      - "body/weight"

Following that, I verified everything from fitbit.com and Login to see my configuration. Then I tried to start over. but when I get to the notifications/configurator [CONFIGURE], it does not seem to do anything. It here is a link https://xxxxx.duckdns.org/api/fitbit as well as the button
[I HAVE AUTHORIZED FITBIT.]
Neither do anything, noting that the linked file does not exist in my home assistant.

It has been a very long time with this manually configured integration. Does anyone have any ideas?

Did you change your Fitbit to use your Google account? As soon as I made that change, the Fitbit integration stopped working for me, and has not started working again.

I’m having the same issue. Have not changed anything except updating Home Assistant as builds are released.

My logs show:

Logger: homeassistant.components.sensor
Source: helpers/entity_platform.py:359
Integration: Sensor (documentation, issues)
First occurred: October 9, 2023 at 4:15:05 PM (1 occurrences)
Last logged: October 9, 2023 at 4:15:05 PM

Error while setting up fitbit platform for sensor
Traceback (most recent call last):
File “/usr/src/homeassistant/homeassistant/helpers/entity_platform.py”, line 359, in _async_setup_platform
await asyncio.shield(task)
File “/usr/local/lib/python3.11/concurrent/futures/thread.py”, line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/src/homeassistant/homeassistant/components/fitbit/sensor.py”, line 519, in setup_platform
authd_client.client.refresh_token()
File “/usr/local/lib/python3.11/site-packages/fitbit/api.py”, line 156, in refresh_token
token = self.session.refresh_token(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/requests_oauthlib/oauth2_session.py”, line 452, in refresh_token
self.token = self._client.parse_request_body_response(r.text, scope=self.scope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/oauthlib/oauth2/rfc6749/clients/base.py”, line 427, in parse_request_body_response
self.token = parse_token_response(body, scope=scope)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/usr/local/lib/python3.11/site-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 441, in parse_token_response
validate_token_parameters(params)
File “/usr/local/lib/python3.11/site-packages/oauthlib/oauth2/rfc6749/parameters.py”, line 448, in validate_token_parameters
raise_from_error(params.get(‘error’), params)
File “/usr/local/lib/python3.11/site-packages/oauthlib/oauth2/rfc6749/errors.py”, line 399, in raise_from_error
raise cls(**kwargs)
oauthlib.oauth2.rfc6749.errors.InvalidGrantError: (invalid_grant)

No. The fitbit is linked to an iPhone that still tracks. The tracking is also in the fitbit site.

Has there been any other updates on this or other users experiencing the same issues?
I am apprehensive to try and restart from scrtah this intergration if I dont have to.

Any help is appreciated.

I have the same issue described by @gregoryborah

I am also experiencing the issue. I think it’s related to Fitbit moving to using Google accounts. My Fitbit integration went offline as soon as I switched to the Google account for Fitbit.

I haven’t switched to Google yet because I feared more troubles… I hope somebody can help solve this issue.

I havent switched to Google. Mine is still the ‘legacy’ conneciton, but failing.

Ended up just switching to Google account and setting up Google Fit from HACS and then connecting with Health Connect. Was also able to use the new entities in the fitbit card.

Not seeing Sleep or Activity yet, but maybe we need some time to sync.

So basically you migrated your Fitbit account to Google Fit and your data appear in HA? Can you explain your migration with more details?

  1. Switch account to Google
  2. Setting up Google Fit from HACS
  3. Setting up Health Connect (What exactly should be done here?

Are there missing steps??

It wasn’t as easy as that ultimately …

  1. switch to Google account
  2. set up Google Fit integration (HACS)
  3. in Fitbit go into your profile and turn on Heath Connect (profile – Fitbit settings – Health Connect)

This brought in some data, but it didn’t include today’s activity and my weight was old.

To resolve this I downloaded the Google Fit app and connected it to read from my Fitbit app via Health Connect also configured it to sync with Health Connect.

Once I did this, my FitBit Data (current) got pulled into Google Fit and then my HA dashboard had all updated data.

FYI … For the first steps I used a video from BeardedTinker.

1 Like

I followed all these steps and it seems to work just fine! Thanks @gregoryborah

I’ve go my data back in HA and it’s what I was looking for!

Looks like 2023.11 moves Fitbit Integration out fo configuration.yaml.

I wonder if things will begin working again with the core integration?

I’ve just seen the exact same thing, but since I followed your steps to migrate my account from Fitbit to Google Fit and Health Connect, I fear it won’t be possible to use both…

I was able to get the FitBit integration working again …

  1. remove any referenced to fitbit (old)
  • fitbit.conf
  • application credentials
  1. Add Fit Bit Integration
  • Name : whatever you want
  • Client ID / Secret (from Fitbit) - make sure you login using you Google Account (if you have migrated)
    !!! very important, is the redirect URL as:

This will allow you to easily link your local HA instance for authorization

After this, I have BOTh fitbit and Google Fit integrations running.

Anyone managed to get multiple profiles working with the new Fitbit integration?

@allenporter & @gregoryborah
I am still having troubles and now I get an error without even trying.
I deleted the old fitbit entries and restarted HA. In settings, I added the integration as UI.
now I get the error
image
Also, I have read earlier that I have to convert to Google. What if you don’t have Google? Any ideas?

I had this error, too. I needed to update the application definition in the fitbit developer settings to fix the redirect_uri parameter value. It needs to be
https://my.home-assistant.io/redirect/oauth
now.

1 Like

Thanks for the quick reply. Where do I make the change suggested.