Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Is Fitbit's HRV data empty?


Hello.
I want to import my HRV data from fitbit charge5 device.

https://dev.fitbit.com/build/reference/web-api/heartrate-variability/get-hrv-summary-by-date/

I can check the api address that can get HRV from the above address, and I want to get it according to the address form.

 


This will result in
{'hrv': []}
An empty list is output like this.
(Encodied_ID is personal information, so it was not posted on the question site. It is implemented in the code.)

If I look up the fitbit manual, it says that Charge5 provides sleep time HRV data, is this a feature that is not yet supported?

If I'm going to post a question to the fitbit developer community about this, where should I put it?

Thanks for posting the answer.

*My execution environment is Colaboratory.

Best Answer
0 Votes
4 REPLIES 4

My code is


import requests
# Get HRV Summary by Date
hrv_1d = requests.get("https://api.fitbit.com/1/user/"+ENCODED_ID+"/hrv/date/yyyy-mm-dd.json", headers=header).json()
hrv_1d

 

​ The part was filled in with the desired day.(ex. this year oct 15th)

 

Best Answer
0 Votes

Hi @J22222 

 

Posting the code as you did is perfectly fine.   Thank you!

 

There are several conditions required for the device to collect HRV data.

  1. In the mobile application, you need to select the "Health Metrics" tile and consent to collecting the HRV data.
  2. You need to have a minimum of 3 hours of sleep.   The sleep log generated must be a sleep stages log.  See Collecting HRV Data.
  3. In the mobile application under "Health Metrics", check to see if HRV data is collected.   If it is, then the data should be available through the Web API.   If data is not available, then we were not able to generate HRV data for that period of sleep and the endpoint will return an empty set.

Best,

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes

Is Health Metrics a service that requires a premium subscription to use? Or can I use it for free if I am a charge5 user?

Best Answer
0 Votes

Hi @J22222 

 

From what I can tell, looking at the data in the Health Metrics tile does not require a premium membership.

 

Gordon

Gordon Crenshaw
Senior Technical Solutions Consultant
Fitbit Partner Engineering & Web API Support | Google
Best Answer
0 Votes