This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Active energy on apple health synced from Garmin

Hello,

It seems that the active energy synced on apple health is not correct:

active_energy_apple_health = active_energy_on_garmin + sum(calories_burned_during_activities_logged_on_garmin)

(1216 ~ 537+332+348 (see screenshots))

=>Which is not correct since the active part of the calories_burned_during_activities_logged_on_garmin is already included in the active_energy_on_garmin.


Why isn't the Garmin simply syncing active_energy_on_garmin as the active energy on apple health ?


  • do you see 2 Active Energy entries in Apple Health for this date?  Please provide a screenshot following this path:

    Apple Health > Show All Health Data > Active Energy > Show All Data > Select 3 Feb 2022 > Take Screenshot

    Additionally, please go through each of the dates for the last few weeks to see if ANY of the dates have 2 entries.  Finally, so that I may assist you further, please reply with the following:

    1. May we, if necessary, have permission to email you?
    2. May we, if necessary, have permission to view/access your Garmin Connect account?
    3. In what country do you live?
  • Thanks for your answer.
    I am sure that there was always only one entry from the Garmin on that day (the one showed in the screenshot above).
    =>Attached the screenshot you asked for.
    BTW, it seems that the entry was updated with the correct value on the 7th of Feb, did you change anything on how the sync is done?

    1. Yes.
    2. Yes
    3. France.

  • I am actually looking for the screen that you see BEFORE going into the Details screen for the day.

    Apple Health > Show All Health Data > Active Energy > Show All Data > Select 3 Feb 2022 > Take Screenshot (Do not go into details for this day)

    Additionally, I believe that the value shown in Apple Health will not fully match the value shown for Active Calories in Garmin Connect until the day is over.  So, if you look at each the next morning, they should both show the same value.  (We did not change anything on how the sync is done.)

    When reviewing the last few weeks of Active Energy in Apple Health, did you see ANY dates that showed 2 entries for any given day?

  • Apple Health > Show All Health Data > Active Energy > Show All Data > Select 3 Feb 2022 > Take Screenshot (Do not go into details for this day)

    =>I sent two screenshots, the first one is the one you are referring to.

    When reviewing the last few weeks of Active Energy in Apple Health, did you see ANY dates that showed 2 entries for any given day?

    =>All good here, nothing to report.

    Additionally, I believe that the value shown in Apple Health will not fully match the value shown for Active Calories in Garmin Connect until the day is over.

    Alright, I am pulling the active energy from apple health during the current day so it's annoying if it starts being correct only the day after. 
    =>So I guess the only way to have correct and fresh data is by requesting the Garmin Connect API directly?

  • I sent two screenshots, the first one is the one you are referring to.

    You're right!  That was my mistake.  I wasn't looking closely enough.  Slight smile

    So I guess the only way to have correct and fresh data is by requesting the Garmin Connect API directly?

    Worth a shot!

  • It looks like Garmin isn't implementing HealthKit the way that apple intended (and it causes all kinds of issues).  Each sample is supposed to have a start and end date.  In the screen shot you posted, you can see that Garmin is just using "date"   So, Apple Health looks at that and assuming that Garmin Connect is saying that you burned 1216 calories in one second.   It thinks that because Gamine sends over the total for the day rather than sending samples as the happen.  A well behaved HealthKit app would send each workout over with calories burned info for that actiivity with the start and end time indicated.  So, during the 23:19 you did you first walk you burned 332 calories.  And for any active calories outside of a workout they should what you burned and the time range in which you burned them.   Instead, it looks like they send over the count for each activity and a summary for the day (which they should NEVER send), so you result in duplication.   The same exact thing happens for for distance walked+run, etc. in short, if you use a Garmin watch to track anything, you can't allow it to write anything to health and expect it to work because they aren't writing the data the way that apple expects it to be written.   By putting start and end, Health can look at conflicting sources and figure out which takes priority for a given period.  

    So lets say I wore my Apple Watch while using my 530 and a chest strap to track a bike ride.  In theory I should be able to make Garmin Connect a higher priority and it would just override the much less frequent heart rate samples my watch writes.  But in practice, it will be logged in correctly and break something.  Thats why you see so many people using things like RunGap because they actually implement the standard correctly instead of what Garmin is doing.   This is also why an activity from a Garmin Device will not show a Heart Rate graph in health, or complete the rings on a apple watch.    It comes over as summary data rather than one sample per second with a start and end stamp for each sample.   

    I really wish Garmin would fix this as their products are vastly better to use for tracking activity, but if you want to leverage that data on iOS it's hard.   I'd LOVE to be able to get sleep, all the fitness data, VO2Max, etc. to show up in Health (Garmin has all of that, and there are APIs for it) but it's all either not there, or not there correctly.  

  • Is there a workaround for this ? I really want my move rings to update when I use my Garmin . All the other rings do but the move … now I’m using starva as a middle man and works as expected but I rather go direct from Garmin .

  • Garmin connect had an update today, any chance they fixed this ? I’m away this week and can’t test it .. really want my activity rings to work with connect 

  • Hi Garmin-Kevin has this issue been fixed ? I still don’t see my active energy ring moving in apple activity after I sync my Garmin workout …. Only thing that works is using strava as a middle man .

  • I just tried syncing a run this morning and it looks like the active energy calories were placed under the resting energy category for Apple Health. Is anyone else seeing this? 

    edit: After checking active calories, there is an entry as well but the previous observation is correct that apple appears to have an issue interpreting it because there is no start/stop time 

    edit: Turning off Garmin sync with Apple Health but allowing Strava to sync with both fixed the issue with my rings. Both exercise and move rings filled appropriately.