Open DanHidalz opened 6 years ago
I'm not that fond into coding but as I see here in convertors.py:
if data_point['value'] == 1:
sleepType = 72
elif data_point['value'] == 2:
sleepType = 109
elif data_point['value'] == 3:
sleepType = 112
else:
sleepType = 72
Those states correspond as I have read to 72=sleep, 109=light sleep and 112=awake.
Isn't there a way to convert the fitibit sleep data points to Google Fit sleep types Deep sleep (110), REM sleep (111)?
@DanHidalz Good point. This was written before Fitbit introduced the REM sleep feature. It should be possible now - assuming Fitbit is including that information in the API response - I think they are.
Will look into this. Thanks 😄
I guess they're including it at least that's what I could extract from here: https://dev.fitbit.com/reference/web-api/sleep/
If this could be included I'm definitely buying one back! Lol. Let me know if you are able to implement it or have news regarding it!
Thanks!!
Hi, people! Are there news regarding this? Thanks in advance!
The https://github.com/Woyken/fitbit-googlefit fork seems to implement this.
Thanks a lot @maleadt!
I previously owned a Fitbit device and sold it because its closed environment. Now I'm thinking on getting one back provided that this allows me to sync most of my data to Google Fit but I have one questions.
Would this script allow me to sync the new sleep states that Fitbit implemented? REM sleep and the kind.
Thanks a lot for your help!