Fitbit Error

Has anyone gotten FitBit to work with the latest release?

my sensor file:

- platform: fitbit
  monitored resources:
    - "activities/heart"
    - "activities/steps"
    - "sleep/efficiency"

I followed the steps to register a new app in the fitbit dev site.
for the application website and organization website, i’ve tried the local IP, loopback ip, and domain name.
for the callback url, i’ve tried: the local ip:8123/auth/fitbit, loopback, and domain as well.

I enter in the client id and client secret. The next phase of the configurator says to go to the localIP:8123/auth/fitbit site and authorizing. however, when i go to the site, i keep getting the following message:

    "message": "API password missing or incorrect."

Has your fitbit.conf file been created?

Yes it was created and I entered in the client is and client secret

This is not related with fitbit.
It’s your HA password

HA password for http? i’m able to view all of my frontend.

yes, but not fitbit.

You need to add “?api_password=yourpassword”, or remove your http pass from HA

Thank you. I added that and it brought me to this:

Developer information: invalid_request - Invalid redirect_uri parameter value

follow this:

I was finally able to get it working. HA version 19.3 Here’s what worked for me:

sensors.yaml file:

- platform: fitbit
    - "activities/heart"
    - "activities/steps"
    - "sleep/efficiency"


Application Website *

Organization Website *

Callback URL * (Local IP of HA)
in a doc/example somewhere it has as the IP and that didn’t work for me.

Last, when you go to the auth site… yours will be your local ip ( make sure that the correct client id is listed for your application. Mine was a wrong one, so i just changed it to relfect the new one i created. BTW, the new version, doesn’t require the ?api_password= anymore which is better for security.

FYI… heart doesn’t show up for me. shows unknown Bpm

Thanks, even i got it working, but seems it stops after sometime with error-

File “/home/pi/.homeassistant/deps/oauthlib/oauth2/rfc6749/clients/”, line 194, in add_token
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)

I too can confirm that i am receiving this error

It might be i am tracking too many values so the API limit is getting hit. Will try with just steps and verify today.

Were you able to get this working?

Nope,still broken

My Fitbit tracking started working yesterday. Not sure if it was Fitbit API issue but you might want to check to make sure if yours is working.

Also do you know of a way to not have to restart HASS to get the most updated information?

There seems to be an issue in the base python-fitbit library. I’ve issued a pull request to try to get it fixed: Catches OAuth token expired errors and fetches new token by shimeez · Pull Request #92 · orcasgit/python-fitbit · GitHub

I’ve verified that it fixes this locally