Google Fit Support

Thanks to your proposal @rafspeik I am able to progress : the python3 script_google_fit.py was able to be run, and after been on my raspberry so as to execute the routine in local, it opens automatically the browser, but unfortunatly this is what appears :frowning:
Do you know what could be wronf, and need to be corrected ? :pray:
Everything before have been done from my PC

I have the same problem. Did you manage to solve it?

This project and the instructions in the README worked perfectly for me.

1 Like

Thank you very much @rafspeik for you link.
It enables me to generate the .google_fit.token after a sudo python get_credentials.py
But the last problem is that after puting this .google_fit.token on the homeassistant directory, and restarting HA, I don’t seen any sensor.google_xxx :thinking:
Do you know what is the last step I have missed ?
I don’t know if it is linked, i just have this message after the sudo python script :thinking:

[15255:15255:0723/001341.057368:ERROR:zygote_host_impl_linux.cc(90)] Running as root without --no-sandbox is not supported. See https://crbug.com/638180.

and if I don’t put sudo, it is unable to generate the token

Traceback (most recent call last):
  File "get_credentialsb.py", line 27, in <module>
    main()
  File "get_credentialsb.py", line 21, in main
    with open('.google_fit.token', 'wb') as token:
IOError: [Errno 13] Permission denied: '.google_fit.token'

What’s the easiest way to convert centimeters to inches? Anyone?

With a Template Sensor, it’s easy to convert given values into others if the unit of measurement doesn’t fit your needs.

Hi,
I have tried the instructions in the README but when I execute “python get_credentials.py” nothing happens

any advice ?

Thank you!

If anyone is still having scope/authentication issues I’ve just created a new Google Fit integration that uses the UI completely for authentication + configuration and utilises the same approach as the Google Calendar core integration by leaning on the built in Home Assistant OAuth2 config flow that is used for configuring the likes of Spotify:


If you want to try it out it’s here: GitHub - YorkshireIoT/ha-google-fit: Home Assistant Google Fit Custom Component

7 Likes

Dude, you’re epic! Works like a friggin charm!!!

Hey kevjs, I realize this post is like 5 years old, but have you found a solution to pushing weight to Google Fit?
I know it’s being deprecated by 12/2024 but still would be useful…

I am using following integration and it pushes weight to HA from GFit

Ah yes! I have that integration too. But I would like to do it the other way round:
The Miscale measures the weight so HA has it. But I would like to send that to GFit so I don’t have to do it manually.

1 Like

@kgroshert I ended up writing a service that I spin up in a container which exposes an API that syncs my weight and body fat to Fitbit. It also supports multiple users. You could use that to send data to fitbit which in turn can sync to google fit via Health Connect