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

[REQ] Read cadence from Garmin when in -run-cadence-sensor mode for FTMS treadmills #3042

Closed
sirfergy opened this issue Jan 12, 2025 · 74 comments
Assignees
Labels
enhancement New feature or request

Comments

@sirfergy
Copy link
Contributor

I have a Horizon 7.8 AT treadmill which supports FTMS, but doesn't report cadence. I run with a Garmin Forerunner 965 which can read the speed/cadence data from QZ but that then overrides the cadence sensor on the watch. Is there a way to pull the cadence data from the watch so I don't lose that info?

Running on a raspberry pi in no-gui mode.

Thanks!

@sirfergy sirfergy added the enhancement New feature or request label Jan 12, 2025
@cagnulein
Copy link
Owner

cagnulein commented Jan 13, 2025 via email

@cagnulein
Copy link
Owner

As far as I know garmin don't send cadence over Bluetooth or at least not in a clear way

We should use the garmin connect iq protocol but it's not open.

If you want you could use the https://github.com/cagnulein/qdomyos-zwift/blob/master/docs/20_supported_devices_and_applications.md#android-device

To collect a log from qz and the companion watch so we can try to reverse engineering it also on raspberry
Let me know!

@obvioussean
Copy link

My Moto e4 is too old to install Garmin Connect, so I need to buy a "new" Android phone and then we can try.

@cagnulein
Copy link
Owner

cagnulein commented Jan 13, 2025 via email

@sirfergy
Copy link
Contributor Author

sirfergy commented Jan 13, 2025 via email

@cagnulein
Copy link
Owner

But since iOS doesn’t support being a sensor for Garmin what will that do?

no on ios, with the qz garmin app, you can get hr and cadence from your watch on your phone!

@sirfergy
Copy link
Contributor Author

Oh, I totally misunderstood your earlier comment! You want the logs from phone to see if we can make it work on the Pi. I will follow those steps soon!

@cagnulein
Copy link
Owner

yep exactly. i mean we should do the same thing that garmin connect does on your phone, on the raspberry. i don't know if it will be an easy job

@sirfergy
Copy link
Contributor Author

I'll get the logs soon, but had a totally different idea. I saw you have logic in virtualtreadmill to read cadence from the companion app. In theory couldn't you also read directly from a foot pod? I wrote a super simple node app to confirm you can read data from a sensor that's not currently connected with the phone.

@cagnulein
Copy link
Owner

Is the watch broadcasting the run foot pod over Bluetooth?

@sirfergy
Copy link
Contributor Author

Alas, no

@cagnulein
Copy link
Owner

So that's why qz companion is required :)

@sirfergy
Copy link
Contributor Author

But now that I think about it, it must be because Zwift see's the cadence from the Garmin. But when using QZ it reports as 0 since it's trusting QZ which is not sending data. 🙃

@cagnulein
Copy link
Owner

how do you see the right cadence in zwift from garmin? how do you pair it?

@sirfergy
Copy link
Contributor Author

If not using QZ, when Zwift starts you choose what devices you want to use for Speed, Cadence and HR. Once I initiate a treadmill activity, my Garmin watch shows up as an option for all three choices.

image

@cagnulein
Copy link
Owner

hah so it's sending cadence data! set the forerunner under the power sensor in the accessories settings in qz and disable the garmin companion settin in qz.
let me know

@sirfergy
Copy link
Contributor Author

It didn't work, as I suspect the value being read is coming from the footpod which is QZ. My newer Android phone arrives tomorrow and I'll test with the companion app to get the debug logs.

@cagnulein
Copy link
Owner

no i mean qz is reading the cadence correctly? show me a debug log with this configuration, it must works in this case. i guess you seup something wrong

@sirfergy
Copy link
Contributor Author

Here's the log from my iOS device

debug-Tue_Jan_14_09_53_15_2025.log

@cagnulein
Copy link
Owner

cagnulein commented Jan 14, 2025 via email

@cagnulein
Copy link
Owner

@sirfergy i just checked and actually I already implemented this. In the log i can see the HR from your watch but i can't see the cadence transmitted from your watch. It seems you were steady? could you please try a small 1 minute workout in the same scenario?

@sirfergy
Copy link
Contributor Author

I was definitely moving and on my watch I saw cadence values reported.

@cagnulein
Copy link
Owner

the watch is reporting only HR on the log. that's so strange. could you make a thing?
collect a log following this from zwift and your watch directly https://ultrawyrypa.pl/index.php/2024/11/05/qz-fitness-connect-ifit-treadmil-to-zwift-and-not-only/ so i can see if zwift is doing something different
let me know!

@sirfergy
Copy link
Contributor Author

Can do this afternoon!

@cagnulein
Copy link
Owner

No rush, 7pm here :)

@sirfergy
Copy link
Contributor Author

sirfergy commented Jan 15, 2025

Will the iOS app (PocketLogger.app) pick up the bluetooth traffic from the Garmin?

@cagnulein
Copy link
Owner

You need to run zwift on the iphone

@cagnulein
Copy link
Owner

Or maybe you can grep the log from the mac directly too

@sirfergy
Copy link
Contributor Author

Sorry for the delay! Also, I just realized I was doing the logging wrong, I have to click the button in the app to get it to save! I had assumed it saved every time, which would explain why some logs didn't have anything of interest.

qz logs:
debug-Thu_Jan_16_15_14_34_2025.log
debug-Thu_Jan_16_15_10_29_2025.log
debug-Thu_Jan_16_15_18_04_2025.log
debug-Thu_Jan_16_15_15_41_2025.log
debug-Thu_Jan_16_15_12_12_2025.log
debug-Thu_Jan_16_15_19_13_2025.log
debug-Thu_Jan_16_15_16_26_2025.log

bt log that should have been running the duration of the above logs:
Really long log.log

@sirfergy
Copy link
Contributor Author

Also about ftms mode: do you mean that if you select it under ftms treadmill in qz you can see it correctly? Could you please send me also this debug log?

Yes, ftms that means "Run Cadence Sensor is off" in the experimental settings. Sorry, not the option on Horizon to force it to use ftms.

And mode doesn't actually matter, qz reads the correct data either way.

@sirfergy
Copy link
Contributor Author

And since this has been a long thread, I want to summarize in case I've confused myself or you:

  • Garmin Forerunner can show cadence and hr to Zwift
  • Turning on these settings enables QZ (without the use of Garmin Connect) to read HR and cadence:
    • Accessories -> Cadence Sensor Options -> Cadence Sensor-> Forerunner
    • Accessories -> Power Sensor Options -> Power Sensor-> Forerunner
    • In hindsight I don't think both need to be on?
  • To enable my Garmin to connect to QZ, I've enabled this setting:
    • Experimental -> Run Cadence Sensor
  • When connecting my Garmin to QZ via ANT+, only pace is transmitted to the Garmin

@cagnulein
Copy link
Owner

And since this has been a long thread, I want to summarize in case I've confused myself or you:

Thanks

  • Garmin Forerunner can show cadence and hr to Zwift
  • Turning on these settings enables QZ (without the use of Garmin Connect) to read HR and cadence:
    • Accessories -> Cadence Sensor Options -> Cadence Sensor-> Forerunner

This should be turned off. Did you try?

  • Accessories -> Power Sensor Options -> Power Sensor-> Forerunner

Yes this is the way

  • In hindsight I don't think both need to be on?

Exactly, only power, this could lead to the issue

  • To enable my Garmin to connect to QZ, I've enabled this setting:
    • Experimental -> Run Cadence Sensor

Nope this one affects the bridge not the connection to a source. I guess there is a closed loop issue. I will check again your logs to be sure

  • When connecting my Garmin to QZ via ANT+, only pace is transmitted to the Garmin

Yes this right

@sirfergy
Copy link
Contributor Author

I disabled cadence, no change in how things work.

@cagnulein
Copy link
Owner

could you please show me a debug log from qz with cadence disabled, and power sensor set to forerunner, run cadence sensor disabled?
in the logs above there is only one of this, but in that one the forerunner is not avaiable in the devices found
Thanks!

@sirfergy
Copy link
Contributor Author

Here you go! I'm not sure why I have run cadence sensor even on when using my iPhone, it's not like the Garmin can see it.

I did notice some oddity, it wasn't consistently connecting to the Garmin as a power sensor, I'd have to go to settings, refresh list choose it, then restart to get it to show up.

debug-Fri_Jan_17_08_36_29_2025.log

@cagnulein
Copy link
Owner

cagnulein commented Jan 17, 2025 via email

@sirfergy
Copy link
Contributor Author

Done! And you're right, HR still showed up!

debug-Fri_Jan_17_12_17_02_2025.log

@cagnulein
Copy link
Owner

cagnulein commented Jan 17, 2025 via email

@sirfergy
Copy link
Contributor Author

Yes, but when I connect my Garmin via ANT+ (I also have an Android phone with the same settings) to QZ as a cadence sensor QZ stops reading cadence from the Garmin.

@cagnulein
Copy link
Owner

Probably you are creating a loop with the garmin thinking to must read the cadence from qz and so it goes to 0 in a loop if you know what I mean

@sirfergy
Copy link
Contributor Author

Yeah I was hoping you had an idea how to solve that :)

@sirfergy
Copy link
Contributor Author

I really only need speed sent via QZ to my Garmin, but there isn't a profile that does that right?

@sirfergy
Copy link
Contributor Author

I've got two potential ideas:

  • I also wear my Apple Watch, could the Apple Watch app transmit cadence?
  • I also could wear a footpod and use my Pi to translate it to a BTLE sensor for QZ to connect to

@cagnulein
Copy link
Owner

Yes apple watch sends cadence too but you need to run qz on the iPhone

@cagnulein
Copy link
Owner

Yes you can use also the foot pod and then for sure with android you can sent by ant+ speed to garmin

@cagnulein
Copy link
Owner

I really only need speed sent via QZ to my Garmin, but there isn't a profile that does that right?

The only profile is ant+ but you can't send cadence from the garmin and getting back speed from another device, it's a garmin limitation because he thinks you want both metrics from them (speed and cadence are coming together in the RSC profile)

@sirfergy
Copy link
Contributor Author

Will close this issue, it seems what I want to accomplish is just not feasible.

@sirfergy
Copy link
Contributor Author

Once again, thanks for all your help investigating!

@cagnulein
Copy link
Owner

Did you find anyway a way to have everything that you need?

@sirfergy
Copy link
Contributor Author

No :(

I may go down the path of trying to figure out how to read directly from my ANT footpod and update the Android version of QZ to include that cadence in the power metric.

@cagnulein
Copy link
Owner

cagnulein commented Jan 20, 2025 via email

@sirfergy
Copy link
Contributor Author

Yeah, I was going to try just for Android to start. My "dream" was to find a way to create my own app to read speed from my treadmill and cadence from my footpod and then transmit as a footpod to my Garmin, but I failed. I can read the data pretty easily, but I was unable to get the Garmin to read from my "virtual" footpod.

@sirfergy
Copy link
Contributor Author

Do you have a guide for updating the Android version of the app?

@sirfergy
Copy link
Contributor Author

And yes, I think it may be easier if you add than me trying to figure out how to be an Android dev!

@cagnulein
Copy link
Owner

cagnulein commented Jan 20, 2025 via email

@sirfergy
Copy link
Contributor Author

Yes, except it's an ANT footpod. I guess for $19 I should buy the Zwift footpod.

@cagnulein
Copy link
Owner

Hah Ok, yes if you can buy a Bluetooth one, everything will work!

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

No branches or pull requests

3 participants