Closed WillScott73 closed 1 year ago
Hi @WillScott73,
Can you add a bit more info please? What version of the add on are you using? When you say it's not updating do you mean you do initially get a value or it shows as unknown?
Thanks
v1.0.0
The sensor has a value of 72 and has not changed for 4 days, even though my fit data shows heart rate changing by the minute.
All other sensors update as expected.
I'm a .NET and Go developer, but since getting in to Home Assistant I have started to find my way around Python. You know your code well, so if you can give me clear instructions on what to try, I'm comfortable with that. Presumably I can modify code in place in custom_components/google_fit folder?
I can't see anything in the log about it failing to fetch the data or there being no data available.
The only way to debug this would be to go into the OAuth Playground yourself and see if the data shows there. You'll need to use the data point changes with user ID as me
. This link explains it in a bit more detail: https://developers.google.com/fit/rest/v1/get-started#try_the_rest_api_in_the_oauth_playground
You can modify the code in place but you will need to restart your home assistant for any changes to take place
POST /fitness/v1/users/me/dataset:aggregate HTTP/1.1 Host: www.googleapis.com Content-length: 198 Content-type: application/json Authorization: Bearer <redacted> { "aggregateBy": [{ "dataTypeName": "com.google.heart_rate.bpm" }], "bucketByTime": { "durationMillis": 86400000 }, "startTimeMillis": 1689329728000, "endTimeMillis": 1689934528000 }
does return data in the Playground. I'll take a look at the code locally sometime next week to see what's going on.
Since playing with this in the Google playground, the HA integration has started to pull the data back. Assuming it was an issue at Google's end, possibly with auth?
Since playing with this in the Google playground, the HA integration has started to pull the data back. Assuming it was an issue at Google's end, possibly with auth?
Thanks for updating @WillScott73.
Please feel free to open this up again if you manage to capture a point when the data is in Google playground but not Home Asstiant
Sorry for bothering but it seems I have the same issue. Since the installation some days ago, the heart rate did not change once. On the one hand I could ask where this playground is in order to wake google up too. But maybe it would be useful to figure out the actual issue is. Sadly I have no clue how any of this works. I also have the feeling that the other sensor data (sleep, steps) is only updating after I open google fit on my phone. At least they get updated ..
Same issue here. Works if I open the Google Fit app, otherwise, no update occurring.
Hi @r2p2, without knowing what data is actually in your account on the Google servers it's really hard to debug what's going wrong. It's not about using the playground to get the values to appear, but just to figure out at what stage in the pipeline the data is disappearing. If you go to this website it should give you a good guide to getting started with retrieving your data: https://developers.google.com/fit/rest/v1/get-started#try_the_rest_api_in_the_oauth_playground
If you get stuck, give me a shout
Same issue here. Works if I open the Google Fit app, otherwise, no update occurring.
This specifically sounds like an issue with your phone putting the app to sleep so it can't update in the background. I won't try and tell you how to fix this here as each phone has their own different methods to manage what they normally refer to as power saving but a quick Google should give you the answer
Same issue here. Works if I open the Google Fit app, otherwise, no update occurring.
This specifically sounds like an issue with your phone putting the app to sleep so it can't update in the background. I won't try and tell you how to fix this here as each phone has their own different methods to manage what they normally refer to as power saving but a quick Google should give you the answer
I have done that now, I will monitor it and report back here.
System Health details
System Information
Home Assistant Community Store
GitHub API | ok -- | -- GitHub Content | ok GitHub Web | ok GitHub API Calls Remaining | 4598 Installed Version | 1.32.1 Stage | running Available Repositories | 1340 Downloaded Repositories | 62AccuWeather
can_reach_server | ok -- | -- remaining_requests | 46Home Assistant Cloud
logged_in | false -- | -- can_reach_cert_server | ok can_reach_cloud_auth | ok can_reach_cloud | okHome Assistant Supervisor
host_os | Home Assistant OS 10.3 -- | -- update_channel | stable supervisor_version | supervisor-2023.07.1 agent_version | 1.5.1 docker_version | 23.0.6 disk_total | 234.0 GB disk_used | 16.8 GB healthy | true supported | true board | rpi4-64 supervisor_api | ok version_api | ok installed_addons | Advanced SSH & Web Terminal (15.0.3), Samba share (10.0.2), Studio Code Server (5.8.1), MariaDB (2.6.1), Home Assistant Google Drive Backup (0.111.1), Node-RED (14.3.0), Mosquitto broker (6.2.1), Cloudflared (4.2.0), RPC Shutdown (2.4), Zigbee2MQTT (1.32.1-1), InfluxDB (4.7.0), Grafana (9.0.2), Double Take (1.13.1), MQTT Explorer (browser-1.0.1), Piper (0.1.3), Whisper (0.2.1), Google Assistant SDK (2.5.0), Git pull (7.13.1), Double Take Proxy (1.0.0)Dashboards
dashboards | 6 -- | -- resources | 39 views | 27 mode | storageRecorder
oldest_recorder_run | 12 July 2023 at 05:18 -- | -- current_recorder_run | 17 July 2023 at 14:04 estimated_db_size | 502.72 MiB database_engine | mysql database_version | 10.6.12Checklist
Describe the issue
The heart rate sensor is not updating.
Reproduction steps
Debug logs
Diagnostics dump
No response