cagnulein / qdomyos-zwift

Zwift bridge for smart treadmills and bike/cyclette
https://www.qzfitness.com/
GNU General Public License v3.0
369 stars 109 forks source link

[BUG] Heart Rate drops to 0 every other second in Peloton Apple TV app #636

Closed hoveeman closed 2 years ago

hoveeman commented 2 years ago

Describe the bug While broadcast heart rate from QZ to the Peloton app, the heart rate will drop to 0 every other second. Video attached. This makes the statistics in Peloton be incorrect. Inside of QZ my heart rate is accurate the whole time and never drops to 0. This is a new bug as I've been using the same heart rate monitor Scosche Rhythm 24 for about a year with no problems.

I tested my HR monitor directly connected to the Peloton app and it worked properly. I also tried force quitting the Peloton app and reconnecting to QZ. I did however notice a difference between connecting my QZ iPad app to the Peloton app. Peloton will show the name of the HR monitor (QZ app name) when it connects. There are 2 different names that will show up in Peloton from QZ

Note I tried toggling on/off the heart rate options in settings and couldn't find any correlation. Items I turned on/off

To Reproduce

Expected behavior Heart Rate doesn't drop to 0 in the Peloton app

Screenshots Correct name showing up in Peloton app qDomyos-zwift Heart Rate Name

Video of the Heart Rate drops when heart rate name is QZ https://user-images.githubusercontent.com/18269595/151984397-007988fd-7946-44a2-9dd4-609f1185ea0e.mp4

Smartphone (please complete the following information):

Append a debug log Debug from ride that dropped heart rate to 0 every other second in Peloton App. Heart rate was perfect in QZ Tile QZ Heart Rate Name debug-Tue_Feb_1_06_14_49_2022.log

Not sure if this is useful, but this is a debug when I got Peloton to see the heart rate as qDomyos-zwift qDomyos-zwift Heart Rate Name debug-Tue_Feb_1_07_01_28_2022.log

cagnulein commented 2 years ago

@hoveeman when did the issue start? I have an idea about this.

hoveeman commented 2 years ago

@cagnulein Today was the second time I've noticed it. That video I shared above was from the first time I saw it on January 27th 2022.

cagnulein commented 2 years ago

@hoveeman so it doesn't happen all the time?

hoveeman commented 2 years ago

@cagnulein That's correct... It does not happen all the time. Last weekend when we were testing the Peloton Run issues it did not occur.

This morning I thought maybe it'd be related to Bike or Run. I tested a run this morning and it dropped to 0 as well. So no correlation between Bike or Run.

cagnulein commented 2 years ago

@hoveeman did you try to reboot your peloton device before doing a session?

hoveeman commented 2 years ago

@cagnulein Yes, I tried that and it didn't make a difference. I'm not sure why Peloton would see the Heart Rate info as QZsometimes and qDomyos-zwift other times. I couldn't find any pattern/correlation.

cagnulein commented 2 years ago

@hoveeman QZ for run and qdomyos for ride i guess, isn't it?

hoveeman commented 2 years ago

@cagnulein This morning I saw QZfor a ride in Peloton and then also saw qDomyos-zwift for a ride in Peloton later while testing.

cagnulein commented 2 years ago

i guess it's a cache issue on the ipad, but i don't think it's releated...or maybe yes? :) in peloton did you pair it everytime or does it automatically?

hoveeman commented 2 years ago

@cagnulein The first time, it auto connected. Then the next 5 times I would manually connect it, and also try to disconnect it and re-connect it.

cagnulein commented 2 years ago

@janabouc did you experience a similar issue? i would like to understand if it's a spread issue

janabouc commented 2 years ago

I don't connect my HRM this way. My Polar H10 can connect to 2 Bluetooth devices so it connects to both QZ and to Peloton separately.

I use the ATV Peloton app, I don't stream from iPad to ATV while using QZ on my iPhone. I've never seen my battery level display on Peloton even when I've used my iPad Pro for QZ. I've only used my iPad for QZ when doing a Treadmill class on ATV.

I don't really look at or care about Peloton metrics since I use Strava for capturing all my metrics.

It might be hard for me to test this because Peloton automatically connects to my Polar and doesn't show other options like QZ as HRM.

cagnulein commented 2 years ago

ok no problem @janabouc @hoveeman i saw now that you're using it over Apple TV. Did you try on an ipad too?

hoveeman commented 2 years ago

@cagnulein, correct I was using an Apple TV for the class. This has been my setup for the past year.

I could pair my HR monitor to my iPhone and run QZ on there and run Peloton on my iPad and see if it behaves the same way.

cagnulein commented 2 years ago

@hoveeman my idea behind this is to try to bisect if it's a QZ issue or a peloton issue :)

hoveeman commented 2 years ago

@cagnulein For sure! I will test and report back with logs.

janabouc commented 2 years ago

ok no problem @janabouc

@hoveeman i saw now that you're using it over Apple TV. Did you try on an ipad too?

On my last treadmill run I used Peloton app on my iPad Pro with QZ floated over it, both on my iPad, no ATV. Heart rate was fine, I could see it on both, with no fluctuation.

hoveeman commented 2 years ago

@cagnulein I found a pattern to reproduce the issue and heart rate names. I used my Scosche connected to my iPhone QZ and my iPhone QZ sharing heart rate to iPad Peloton app.

When doing a bike ride and connected to my echelon bike, the heart rate is named as qDomyos-zwift. It would connect every time and show the heart rate consistently. I tried this multiple times. Video showing connection and working https://user-images.githubusercontent.com/18269595/152014627-1ba4ba62-0194-4487-b41f-0d3bca91a934.mp4

Then I turned off the bike and connected to my Nordictrack Treadmill. The Peloton app then showed the heart rate name as QZ. The heart rate worked while connected to the treadmill and the peloton app. Picture of heart rate name QZ Run

Then i turned off the treadmill, rebooted QZ and connected to my echelon bike. I then started a bike ride and the heart rate would show 0 back and forth. Video of heart rate going to 0. https://user-images.githubusercontent.com/18269595/152015138-0c0d47e1-61da-432c-bf23-b740a28cfd32.mp4

I then rebooted QZ and connected again and heart rate worked properly.

There appears to be an issue when doing a Treadmill run, then force quitting QZ, then doing a bike ride. You will have to force quit QZ, connect to the bike, then force quit QZ again, then connect back to the bike, then heart rate appears to work properly.

cagnulein commented 2 years ago

Thanks @hoveeman great report!did you restart peloton app between workouts?

hoveeman commented 2 years ago

@cagnulein thanks!!

No, I did not. The Peloton app on my iPad was open the whole time. I did stop and start classes though.

cagnulein commented 2 years ago

So that's why. Passing from treadmill to ride it changes the Bluetooth fingerprint on qz but the peloton app can't know it. I guess a restart should fix it

hoveeman commented 2 years ago

Hmm. This morning on my Apple TV, I force quit peloton and relaunched it and still had the same issue.

While on the iPad, it went to 0 after doing the treadmill, and I kept peloton open and then I force quit QZ on my phone 2 times after connecting to my bike and then it worked.

cagnulein commented 2 years ago

Ok noted. I will try to put Qz on both profiles

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

hoveeman commented 2 years ago

Saw the stalebot got ahold of this issue. I am still experiencing this issue and had it occur yesterday.

cagnulein commented 2 years ago

Pinned, thanks @hoveeman I'm trying to do my best in these days but it's really hard. Too much tickets every day including Facebook, mail, Reddit..

cagnulein commented 2 years ago

@hoveeman i did a modification about this today. Now with the peloton cadence sensor setting OFF you should be able to run Zwift and Peloton without changing everytime it. And also i guess it should fix the peloton issue (if i understood well the issue). Send me an email as a reminder for it, thanks

hoveeman commented 2 years ago

@cagnulein Apologies if I came across as "why isn't this done?!" I just wanted to bump the thread so it didn't get closed. Really appreciate you taking a look at it! I had a chance to try out the new build this morning. I disabled peloton cadence sensor. Heart rate worked properly sharing to the apple tv. I did a cycle, tread, back to cycle, and the heart rate worked every time.

However, I did experience a new issue today with following peloton resistance for a class. I will open a new ticket related to that. With my testing today, I believe you fixed the HR issue and will close this for now. Thank you as always!

cagnulein commented 2 years ago

No no problem at all :) i mean i didn't do this ticket only for you, it was releated to another one #680 so i kill 2 birds with one stone :)

Great that it works! Let me know if it will occur again in the future!

Ok for the new issue :(

hoveeman commented 2 years ago

Thank you so much @cagnulein !! :)

Here is the new ticket in regards to the target resistance issue. #684