Problems reading from Health App: Returned data different from the one shown in the Health app

Hello everyone,

I’ve noticed that data read from the Health App using the search health data action does return data that differs from the numbers shown in the Health App.

Example:
https://www.icloud.com/shortcuts/3801b67028b54e38afeee524cc347321
It just reads the steps fro February 11th 2019 and groups all step data sets from the Health app by day.

For whatever reason it returns a list of two values: 13599 and 0

If I check the same day in the Health app I see: 8519 steps

Am I using the search Health data action wrong or is this a bug?

Thanks a lot in advance!

Any chance you have multiple steps sources? E.g. An iPhone and an Apple Watch.

Shortcuts would retrieve both sets whereas health app will try and give you the actual steps based on both sources, accounting for any double counting.

You can filter in the Find action to just one source.

E.g.

2 Likes

For what it’s worth, your shortcut (and my own which is very similar) is working as expected for me. I can’t see what the issue might be.

1 Like

And as follow up, I don’t have a watch or a second source, so that would be consistent with @sylumer’s suggestion.

Thank you! I guess that’s the reason at least for steps.

If I instead query the resting and activity-base energy expenditure I will also get different results.
I mean I have multiple activity sources, but they usually are not tracking simultaneously. :thinking:

“Usually” may be the key. Any level of overlap would skew the results unless explicitly accounted for.

But according to the Health App for my resting energy expenditure there is only one source, my watch and even there the values queried via Shortcuts and the ones shown in the Health App differ. Not by much, but still.
Also there are some days the values are returned as “0”, despite the Health App clearly showing something.

My numbers in shortcuts were also off compared with the Health app, until I changed “Source is NOT Frank’s iPhone” in “Find Health Samples Where”. For some reason this fixed it.

2 Likes

Using start date picks up from a different point than the Health app.

Look at these resting energy related screenshots. Note the first entry on the 2nd & 3rd images from the health app are incorporating a reading from the 14th and the Shortcuts app starts with the first reading beginning on the 15th, not the first reading that overlaps with the 15th.

That could explain the discrepancies being observed. But you would have to examine the detail of your own data to be sure.

If there’s a data mismatch, with the same source data, it is either a rounding issue or a filtering issue.

1 Like