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] HeartRate not being rebroadcasted when using Treadmill #1254

Closed hoveeman closed 1 year ago

hoveeman commented 1 year ago

Describe the bug When connected to a treadmill, the heart rate is not being rebroadcasted from the tablet for other devices to connect to. With my HRM connected to QZ and seeing my heart rate, I will go to the Peloton app on the Apple TV and search for heart rate monitors, and the Tablet QZ does not show up as a heart rate monitor. If I have QZ connected to my Echelon Bike, The Tablet QZ app shows up as an option on the Peloton Apple TV App.

To Reproduce Steps to reproduce the behavior:

  1. Connect HRM to QZ
  2. Connect Treadmill to QZ
  3. Make sure Virtual Device is enabled
  4. Search for HRM on another device and see that QZ does not show up

Expected behavior QZ Rebroadcasts Heart Rate while connected to a Treadmill

Smartphone (please complete the following information):

Append a debug log Debug Log debug-Tue_Feb_7_15_39_00_2023.log

Profile with settings (changed .qzs extension to .txt for upload) Peloton Tread.txt

Additional context I tried virtual device and virtual device with virtual heart only. Neither rebroadcasted.

Also, while connected to a Bike, heart rate is rebroadcasted appropriately.

hoveeman commented 1 year ago

NRFConnect shows the Treadmill QZ as a Fitness Machine IMG_0402

cagnulein commented 1 year ago

yes this is a limitation of android > version 9. it can't send both FTMS and Heart rate. If you want just to send HR, enable the virtual heart only in the experimental settings

hoveeman commented 1 year ago

yes this is a limitation of android > version 9. it can't send both FTMS and Heart rate. If you want just to send HR, enable the virtual heart only in the experimental settings

Thanks! That is actually how I have it set up in the profile to only send Virtual Heart.

cagnulein commented 1 year ago

you're right, my fault. the virtual_device_onlyheart is not managed in the virtual treadmill class. I have to add it!

hoveeman commented 1 year ago

Great! No rush on this as I can use my iPad for treadmill when I want to take a treadmill class.

This can definitely be a lower priority enhancement.

stale[bot] commented 1 year 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.

rveez commented 1 year ago

I'm experiencing this same issue with my Galaxy Tab 6 Lite. I've experimented with enabling the Virtual Heart Device in the Experimental Settings.

NRFConnect will identify my Echelon Sport Bike and my Polar Bluetooth Heart Rate Monitor but it never detects QdomyosZwift as a device that is transmitting a bluetooth signal.

My Galaxy Tablet is running the latest Android OS v13. Maybe this is an issue with Samsung devices? I say that because I installed QZ on my Android Smartphone (OS v13) and the virtual heart rate monitor is able to rebroadcast successfully to my Peloton app.

Here's what I see when trying to analyze the BT radio traffic:

Untitled

cagnulein commented 1 year ago

did you rename galaxy to bike?

Il giorno lun 13 mar 2023 alle 00:28 rveez @.***> ha scritto:

I'm experiencing this same issue with my Galaxy Tab 6 Lite. I've experimented with enabling the Virtual Heart Device in Experimental Settings NRFConnect will identify my Echelon Sport Bike and my Polar Bluetooth Heart Rate Monitor but it never detects QdomyosZwift as a device that is transmitting a bluetooth signal. My Galaxy Tablet is running the latest Android OS v13. Maybe this is an issue with Samsung devices? I say that because I installed QZ on my Android Smartphone (OS v13) and the virtual heart rate monitor is able to rebroadcast successfully to my Peloton app.

Here's what I see when trying to analyze the BT radio traffic: [image: Untitled] https://user-images.githubusercontent.com/127699546/224580484-d060e5f5-cb6d-4c8f-9e29-99ac4dd7832c.jpg

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/1254#issuecomment-1465329299, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEEUPGJHX6YCH6Z3WLW3ZS3FANCNFSM6AAAAAAUUPY4JI . You are receiving this because you modified the open/close state.Message ID: @.***>

-- Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

rveez commented 1 year ago

Roberto, Yes, I was able to rename the Galaxy Tablet's device name to "Bike" in the Android system settings. This then allowed the tablet to be discoverable in the Peloton app as a HR monitor also named "Bike". Thank you for your technical support with this issue.

cagnulein commented 1 year ago

ok perfect @rveez so problem solved?

rveez commented 1 year ago

Yes, my issue is resolved.

But I will add one item (that is trivial but notable) I noticed on the Android version versus the iOS version. When using the Android Tablet as the QZ virtual HR monitor, the Peloton app does not recognize/display the battery level % of the connected HR monitor as it does when using iPad/iOS device.

On the iPad/iOS I realize it's not actually displaying the true HR monitor's battery level but really the virtual device's (iPad) battery level. So it's not really that important but I thought you might like to know.

Thanks again for your help.

cagnulein commented 1 year ago

But I will add one item (that is trivial but notable) I noticed on the Android version versus the iOS version. When using the Android Tablet as the QZ virtual HR monitor, the Peloton app does not recognize/display the battery level % of the connected HR monitor as it does when using iPad/iOS device.

Yes it's because Android doesn't allow to send the Battery service as a virtual one. Thanks for the feedback!