Hello. I just tested Fitbit today with .94 and it seems to be working now! After I authorized the data in Fitbit Developer section and clicked the button, Firefox prompted me to save a file called ‘callback’. The page remained and nothing else happened. However when I went into HA the notification requesting Fitbit be configuration was gone and my steps for today, on par for a sloth, appear.
Indeed it is @keith-michael! I’ve also removed the fitbit custom component and it all seems to be working a treat!
I’m having a problem with the configuration process:
The Fitbit hass popup tells me to add http://myip:8123/api/fitbit/callback
in the app Callback URL. The problem is that the fitbit website wants an https address. So to do this, I use my public domain https://hass.mydomain.com/api/fitbit/callback
. The info gets accepted, I save the app BUT firefox doesn’t try to download any file (from what I seem to understand it should download a callback file?)
Back on hass, I press the blue confirmation button, i open fitbit.conf
and I add ID and secret (within " ").
Now hass asks me to go to http://myip:8123/api/fitbit
which results in this error on the fitbit website. " The app you’re trying to connect did not provide valid information to Fitbit. Please report this issue to them. Developer information: invalid_request - Invalid redirect_uri parameter value"
Even if I try and reach https://hass.mydomain.com/api/fitbit/
I get the same exact error.
@sooty Pls send help
Hi @AlexKalopsia. It is a while since I got this working in my environment, however from memory after the update to .94 I removed all the custom component config elements and followed the standard component install documented here --> https://www.home-assistant.io/components/fitbit/ and it worked as described.
Is it working, after removing everything. You have to make that you remove also the fitbit.conf file.
Did you ever get this to work? I am running into the exact same issue.
Nope. Not sure if I actively tried to fix the issue, but I still have the notification telling me that FitBit needs to be configured
I’ve been trying to get this to work with my Nabu Casa url all day without success. I keep getting stuck at the Fitbit information error. If anyone figures this out with the latest version of HA please let us know how you did it.
Same issue as above.
I finally got it to work!!! Here’s a small guide (this works for my setup with reverse proxy):
Step 0 (in case you already tried to set it up and failed)
- Login on https://dev.fitbit.com/ and delete your existing app
- From the hass folder remove
fitbit.conf
Step 1 (setting up the configuration files)
- Add the FitBit sensor following the official instructions
- Open
configuration.yaml
and make sure you set the HTTP platform to include thebase_url
to your Home Assistant external url. It should look something like this:
Please note that it is necessary to includehttp: base_url: https://myhassurl.com
https://
to the url - Restart Home Assistant
Step 3 (follow instructions on screen)
- Home assistant will guide you in the process of creating the FitBit app.
- The callback url should look something like
https://myhassurl/api/fitbit/callback
- I set my app as Read-Only.
- Once you have followed all the steps, the link to authorze the app should look somethig like
https://myhassurl.com/api/fitbit/
Step 4 (authorize app)
- Copy the url that Home Assistant will tell you to visit and paste it on your browser
- Select whatever data you want to have access to and press Allow
- Your browser will try and downoad a file. Ignore the file. You will not be given any confirmation message after pressing Allow
Step 5 (enjoy)
Now all the data will be correctly pulled in Home Assistant. To make sure that’s the case, you can test the sensors sensor.weight
or sensor.steps
.
That’s it, I hope this helps, Ill see if I can push changes to the official documentation! Special thanks to Discord’s Tinkerer who helped me figuring all of this out.
I get an error: 500 Internal Server Error
Server got itself in trouble
This error is at the latest step when I want to authorize Fitbit. I can tick the desired boxes and click “Allow”. Then I get this error
This method worked for me.
Note: when I clicked “Allow” a callback file downloaded however there was no success notification or page reload. The only indicator that something happened was the download.
Edit: the callback file is a simple text html file that says, “Fitbit has been successfully authorized! You can close this window now!”
Glad it worked for you! And yes, I had the same exact thing with no confirmation. I am currently investigating a problem now where I think because of this I clicked like 3 times on Allow, and now I have 3 sensor.steps
and 3 of all the others I am guessing the two things are connected
Hi,
So, I just want to really express my love for you AlexKalopsia. I have spent about 25 hours over about 3 weeks with this issue and you sir, you have calmed my mind. Your solutiion works, This far I have only added the weight to my home assistant and if nothing else work I’m still, so relived that I don’t have to see “Developer information: invalid_request - Invalid redirect_uri parameter value” anymore. Thank you again.
Thank you so much! I finally got it working following your steps and using my Nabu Casa URL. Now I just need to figure out a way to add two Fitbit devices to HA without installing a second instance. Any ideas?
I’m still having difficulty with Alex’s instructions.
For the base_url, I am adding my external url: https://secretabc123.ui.nabu.casa
Then for the callback URL on the fitbit app registration, I am using: https://secretabc123.ui.nabu.casa/api/fitbit/callback
When I go to authorize the app, I am using: https://secretabc123.ui.nabu.casa/api/fitbit
Is this correct? I am still getting the “Invalid client_id” when I go to authorize it.
I ran into this too, when I checked the autorization URL after going to the page (it updates to include the client id) I noticed the client ID was wrong for some reason. I changed it to the client ID I got from FitBit and BAM!! it works
The client ID was correct for me, still not working. When you click the link to authorize, are you having to replace the internal IP address for the external one? Once I replace the 192.x.x.x:8123 with my nabu casa link, I’m able to get to the page where I can select the data that I allow to be seen, but then run into a 500 Internal Server Error (I saw that someone above also had the same error).
Edit: Well I sure feel dumb. I just realized that I had an extra space before “http:” in my config (it gave no errors). It’s working now!
It happens to all of us lol, glad you got it working
Can you use the fitbit integration if your Home Assistant app is not exposed to the internet?