cagnulein / qdomyos-zwift

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

[BUG] Cadence wrong with KICKR v3 #2624

Closed satchafunkilus closed 1 month ago

satchafunkilus commented 1 month ago

Describe the bug I have a KICKR v3 and a KICKR v4. On the v4, the cadence is displayed correctly. On the v3, the cadence is about 10-15rpm higher than what I am actually pedaling. When I connect the v3 to zwift/mywhoosh/etc. directly, the correct rpm is shown.

I have attached both debug logs for v3 and v4 (see filename).

To Reproduce I tested this with a metronome set to 40bpm, pedaling in the rhythm and checking the reported rpm. After that, I repeated it with 60bpm. The cadence on the v3 reported 50-55rpm for 40bpm and 70-75rpm for 60bpm respectively. On the v4, the reported rpm is spot on 40 (did not repeat with 60, since it was already working).

Smartphone (please complete the following information):

Append a debug log

debug-FrSept27_18_08_06_2024_KICKR-V4.log debug-FrSept27_17_48_21_2024_KICKR-V3.log

cagnulein commented 1 month ago

thanks, I will check it asap !

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

Il giorno ven 27 set 2024 alle 18:20 satchafunkilus < @.***> ha scritto:

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

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

satchafunkilus commented 1 month ago

Another thing that I noticed: When I stop pedaling on the V4, it immediately goes to 0rpm (Line 2102/2126 in the V4 debug log). On the V3, as soon as I stopped pedaling, the rpm values started going down gradually in really small increments, before finally reaching 0 approx. 15 seconds later. You can see this decline in the debug log, starting in line 3472.

cagnulein commented 1 month ago

Ok, I'll check it out.

Il giorno ven 27 set 2024 alle 19:42 satchafunkilus < @.***> ha scritto:

Another thing that I noticed: When I stop pedaling on the V4, it immediately goes to 0rpm (Line 2102/2126 in the V4 debug log). On the V3, as soon as I stopped pedaling, the rpm values started going down gradually in really small increments, before finally reaching 0 approx. 15 seconds later. You can see this decline in the debug log, starting in line 3472.

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

cagnulein commented 1 month ago

i found the issue @satchafunkilus the v4 is sending both crank and wheel metrics instead of the v3 is sending only the wheel one! maybe you can change this in the wahoo app somehow?

satchafunkilus commented 1 month ago

@cagnulein Wouldn't the cadence data come from the cadence sensor to qz directly in both cases? I am a bit confused as to why the cadence data would be coming from the KICKR, since those are two separate BT devices. Can you hint me to where I can see this in the debug log? Then I can do some troubleshooting myself.

cagnulein commented 1 month ago

i mean: v3 and v4 are both sending metrics via bluetooth in the csc standard format. in the csc format there are 2 bits that are telling if the cadence is about a wheel sensor or a crank sensor. this is because the csc standard it's indeed a standard and it's used for wheel and crank sensors.

the v4 is sending these bits telling that it's a crank sensor the v2 is sending these bits telling it's a wheel sensor

you can see this on

wahookickrsnapbike::characteristicChanged(const QLowEnergyCharacteristic &, const QByteArray &) " << " "34 00 1b 00 0c 39 a9 c7 00 00 24 4e d2 4d e8 9f"

this is from the v4 and the first byte 34 so 0x34

wahookickrsnapbike::characteristicChanged(const QLowEnergyCharacteristic &, const QByteArray &) " << " "14 00 2d 00 1b 7b 5e 90 00 00 52 e9"

this is from a v 3 and the first byte is 14 so 0x14

i suspect that you can configure this behaviour in the wahoo app I guess. or maybe in the wahoo app you are telling the ratio betweent the wheel and the crank?

satchafunkilus commented 1 month ago

I can adjust the wheel size in the Wahoo-App. However, since I can change physical gears on my bike, the trainer would not be able to "calculate" the cadence from this, as it would always change. So this data must be coming from the cadence sensor in some way. But I'm still confused, because the cadence sensor in both cases is a separate device that sits at the crank. When I connect the trainer to mywhoosh or zwift directly (without qz) then I need to pair the cadence sensor independently of the trainer. Are you saying that qz somehow gets the cadence data from the trainer and not from the cadence sensor directly?

cagnulein commented 1 month ago

, because the cadence sensor in both cases is a separate device that sits at the crank. When I connect the trainer to mywhoosh or zwift directly (without qz) then I need to pair the cadence sensor independently of the trainer. Are you saying that qz somehow gets the cadence data from the trainer and not from the cadence sensor directly?

i don't get this part: could you please show me how the pairing screen of zwift looks like when you are not using QZ?

satchafunkilus commented 1 month ago

This is how the pairing screen for the cadence sensor looks like: thumbnail1

Once I have selected the WAHOO CADENCE sensor, however, it brings me back to the overview screen, where the KICKR is shown in the cadence sensor field: thumbnail2

cagnulein commented 1 month ago

Ah! So there are 2 sensors! Did you try to set the wahoo cadence under accessories in the cadence sensor setting in qz?

satchafunkilus commented 1 month ago

Yes, that appears to have solved the issue. The slow spindown seems to be a problem with the cadence sensor itself, as it also happens when connected to mywhoosh directly.