The documentation on Fitbit - Home Assistant (home-assistant.io) is quite limited and does not explain a lot, so I am left guessing what to do. I edited the configuration.yaml. I think I created a developer account (going to Fitbit SDK does not provide any login, but when I went to https://studio.fitbit.com/ i could create an app.
According to the integration page, I should:
“Restart Home Assistant once this is complete. Go to the frontend. You will see a new notification for configuring Fitbit.”
But what is “the frontend”?? If I go to the Homeassistant page I dont see any notification or anything. There is no error in the log regarding fitbit.
hmm, after tinkering around a bit, I finally managed to do it. But I am trying to see how I did it (was doing a lot of other stuff at that time) and cant even understand how I did it. I dont see fitbit in my integration page, but I do see it now under entities.
Not sure why they made this integration so different to all the other integrations, its really impossible to use it with the very limited documentation page.
What I do see, is that the correct page to create your app at fitbit is this link: Applications (fitbit.com)
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: