Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heart rate not working with Zwift hub #187

Open
koenigderorangen opened this issue Mar 20, 2024 · 10 comments
Open

Heart rate not working with Zwift hub #187

koenigderorangen opened this issue Mar 20, 2024 · 10 comments

Comments

@koenigderorangen
Copy link

Currently trying to use the heart rate monitor with my zwift hub, which has the heart rate sensor coupled directly through the hub. Before the update this worked. Since the update, when trying to connect, every sensor is connect through the controllable (which is nice) but the heart rate stays at 0 and when I try to connect it individually with HRM it also shows "0". I've attached the log files. https://flux-dev.vercel.app/
flux-dev.vercel.app-1710957863646.log

@dvmarinoff
Copy link
Owner

@koenigderorangen Thanks for the report!
Will investigate and get in touch tomorrow morning.

The odd thing is that my Polar H10 works connected as an hrm, and the test cases for heart rate data via the trainer also pass.

On a quick look over the logs it seems you are enabling the heart rate readings to come from trainer or device?

@koenigderorangen
Copy link
Author

Thanks for the fast reply and effort! Im currently using a Wahoo TICKR through the trainer. When I decouple the HRM from my Hub and directly connect it as a HRM it works! But due to technical limitation on my side the connection is unstable and it would be great to use the coupling through the hub again. Yeah in my test i switched between the HRM from the controllable to the individual HRM but still the trainer as sensor, in hope it would work that way.

@dvmarinoff
Copy link
Owner

So I did try to debug this, but I currently can't figure out why it is not working.

Both the latest and the old version of Flux use the standard indoor bike data characteristic on the FTMS service to read heart rate from a trainer. This is the way it should happen by the Specification documents. The tests on the parsers pass, the simulator also works. I've changed the label for heart rate from 'hrm' in the old version to 'heartRateMonitor' in the new version, so this might require a manual switch in the settings, but according to the log you already did this and it's the right label. So I am currently out of ideas why it won't work.

@dvmarinoff
Copy link
Owner

NOTE: I've added the old version 0.1.43 as 'stable' version here: https://flux-stable.vercel.app/, you can fallback to it, but will need to setup heart rate source again in settings (just click it to something else and return it to the device you wish to be reading).

@mgibbs189
Copy link

@dvmarinoff the Zwift Hub doesn't send heart rate values via FTMS... it uses HRS.

Don't ask me why; I ran into this issue too 😄

@dvmarinoff
Copy link
Owner

Hey @mgibbs189 Thanks for the tip! Indeed unexpected.

@dvmarinoff dvmarinoff reopened this Oct 1, 2024
@dvmarinoff
Copy link
Owner

OK, I think I found the issue. The Heart Rate Service needs to be added to the bluetooth request filter, else the service won't appear in the primary services list. I added it as an optional service to the filter and it passes testing with a simulator that has FTMS trainer control and Heart Rate Service.

The fix is live on version 0.1.50 on https://flux-dev.vercel.app/

NOTE: you'd need to turn on heart rate from the controllable in Settings

@dvmarinoff
Copy link
Owner

Latest fix is in production on 0.1.60, just need someone with an access to Zwift Hub trainer to confirm it works.

@koenigderorangen
Copy link
Author

Reporting back, I can confirm that the connectivity issue with my Zwift Hub is no longer a problem. Thank you very much for your dedication—you made my day! :) I will close the issue in the coming weeks if I can confirm it stays working during the next sessions.

@dvmarinoff
Copy link
Owner

Nice, thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants