Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REM State sync #47

Open
DanHidalz opened this issue Dec 17, 2017 · 6 comments
Open

REM State sync #47

DanHidalz opened this issue Dec 17, 2017 · 6 comments

Comments

@DanHidalz
Copy link

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!

@DanHidalz
Copy link
Author

I'm not that fond into coding but as I see here in convertors.py:

Convert sleep data point to google fit sleep types

	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)?

@pkpio
Copy link
Owner

pkpio commented Dec 18, 2017

@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 😄

@DanHidalz
Copy link
Author

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!!

@DanHidalz
Copy link
Author

Hi, people! Are there news regarding this? Thanks in advance!

@maleadt
Copy link

maleadt commented Sep 20, 2018

The https://github.com/Woyken/fitbit-googlefit fork seems to implement this.

@DanHidalz
Copy link
Author

Thanks a lot @maleadt!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants