YorkshireIoT / ha-google-fit

Home Assistant Google Fit Custom Component

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sleep data goes to 0

crstian19 opened this issue · comments

System Health details

System Information

version core-2023.4.5
installation_type Unknown
dev false
hassio false
docker false
user root
virtualenv false
python_version 3.10.10
os_name Linux
os_version 6.2.9
arch x86_64
timezone Europe/Madrid
config_dir /config
Home Assistant Community Store
GitHub API ok
GitHub Content ok
GitHub Web ok
GitHub API Calls Remaining 4968
Installed Version 1.32.1
Stage running
Available Repositories 1272
Downloaded Repositories 16
Home Assistant Cloud
logged_in false
can_reach_cert_server ok
can_reach_cloud_auth ok
can_reach_cloud ok
Dashboards
dashboards 3
resources 9
views 6
mode storage
Recorder
oldest_recorder_run April 15, 2023 at 10:24 AM
current_recorder_run April 18, 2023 at 11:29 PM
estimated_db_size 123.88 MiB
database_engine sqlite
database_version 3.38.5
Spotify
api_endpoint_reachable ok

Checklist

  • I have enabled debug logging for my installation.
  • I have filled out the issue template to the best of my ability.
  • This issue only contains 1 issue (if you have multiple issues, open one issue for each issue).
  • This issue is not a duplicate issue of currently previous issues..

Describe the issue

I have been using the integration for a few days and for the "Sleep data" part it is not working properly, as you can see in the picture, it writes 0 constantly.

Also I think too many requests are made to the Fitness API and we may get banned.

image

Last 7 days total of requests
image

Reproduction steps

Watch sleep data panel

Debug logs

No

Diagnostics dump

No response

Hi @crstian19 ,

I've changed this issue so it just focuses on only one issue.
I haven't seen this in my own install, so I can't reproduce it.
Would you be able to attach the extra debug logging from the sensor at the points when the sleep data hits 0? It might provide some insight in to what's going on?

R.e. the too many requests to the API issue:
This is something I've been thinking about. I went to check out the quotas and usage on my own account and for me at least I don't think I'll ever be getting near the limit, even with an update interval of 1 minute:
image

However, I realise their limit may not be the same as mine for whatever reason. I've added to new issues to make the update interval configurable: #35 and #36

Can you explain me how to show that extra debug of the sensor?

Hi @crstian19 ,

I've changed this issue so it just focuses on only one issue. I haven't seen this in my own install, so I can't reproduce it. Would you be able to attach the extra debug logging from the sensor at the points when the sleep data hits 0? It might provide some insight in to what's going on?

R.e. the too many requests to the API issue: This is something I've been thinking about. I went to check out the quotas and usage on my own account and for me at least I don't think I'll ever be getting near the limit, even with an update interval of 1 minute: image

However, I realise their limit may not be the same as mine for whatever reason. I've added to new issues to make the update interval configurable: #35 and #36

Can you explain me how to show that extra debug of the sensor?

Configuring log levels is explained here: https://www.home-assistant.io/integrations/logger/

In this case if you add the following to your configuration.yaml

logger:
  default: info
  logs:
    custom_components.google_fit: debug

Hi @crstian19, are you still having issues with sleep data going to 0?

Yes, and this is the log.

image
image

Thanks for all the info @crstian19 but I still can't figure it out from that.

I've pushed up a new release (v0.3.1) with a bunch of extra debug logging when there's no sensor data, or it is 0. Would you mind updating and posting your logs again? Thanks

It's now been over a month with no response. Closing this issue down.

Please comment on this explaining why it is still and issue and I'll reopen.