Which heart rate API should I use?

Former Member
Former Member

I've been using my own made Watch Face for a few years now and I'd like to add my current/last heart rate and resting heart rate as shown in the heart rate widget. None of the API options I've tried gives me the same data as the widget.

- Toybox::UserProfile::Profile.restingHeartRate always gives me "0".

- Toybox::ActivityMonitor.getHeartRateHistory using the iterator with a duration of 4 hours I get numbers that close to the widget, but there never the same. The max heart rate is even higher than the max heart according to the widget, so something is definitely there.

- Toybox::Activity::Info.averageHeartRate and currentHeartRate gives me similar stats to the ActivityMonitor option above, but slightly different and still different from the heart rate widget.

I'm using the Vivoactive HR and the heart rate widget shows a graph of my heart rate of the last 4 hours, current heart rate, resting heart rate, lowest heart rate of the last 4 hours and highest heart rate of the last 4 hours.

Can someone tell me how to retrieve the same heart rate numbers as this widget uses?

  • Former Member
    0 Former Member

    Is there anyone with some relevant information into this matter? Perhaps someone used one of these API parts successfully or found another solution to show accurate heart rate data in a watch face.

  • In a watchface, your best source for current HR will be Activity.Info.currentHeartRate .

    On a va-hr, the screen will only update once a minute at most times, so that could explain part of what you see.  Some devices support "1hz" updates on watch faces so would probably show more accurate numbers.

  • Former Member
    0 Former Member in reply to jim_m_58

    Thank you for your reply. Perhaps it's not possible on this device to show the actual current heart rate in a watch face. I don't want to use a number when I know it's not accurate, so for now I won't add the current heart rate to my watch face. I don't really care about the min and max values of the last 4 hours. Those were mostly for testing purposes.

    I would like to add the resting heart rate to my watch face and this shouldn't be a problem for the update interval. Has anyone used the Toybox::UserProfile::Profile.restingHeartRate or a different part of the API to show an accurate resting heart rate on a Vivoactive HR watch face?