cagnulein / qdomyos-zwift

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

QZ not reading heart rate monitor [BUG] #2457

Closed garyness5 closed 2 months ago

garyness5 commented 3 months ago

Describe the bug A clear and concise description of what the bug is.

I have been using the QZ app for about 3 years. I have it connected to an Echelon Echex 3. I have a Samsung S23+ with Android 14 installed.

I never used to have problems with heart monitors being read on QZ. About 2 years ago, it stopped recognizing the monitor - whether Wahoo (2 different ones) or PowrLabs. On the Wahoo and Strava apps, I never had any problem. Once in a while, it would pick up the monitor, start registering for a minute or two, then stop, never to pick it back up during the session. Most of the time, it did not even recognize the monitor. In the late fall and winter months, I use the stationary bike 4-5 times per week

During spring/summer, I bike outdoors and do not use the stationary bike and the QZ app. I did this morning to test it. It was recognized 4 times without any problem with the PowrLabs monitor. But it did not read the heartbeats.

I have only attached one of this morning's logs, as the problem repeated itself all four times. It is not essential to have the heart monitor working, but with it I have a better reading of my performance. Let me know if anything can be done or that I need to do

Thanking you in advance Best regards

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error debug-Wed_Jul_17_07_28_25_2024.log

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Smartphone (please complete the following information):

Append a debug log

Follow this guide https://github.com/cagnulein/qdomyos-zwift/wiki/How-do-i-get-the-debug-log-in-case-something-doesn't-work%3F

Additional context Add any other context about the problem here.

cagnulein commented 3 months ago

you have ant heart setting enabled under ant settings , put it off. it certainly an issue . let me know

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

Il giorno mer 17 lug 2024 alle 18:55 garyness5 @.***> ha scritto:

Assigned #2457 https://github.com/cagnulein/qdomyos-zwift/issues/2457 to @cagnulein https://github.com/cagnulein.

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2457#event-13539746926, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEQ4BUZRQT6SHHMKATZM2OZNAVCNFSM6AAAAABLBAV2G6VHI2DSMVQWIX3LMV45UABCJFZXG5LFIV3GK3TUJZXXI2LGNFRWC5DJN5XDWMJTGUZTSNZUGY4TENQ . You are receiving this because you were assigned.Message ID: @.***>

garyness5 commented 3 months ago

Robert

As asked, I disabled the Ant+ I have included several logs from tests I did to try to connect the monitor A couple of times, the app was able to detect the powrlabs monitor, but most of the times it wasn’t able to. I clicked on refresh list many times. Most of the times, it was not detected at all. And when it was, after restarting the app, the app did not show the bpm’s. I’d go back into settings and the monitor was not in the listing, other than the selected field. I would select a different app from the list, click refresh a few times, but would the monitor would not appear The app shows and registers within a few seconds on Wahoo and Strava. I always remove them from the phone before connecting to the QZ debug-Wed_Jul_17_17_51_21_2024.log debug-Wed_Jul_17_17_52_46_2024.log debug-Wed_Jul_17_17_53_27_2024.log debug-Wed_Jul_17_17_54_18_2024.log debug-Wed_Jul_17_17_55_54_2024.log debug-Wed_Jul_17_17_57_07_2024.log debug-Wed_Jul_17_17_58_32_2024.log

cagnulein commented 3 months ago

I see indeed in your log that the heart rate device is not discovered and there is only a reason for this: the device is connected to another app. You can also check this behaviour using the free app nrfconnect. if you can see it in the nrfconnect app you can see it also on qz, otherwise not. The fact that the HR device is not broadcasting itself, it's because it turned off or connected on the same phone but with another app for example in background.

also i checked the case where in the log, the HR device is available but it can't connect. This also mean that's something is connecting too to it, or the HR device just doesn't reply. From the QZ point of view, this is just one line of code, "connect", all the lower layer is handled by the operative system.

Are you able to do the same test on a phone or a tablet where you didn't installed any app that can connect to it? and also turning bluetooth off of the current phone? so we will double sure about what I just said

Let me know

garyness5 commented 3 months ago

With the QZ logs, I have added screenshots of both nrf results and QZ In all the tests, QZ only picked up the monitor and displayed the bpms once. It picked up the monitor a couple of times but did not display anything. The funny part was that once when it picked up the bpm's, Strava and Wahoo were running. But most of the times, it was not picking up the monitor Every time that I checked QZ, nrf was picking up the heart monitor Sorry for all the logs. I tested a few times Like I said, if this is a problem, it is not that important for me to display the bpms

nrf 23 QZ settings 1 QZ settings 2

debug-Thu_Jul_18_20_03_10_2024.log debug-Thu_Jul_18_20_03_57_2024.log debug-Thu_Jul_18_20_08_38_2024.log debug-Thu_Jul_18_20_15_38_2024.log debug-Thu_Jul_18_20_16_07_2024.log debug-Thu_Jul_18_20_17_09_2024.log debug-Thu_Jul_18_20_20_37_2024.log debug-Thu_Jul_18_20_21_03_2024.log debug-Thu_Jul_18_20_22_37_2024.log debug-Thu_Jul_18_20_24_00_2024.log nrf 1

cagnulein commented 3 months ago

thanks, on nrfconnect click on connect on the hr device and show me a screenshot where the hr measurement characteristics is visible. i would like to check if it has on notify or read only

thanks

garyness5 commented 3 months ago

nrf screenshot. It shows no 1 tify

cagnulein commented 3 months ago

that's so strange everything looks as usual. and if you click on the icon on the right with the 3 arrows that are pointing at the bottom are you getting there the hr measurement?

garyness5 commented 3 months ago

Yes. 63bpm

2

cagnulein commented 3 months ago

ok perfect, now i'm in vacation i will check better the log when i will be back home on monday, thanks and have a nice weekend

garyness5 commented 3 months ago

Thank you Enjoy your weekend

From: Roberto Viola @.> Sent: Saturday, July 20, 2024 12:30 To: cagnulein/qdomyos-zwift @.> Cc: garyness5 @.>; Author @.> Subject: Re: [cagnulein/qdomyos-zwift] QZ not reading heart rate monitor [BUG] (Issue #2457)

ok perfect, now i'm in vacation i will check better the log when i will be back home on monday, thanks and have a nice weekend

— Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2457#issuecomment-2241199298, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AXAVGSUZZAPGO3E7QESKBQLZNKF7DAVCNFSM6AAAAABLBAV2G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRGE4TSMRZHA. You are receiving this because you authored the thread.Message ID: @.**@.>>

cagnulein commented 3 months ago

Hi, I was checking for example the debug-Thu_Jul_18_20_21_03_2024.log

And I see the HR correctly for the whole session. it was updating correctly with 63 and 64 bpm. so it seems that when it's connected it works fine. am i missing something? in other logs qz can't see the device at all: just to clarify: qz search the hr device in a 10 seconds window after seeing your main fitness device. if it doesn't appear in this window, it will ignore it. maybe that's your issue? you weren't turning on in that timeframe?

garyness5 commented 3 months ago

Hi Roberto Right now, the sessions are only for testing the HR. The longest session that I left the app open was about 15 minutes. Most of the time closed and restarted it. Always for a few minutes. Of all the 30+ tests I did, the HR was read only once by the app. Only a few times was the monitor picked up in the list of monitors in QZ. Every time, it showed up in nRF.

The time if did read the bpms, I only left it run for a few minutes. In the past, when using the app, the very few times it picked up the monitor, it only read it for a few minutes, and never read it during the rest of the session, which usually ran 60-90 minutes. Also, when testing, to make sure the monitor was working, I checked on Wahoo and Strava, which I deleted right after before using QZ. And the funny part, the only time it did pick up the monitor, was when Strava and Wahoo was running. I had forgotten to turn them off. I tested a few times with the 2 apps running to see if QZ would pick it up, but it never did. Every time nRF had picked up and read the bpms. I never had any problems at the beginning. Then with same app, same monitor, same phone, it just stopped reading the monitor

cagnulein commented 3 months ago

It's a mistery. If you want, if you can provide me a longer session when it lose connection I can check the reason, at least for the connectivity side.

For the broadcast side actually I really can't make anything better, I'm simply polling the Bluetooth devices around you like any app does.

The only difference between qz and any other apps is the fact that qz connects to more devices at the same time, this could cause strange effects on some phones. In this 5 years of bluetooth developments I saw ghosts and zombies around bluetooth :)

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

Il giorno dom 21 lug 2024 alle 19:15 garyness5 @.***> ha scritto:

Hi Roberto Right now, the sessions are only for testing the HR. The longest session that I left the app open was about 15 minutes. Most of the time closed and restarted it. Always for a few minutes. Of all the 30+ tests I did, the HR was read only once by the app. Only a few times was the monitor picked up in the list of monitors in QZ. Every time, it showed up in nRF.

The time if did read the bpms, I only left it run for a few minutes. In the past, when using the app, the very few times it picked up the monitor, it only read it for a few minutes, and never read it during the rest of the session, which usually ran 60-90 minutes. Also, when testing, to make sure the monitor was working, I checked on Wahoo and Strava, which I deleted right after before using QZ. And the funny part, the only time it did pick up the monitor, was when Strava and Wahoo was running. I had forgotten to turn them off. I tested a few times with the 2 apps running to see if QZ would pick it up, but it never did. Every time nRF had picked up and read the bpms. I never had any problems at the beginning. Then with same app, same monitor, same phone, it just stopped reading the monitor

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2457#issuecomment-2241716882, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWF25AGE7UFRFVADSQTZNPUEDAVCNFSM6AAAAABLBAV2G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRG4YTMOBYGI . You are receiving this because you were mentioned.Message ID: @.***>

garyness5 commented 3 months ago

It is not a problem Roberto. I am just surprised this has only happened to me. I don't use any special apps or do anything special on the phone. Let's leave it like that. It is not that important. If ever you think of anything, let me know. Everything else works well. The HR is just a feature I like, but is not important THank you for your attention in trying to solve this

Gary

cagnulein commented 3 months ago

it could be something special on the hr device. anyway i'm always open to understand issue, if you will conduct any other tests with different phones or different hr , i will be here thanks

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

Il giorno dom 21 lug 2024 alle 21:38 garyness5 @.***> ha scritto:

It is not a problem Roberto. I am just surprised this has only happened to me. I don't use any special apps or do anything special on the phone. Let's leave it like that. It is not that important. If ever you think of anything, let me know. Everything else works well. The HR is just a feature I like, but is not important THank you for your attention in trying to solve this

Gary

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2457#issuecomment-2241751916, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWA72K4ENWB6LHCY6VLZNQEZ3AVCNFSM6AAAAABLBAV2G6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBRG42TCOJRGY . You are receiving this because you were mentioned.Message ID: @.***>

stale[bot] commented 3 months 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.