Ok I figured it out also. The main problem is that the documentation on the Fitbit integration page is terrible.
You have to be connecting to HA with https. (not mentioned)
You have to have the instance named correctly under Settings → network → local network with the https url (not mentioned)
You have to edit the fitbit.conf file, which is easy but there’s no mention that the file already exists. I spent a lot of time trying to find an example of that file when all I really had to do was open it and enter the info. It should be mentioned that the file was created by the fitbit integration at the correct location and that it is already set up except for the values you must enter.
It errors because when you click the button on the fitbit site to allow the integration, it redirects to your HA instance, which prompts you to download the callback. Obviously the callback isn’t configured correctly. There is no indication on the fitbit site or anywhere else that it was successful.
There is no mention that you have to restart at least twice.
Once you’re done, the various data you set up in the main config file are listed as entities. You can then add them to your dashboard, etc.
wow, nice write up! And yes I do remember that fitbit.conf file to also be a major issue for me. I hope whoever manages Fitbit - Home Assistant (home-assistant.io) will see your post and update that page.
@HTX I noticed that the documentation is just a wiki so we could modify it ourselves. But I cant really reproduce the steps fully anymore to write a good explanation there. Do you still have the full overview?
I just went through this. After you complete the configuration and authorize the app access, the tokens are populated in fitbit.conf automatically by the integration.
Same here. Running SSL with a wildcard SLL certificate. Set up the App within the Fitbit developer account, and entered the Client ID & secret. I get the same error:
I had an existing fitbit.config folder that I deleted, then restarted HA. This recreates the fitbit.config.
Go to Entities and you should find one called Fitbit. Click on it and then go to Info. There should be instructions here to follow… Including, go to Login, make sure Application Type is Personal. Set Callback (Redirect URL) is your https://[your_HA].ui.nabu.casa/api/fitbit/callback
Then go update fitbit.config file with Client ID and Secret. Others have mentioned Access and Refresh Tokens but these get automatically added later.
After Clicking I HAVE SAVED CLIENT ID AND SECRET, a new Fitbit entity should load. Go into it, then info again and there should be a link to follow to Authorize Fitbit. Following that link, selecting all and clicking ALLOW cause a file to download but I just went back to HA and clicked I HAVE AUTHORIZED FITBIT.
Restart HA and entities should load. I had 1 entity load without restarting, then after restart they were all there.
in case you hold a domain you can use, you could then also run it via Cloudflare.
if not you can buy yourself a cheap domain *e.g. godaddy or directly at cloudflare and set a direct, encrypted https access to your home assistant.
Thanks @Kuechenfenster for the reply. In fact I´m already using Cloudflare. I tried to set up the fitbit integration again but now, not even the fitbit entity is showing up in my HA anymore
So thats the configuration for my configuration.yaml:
as a smartass as I’m I noticed my fitbit integration is currently offline as well… had no time to look into it yet. maybe it could be as fitbit cloud is now transfered to google directly… I’m unsure …
Can anyone confirm if this integration is broken or not once after your Fitbit account migrates to Google? I originally set this up before the migration and it was working, after my account was migrates to Google it stopped working. I’ve made a new app in Dev Fitbit, still no joy.
Would this now be accessable via the Google integration?