cagnulein / qdomyos-zwift

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

[BUG] Wahoo Kickr Bike v2 resistance and inclination not changing #2379

Open jlettFlintfox opened 1 week ago

jlettFlintfox commented 1 week ago

After pairing Wahoo Kickr Bike v2 to QZ, and running Zwift, when going up and down hills the resistance and gradient on the bike does not change.

To Reproduce Steps to reproduce the behavior:

  1. Turn on bike, and press "unlock" button to allow 3rd party apps to control bike gradient.
  2. Open QZ app, bike is detected automatically over bluetooth
  3. Use bike and observe that metrics are displayed in QA including watts, cadence, rpm etc.
  4. Press incline and resistance buttons on QZ tiles, no change on bike gradient or resistence
  5. Open Zwift, pair with QZ over bluetooth
  6. Choose a hilly route and ride
  7. As riding up and down hills, bike resistance and gradient does not change

Desktop (please complete the following information):

Additional context Connecting Zwift to bike over bluetooth, or wifi, and Zwift correctly controls resistance and bike gradient when going up and down hills.

debug-Mon_Jun_10_11_56_00_2024.log

cagnulein commented 1 week ago

thanks i will check it asap

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

Il giorno lun 10 giu 2024 alle 02:33 jlettFlintfox @.***> ha scritto:

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

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

cagnulein commented 1 week ago

hi @jlettFlintfox can you try to set the bike as a FTMS bike setting under the bike setting? Let me know!

jlettFlintfox commented 1 week ago

That worked, although I couldn't get the Zwift Inclination Gain to have an effect, nor the Double Negative Inclination, or Watt/Speed/Cadence Gain settings.

cagnulein commented 1 week ago

did you use the gear tile to increase or decrease the effort? that's the way to obtain what you are looking for. Send me a debug log if also this one doesn't work Thanks

jlettFlintfox commented 4 days ago

Unfortunately the Gear tile has no effect. It does not change the resistance or the incline/tilt of the bike. Just to clarify, ultimately what I would like to achieve is, when running Zwift, connected to bike via QZ, is to adjust the Incline Gain setting in QZ so that the bike physically tilts more than what Zwift sends when connecting directly to the bike. I would also like to use the Double Negative Inclination feature to avoid the Zwift issue where negative incline/tilt is halved.

Looking at the code in src/devices/wahookickrsnapbike/wahookickrsnapbike.cpp, it does not look like the Inline Gain, or Double Negative Inclination settings are used in setSimGrade or WriteCharacteristic.

cagnulein commented 4 days ago

Ok i can add that settings for the bike too but first of all we need to understand the gear issue. Send me a debug log in this scenario

jlettFlintfox commented 4 days ago

Thanks @cagnulein. New debug log attached. The steps I followed are:

  1. Turn on bike, and enable/unlock tilt function (button on side of bike)
  2. Start QZ, and confirm it connects to bike (it does)
  3. Start pedaling
  4. Observe that cadence, speed and watts are shown in QZ
  5. Press + button on Gears tile
  6. Changing gears doesn't appear to do anything (no change to resistance or physical bike tilt)
  7. Press Stop in QZ and close app

debug-Fri_Jun_14_18_08_49_2024.log

Screenshot_20240614_173322

cagnulein commented 4 days ago

sorry i didn't say that you have to do this while you're connected with zwift as you did in your last test. QZ is applying gears mod while you are doing a free ride or a race on zwift. Could you please try in this scenario?

jlettFlintfox commented 4 days ago

Yes, I can confirm that in Zwift the Gears tile increases/decreases the resistance felt on the bike making it harder (higher gear) or easier (lower/negative gear) to pedal. No change to the physical bike incline/gradient/tilt. Debug log attached, but you probably won't need it as this sounds like it is probably correct behavior.

debug-Fri_Jun_14_20_48_27_2024.log

Would you still be able to allow the Incline Gain in the QZ settings to multiply the physical bike tilting that occurs? And implement the Double Negative Inclination setting for this bike?

cagnulein commented 4 days ago

ok that's perfect!

ok let's talk about the tilting.i was assuming that the tilting was "connected" to the gradient sent from zwift. So for example if zwift sends 1% the resistance goes to a certain value and also the tilting on the bike would go to 1%

What QZ is doing when you change gears, is to apply the value to what zwift sends, so for example, as the previous example, if you have gears to 2, qz will send 3% instead of 1%. this should change the tilting too. Am I missing something?

jlettFlintfox commented 4 days ago

Unfortunately that's not what seems to happen. I tried changing gears on the tile in QZ while I was going up a hill in Zwift, it became a lot harder to pedal but the bike tilt didn't change. I was also paying special attention to the bike tilting as I went up and down hills in Zwift, and had the gear tile up to gear 9, but the bike tilt wasn't any different to normal but certainly the resistance was much harder.

cagnulein commented 4 days ago

ok so it means that zwift sends another command to change the tilt. could you please following this https://github.com/cagnulein/qdomyos-zwift/blob/master/docs/20_supported_devices_and_applications.md#android-device collect a session where you are using zwift and your bike only and where you can see the tilting is changing accordingly to zwift?

also another question: when you are connected to qz, are you observing a changing in the tilting, or never? i guess never, right?

jlettFlintfox commented 4 days ago

The last test I ran I had Zwift connected to QZ, QZ connected to the bike, and when I was riding the bike up/down hills the bike was tilting up and down just as it normally would when Zwift is connected to the bike directly. When changing the gear tile (higher gear) in QZ, it was harder to pedal when I was going up hills in Zwift, and the bike was still tilting but the amount it was tilting is the normal amount as though the gear tile was set to 0, or when Zwift is connected to the bike directly.

When using QZ only, so no Zwift but QZ connected to bike, the bike never tilts even when changing the Gears or Inclination tiles.

cagnulein commented 4 days ago

mmm it seems that the tilting thing is running on a separate channel? are you pairing it somehow on zwift? maybe via ant+?

jlettFlintfox commented 4 days ago

The PC that is running Zwift doesn't have ant+, so not that. When I pair on Zwift I am pairing Power Source, Resistance, and Cadence to my phone/QZ (see attached screenshot). I don't see any option to pair the tilting separately, or anything like that.

20240614_204550

cagnulein commented 4 days ago

it could be that even if you don't pair it zwift founds it and handles it. did you check on the zwift log? since it's tilting passing through QZ but QZ doesn't send anything else than the grade, it must be something else external, i don't see any other possibilites. What do you think?

cagnulein commented 3 days ago

@jlettFlintfox a zwift log will confirm my hypothesis since there is a bluetooth characteristic for the grade https://github.com/cagnulein/qdomyos-zwift/issues/2391

i can also try to control it directly