cyberjunky / home-assistant-google_fit

:hearts: This component tracks your Google Fit activities.
MIT License
99 stars 20 forks source link

Heart rate sensor unknown #22

Open damousys opened 2 years ago

damousys commented 2 years ago

Sensor heart rate is unknown and sleep is 0 rest of the sensors are working.

Anyone knows where I can get log's to see where it is going wrong?

cyberjunky commented 2 years ago

Can you try version 1.0.7? I added the scopes and it kept working, i have no heart/sleep data to test with.

damousys commented 2 years ago

To bad but no succes after updating 2022-06-07 10:04:31 DEBUG (SyncWorker_3) [custom_components.google_fit.sensor] Last weight 112.3 2022-06-07 10:04:33 DEBUG (SyncWorker_6) [custom_components.google_fit.sensor] Last height 186.0 2022-06-07 10:04:34 DEBUG (SyncWorker_3) [custom_components.google_fit.sensor] Steps 353 2022-06-07 10:04:34 DEBUG (SyncWorker_4) [custom_components.google_fit.sensor] Starttime 2022-06-06T17:00:00Z, Endtime 2022-06-07T11:00:00Z 2022-06-07 10:04:34 DEBUG (SyncWorker_4) [custom_components.google_fit.sensor] Sleep dataset {'session': []} 2022-06-07 10:04:34 DEBUG (SyncWorker_3) [custom_components.google_fit.sensor] Move time 0 2022-06-07 10:04:34 DEBUG (SyncWorker_1) [custom_components.google_fit.sensor] Calories 0 2022-06-07 10:04:34 DEBUG (SyncWorker_0) [custom_components.google_fit.sensor] Distance 0.26

cyberjunky commented 2 years ago

@damousys I have dug into it, and the call for sleep data is empty in the code, investigating further, thanks or feedback

damousys commented 2 years ago

Now i have got this in my logs 2022-06-07 12:06:07 DEBUG (SyncWorker_12) [custom_components.google_fit.sensor] Sleep dataset {'session': [{'id': 'Walk1654592040000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654592700000', 'modifiedTimeMillis': '1654595944747', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}]}

2022-06-07 20:44:41 DEBUG (SyncWorker_5) [custom_components.google_fit.sensor] Sleep dataset {'session': [{'id': 'Walk1654592040000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654592700000', 'modifiedTimeMillis': '1654595944747', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}, {'id': 'Others1654592040000', 'name': 'Others', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654594140000', 'modifiedTimeMillis': '1654627125301', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 108}, {'id': 'Walk1654597500000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654597500000', 'endTimeMillis': '1654597740000', 'modifiedTimeMillis': '1654627125301', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}, {'id': 'Walk1654599060000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654599060000', 'endTimeMillis': '1654599360000', 'modifiedTimeMillis': '1654627125301', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}]}

2022-06-07 21:15:09 DEBUG (SyncWorker_8) [custom_components.google_fit.sensor] Sleep dataset {'session': [{'id': 'Walk1654592040000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654592700000', 'modifiedTimeMillis': '1654595944747', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}, {'id': 'Others1654592040000', 'name': 'Others', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654594140000', 'modifiedTimeMillis': '1654627125301', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 108}, {'id': 'Walk1654597500000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654597500000', 'endTimeMillis': '1654597740000', 'modifiedTimeMillis': '1654627125301', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}, {'id': 'Walk1654599060000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654599060000', 'endTimeMillis': '1654599360000', 'modifiedTimeMillis': '1654627125301', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}]}

2022-06-07 23:47:42 DEBUG (SyncWorker_3) [custom_components.google_fit.sensor] Sleep dataset {'session': [{'id': 'Walk1654592040000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654592700000', 'modifiedTimeMillis': '1654595944747', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}, {'id': 'Others1654592040000', 'name': 'Others', 'description': '', 'startTimeMillis': '1654592040000', 'endTimeMillis': '1654594140000', 'modifiedTimeMillis': '1654637993001', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 108}, {'id': 'Walk1654597500000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654597500000', 'endTimeMillis': '1654597740000', 'modifiedTimeMillis': '1654637993001', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}, {'id': 'Walk1654599060000', 'name': 'Walk', 'description': '', 'startTimeMillis': '1654599060000', 'endTimeMillis': '1654599360000', 'modifiedTimeMillis': '1654637993001', 'application': {'packageName': 'com.xiaomi.hm.health'}, 'activityType': 7}]}