cagnulein / qdomyos-zwift

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

Several Issues Using QZ with Rouvy and Zwift Play Controllers #2541

Open SoCalKen99 opened 2 weeks ago

SoCalKen99 commented 2 weeks ago

Shift up/down buttons on Zwift Play controllers don't seem to be recognized - no change to Gears panel display or trainer resistance. Also, speed displayed on QZ is 1/2 speed displayed on Rouvy screen and the odometer reading is also about 1/2 what is displayed on the Rouvy screen.

Steps to reproduce the behavior:

  1. Power up the KICKR Core trainer and Zwift Play controllers
  2. Start the QZ app. Settings already updated per the Zwift Play instruction video.
  3. Start the Rouvy app and pair to the QZ devices.
  4. Start ride, attempt to use Zwift Play controllers to perform virtual shifting. Note that Gears panel doesn't update nor does trainer resistance change (although it does change when Gear panel + / - controls used to alter gear).

Expected behavior Expected buttons on Zwift Play controllers (same buttons that Zwift uses to perform virtual shifting) to cause Gears panel number display to increment / decrement as buttons are pressed and trainer resistance to change accordingly. Also, expect QZ statistics for speed and distance to match those displayed by Rouvy.

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 debug-Mon_Aug_26_11_20_41_2024.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 2 weeks ago

Let’s start from the speed: speed is calculated autonomously from Rouvy, anyway you can have similar speed and distance enabling the speed based on power setting on the bike setting in Qz

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

Il giorno lun 26 ago 2024 alle 21:35 SoCalKen99 @.***> ha scritto:

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

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

SoCalKen99 commented 2 weeks ago

Note that I've also experienced slow response times between changing the gear in the gears panel and the trainer resistance actually changing - sometimes as long as several seconds. I've also experienced a case where QZ apparently stopped controlling the resistance of the trainer, as changing the Gears panel (+/- 30) has no effect on resistance.

cagnulein commented 2 weeks ago

Are the zwift play controller both with the latest firmware? It seems not. Check on the zwift companion Let me know

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

Il giorno lun 26 ago 2024 alle 21:36 cagnulein @.***> ha scritto:

Let’s start from the speed: speed is calculated autonomously from Rouvy, anyway you can have similar speed and distance enabling the speed based on power setting on the bike setting in Qz

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

Il giorno lun 26 ago 2024 alle 21:35 SoCalKen99 @.***> ha scritto:

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

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

cagnulein commented 2 weeks ago

Note that I've also experienced slow response times between changing the gear in the gears panel and the trainer resistance actually changing - sometimes as long as several seconds. I've also experienced a case where QZ apparently stopped controlling the resistance of the trainer, as changing the Gears panel (+/- 30) has no effect on resistance.

Is this delay present also on this log?

SoCalKen99 commented 2 weeks ago

Yes

Ken Adams

@.***

From: Roberto Viola @.> Sent: Monday, August 26, 2024 12:42 PM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Author @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

Note that I've also experienced slow response times between changing the gear in the gears panel and the trainer resistance actually changing - sometimes as long as several seconds. I've also experienced a case where QZ apparently stopped controlling the resistance of the trainer, as changing the Gears panel (+/- 30) has no effect on resistance.

Is this delay present also on this log?

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2310946720 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBODCETJ7TTX4H7UWADZTOAIRAVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQHE2DMNZSGA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BKZVKBPJB3OYM2R4BTLDCYLZTOAIRA5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJXY72A.gif Message ID: @. @.> >

SoCalKen99 commented 2 weeks ago

Roberto,

Thanks for catching that. They are now both updated to the latest firmware.

Would you like me to repeat the test?

Ken Adams

@.***

From: Roberto Viola @.> Sent: Monday, August 26, 2024 12:41 PM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Author @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

Are the zwift play controller both with the latest firmware? It seems not. Check on the zwift companion Let me know

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

Il giorno lun 26 ago 2024 alle 21:36 cagnulein @. <mailto:@.> > ha scritto:

Let’s start from the speed: speed is calculated autonomously from Rouvy, anyway you can have similar speed and distance enabling the speed based on power setting on the bike setting in Qz

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

Il giorno lun 26 ago 2024 alle 21:35 SoCalKen99 @. <mailto:@.> > ha scritto:

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

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

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2310944438 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBMCR5JITPVBOR56BMDZTOADTAVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJQHE2DINBTHA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BKZVKBOMAQ52EZFK4ZXJQ4LZTOADTA5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJXY3LM.gif Message ID: @. @.> >

cagnulein commented 2 weeks ago

Yes please

SoCalKen99 commented 2 weeks ago

Roberto,

Progress. The Zwift Play buttons are now working.

Two issues:

  1. The Gears Gain is set to 0.5. The +/- buttons on the Gears tile work as expected, but the ZP controller buttons increase / decrease the gear by 1.5 (sometimes 1.0). Is there any way to adjust the ZP controller buttons ‘gain’ to match the Gears Gain setting?
  2. The ZP controller button’s functionality is reversed from Zwift. Normally the right button increases the gear and the left button decreases the gear. I’m seeing the reverse. Any way to reverse this?

Thanks for helping me get this sorted!

Ken Adams

@.***

From: Roberto Viola @.> Sent: Monday, August 26, 2024 1:15 PM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Author @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

Yes please

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2311004420 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBN3ESWJNO3YSN4U2G3ZTOEDRAVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGAYDINBSGA . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BKZVKBP7QSWZVCHYEXYLQCTZTOEDRA5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJX4QQI.gif Message ID: @. @.> >

cagnulein commented 2 weeks ago

They are both fixable. Could you please upload a debug log showing the issues?

I'm going to bed now, 11pm here

Have a nice evening!

SoCalKen99 commented 2 weeks ago

Roberto,

Here is a log demonstrating the two issues I reported.

You will also find in this log the issue of delay between changing the virtual gear and the resistance on the trainer changing – sometimes by 3-5 seconds.

Ken Adams

@.***

From: Roberto Viola @.> Sent: Monday, August 26, 2024 1:45 PM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Author @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

They are both fixable. Could you please upload a debug log showing the issues?

I'm going to bed now, 11pm here

Have a nice evening!

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2311058889 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBL5AY5RFIJ4I2I3XATZTOHV5AVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJRGA2TQOBYHE . You are receiving this because you authored the thread. https://github.com/notifications/beacon/BKZVKBOLFMQR6KXBAXZWF7LZTOHV5A5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJX724S.gif Message ID: @. @.> >

cagnulein commented 2 weeks ago

@SoCalKen99 you have to attach the log from the github web interface otherwise I can't see it. Thanks!

cagnulein commented 2 weeks ago

good news for the delay, it's already fixed here https://github.com/cagnulein/qdomyos-zwift/issues/2458 send me an email to roberto.viola83 at gmail.com indicating this ticket and if you are on android or iOS so I will send you the newest one!

SoCalKen99 commented 2 weeks ago

Roberto - sorry about that - here is the log.

debug-Mon_Aug_26_13_20_59_2024.log

cagnulein commented 2 weeks ago

thanks @SoCalKen99 did you received the new version? in that one you will have

  1. delay removed from the virtual gearing
  2. new setting in the zwift device section in the qz settings, to inhibit the button debouncing

about the fact to reverse the left with the right I need to add a new settings, but it's not a problem, i can do this. Let's see first if you are ok with these 2 points above

SoCalKen99 commented 2 weeks ago

Roberto,How do I get the new version? Sorry - I'm not a GitHub expert. Do I download / install it from there?Sent from my iPhoneOn Aug 27, 2024, at 7:51 AM, Roberto Viola @.***> wrote: thanks @SoCalKen99 did you received the new version? in that one you will have

delay removed from the virtual gearing new setting in the zwift device section in the qz settings, to inhibit the button debouncing

about the fact to reverse the left with the right I need to add a new settings, but it's not a problem, i can do this. Let's see first if you are ok with these 2 points above

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

cagnulein commented 2 weeks ago

I sent it 6 hours ago by email. Don't you get it?

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

Il giorno mar 27 ago 2024 alle 17:21 SoCalKen99 @.***> ha scritto:

Roberto,How do I get the new version? Sorry - I'm not a GitHub expert. Do I download / install it from there?Sent from my iPhoneOn Aug 27, 2024, at 7:51 AM, Roberto Viola @.***> wrote: thanks @SoCalKen99 did you received the new version? in that one you will have

delay removed from the virtual gearing new setting in the zwift device section in the qz settings, to inhibit the button debouncing

about the fact to reverse the left with the right I need to add a new settings, but it's not a problem, i can do this. Let's see first if you are ok with these 2 points above

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

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

SoCalKen99 commented 2 weeks ago

Roberto,

It doesn’t appear that I did. Can you please resend?

Ken Adams

@.***

From: Roberto Viola @.> Sent: Tuesday, August 27, 2024 8:23 AM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

I sent it 6 hours ago by email. Don't you get it?

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

Il giorno mar 27 ago 2024 alle 17:21 SoCalKen99 @. <mailto:@.> > ha scritto:

Roberto,How do I get the new version? Sorry - I'm not a GitHub expert. Do I download / install it from there?Sent from my iPhoneOn Aug 27, 2024, at 7:51 AM, Roberto Viola @. <mailto:@.> > wrote: thanks @SoCalKen99 did you received the new version? in that one you will have

delay removed from the virtual gearing new setting in the zwift device section in the qz settings, to inhibit the button debouncing

about the fact to reverse the left with the right I need to add a new settings, but it's not a problem, i can do this. Let's see first if you are ok with these 2 points above

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @. <mailto:@.> >

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

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2312866884 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBN3A4FZ4WRERB2GOATZTSKV3AVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJSHA3DMOBYGQ . You are receiving this because you were mentioned. https://github.com/notifications/beacon/BKZVKBM222TKXMGZ6U5UIFTZTSKV3A5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJ3OGEI.gif Message ID: @. @.> >

cagnulein commented 2 weeks ago

send me a mail to roberto.viola83 at gmail.com with another email account so i will send you it also there

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

Il giorno mar 27 ago 2024 alle ore 17:30 SoCalKen99 < @.***> ha scritto:

Roberto,

It doesn’t appear that I did. Can you please resend?

Ken Adams

@.***

From: Roberto Viola @.> Sent: Tuesday, August 27, 2024 8:23 AM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

I sent it 6 hours ago by email. Don't you get it?

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

Il giorno mar 27 ago 2024 alle 17:21 SoCalKen99 @. <mailto:@.>

ha scritto:

Roberto,How do I get the new version? Sorry - I'm not a GitHub expert. Do I download / install it from there?Sent from my iPhoneOn Aug 27, 2024, at 7:51 AM, Roberto Viola @. <mailto:@.> > wrote: thanks @SoCalKen99 did you received the new version? in that one you will have

delay removed from the virtual gearing new setting in the zwift device section in the qz settings, to inhibit the button debouncing

about the fact to reverse the left with the right I need to add a new settings, but it's not a problem, i can do this. Let's see first if you are ok with these 2 points above

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @. <mailto:@.> >

— Reply to this email directly, view it on GitHub < https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2312862767>,

or unsubscribe < https://github.com/notifications/unsubscribe-auth/AAALYWGOA5TEW2BU2IUKBBLZTSKOZAVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJSHA3DENZWG4>

. You are receiving this because you were mentioned.Message ID: @. <mailto:@.> >

— Reply to this email directly, view it on GitHub < https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2312866884> , or unsubscribe < https://github.com/notifications/unsubscribe-auth/BKZVKBN3A4FZ4WRERB2GOATZTSKV3AVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMJSHA3DMOBYGQ> . You are receiving this because you were mentioned. < https://github.com/notifications/beacon/BKZVKBM222TKXMGZ6U5UIFTZTSKV3A5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTUJ3OGEI.gif> Message ID: @. @.> >

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

SoCalKen99 commented 2 weeks ago

I attempted to test the new version. I no longer see QZ in the list of available devices to pair to for trainer devices. I tried both Zwift and Rouvy. QZ does pair to the KICKR Core and the Zwift Play controllers. I've attached a log.

debug-Wed_Aug_28_10_00_46_2024.log

cagnulein commented 2 weeks ago

you disable the virtual device in the experimental settings, that's the reason. enable and it will come back again ;)

SoCalKen99 commented 2 weeks ago

I tested the new version. Big improvement! Thanks for that. Other than the buttons being reversed from the Zwift "norm", I see only one remaining issue:

There is still a considerable lag between pressing the Gear +/- button and the trainer resistance change. In the log I've attached, I experienced lags in the order of 5-10 seconds.

I also wanted to ask about the Gear gain setting. I'm used to using the Zwift Play controllers with Zwift, where an increase of +/- 1 (one press on either virtual shift button) causes a noticeable trainer resistance change. In your implementation, should I expect a similar level of trainer resistance change with a +/- 1 virtual gear setting?

debug-Thu_Aug_29_12_35_17_2024.log

cagnulein commented 2 weeks ago

Hi @SoCalKen99 i checked the log and the gears is applying with a max delay of 200 milliseconds. I guess the problem that you are experiencing about the lags it's about the gain. Probably the 0.5 gain that you set is not high enough to feel the difference. I suggest to set a gain of 3.0 for example, so you will immediately feel it.

Also, if you want, i can also import the gears table of zwift

Screenshot 2024-08-30 at 08 29 40

zwift i guess uses a multiplier, instead i'm applying a constant offset.

Anyway let me know if with the gain of 3 you can feel immediately the mod, if so, then, it's just math.

Let's fix this and then i will also add a new setting to swap the controller. Also I just order a zwift play for myself, to debug all of these :)

Citizenyolo commented 2 weeks ago

Hi Roberto,

How are you? You may remember our earlier conversation on issue #2458 :

Just to chip in this conversation. Are you saying that you can align the virtual gear shifting in QZ to the same gear ratios as the table you shared above with 24 zwift gears? It'd be awesome, let me know if you need to help with testing. I have a Zwift Ride with all latest firmware installed.

If you have any newer build since we discussed in issue #2458 appreciate if I can share with me too. On testflight i can see V2.16 (836). Btw with this version on my Ziwft Play I have right click shifting up and left click shifting down.

cagnulein commented 2 weeks ago

Hi Roberto,

How are you? You may remember our earlier conversation on issue #2458 :

Just to chip in this conversation. Are you saying that you can align the virtual gear shifting in QZ to the same gear ratios as the table you shared above with 24 zwift gears? It'd be awesome, let me know if you need to help with testing. I have a Zwift Ride with all latest firmware installed.

sure it's just math, i will do in the next weeks

If you have any newer build since we discussed in issue #2458 appreciate if I can share with me too. On testflight i can see V2.16 (836). Btw with this version on my Ziwft Play I have right click shifting up and left click shifting down.

sure i'm sending it

SoCalKen99 commented 1 week ago

Roberto,

I modified my Gears gain to 3, which improved things a bit, as I don't have to press the shift buttons as many times. It still doesn't feel as responsive as the virtual shifting in Zwift - perhaps the gear ratios you mentioned would be required to achieve that.

A setting to reverse the gear up/down functionality to align with Zwift would be convenient, as I find myself shifting the wrong way often, as I've been using virtual shifting on Zwift for quite some time now and it's become muscle memory.

One other thing I wanted to inquire about. With Rouvy, when it tries to pair with QZ, it doesn't auto-pair with the previous Bluetooth connection it remembered for QZ. I have to manually re-pair Rouvy to QZ each time I run Rouvy, as there are two QZ entries in the device list (the current instance and the previous instance). Is there any way that this could be corrected so that Rouvy sees the same Bluetooth connection from QZ every time?

cagnulein commented 1 week ago

Roberto,

I modified my Gears gain to 3, which improved things a bit, as I don't have to press the shift buttons as many times. It still doesn't feel as responsive as the virtual shifting in Zwift - perhaps the gear ratios you mentioned would be required to achieve that.

You can also try to increase it. The "3" number it was just a guess. Anyway ok I'm adding also the zwift table

A setting to reverse the gear up/down functionality to align with Zwift would be convenient, as I find myself shifting the wrong way often, as I've been using virtual shifting on Zwift for quite some time now and it's become muscle memory.

OK I will add it

One other thing I wanted to inquire about. With Rouvy, when it tries to pair with QZ, it doesn't auto-pair with the previous Bluetooth connection it remembered for QZ. I have to manually re-pair Rouvy to QZ each time I run Rouvy, as there are two QZ entries in the device list (the current instance and the previous instance). Is there any way that this could be corrected so that Rouvy sees the same Bluetooth connection from QZ every time?

This is a rouvy issue with mobile devices, you have to ask to their support to fix it unfortunately

cagnulein commented 1 week ago

@SoCalKen99 both done! i created these 2 new settings for your requests

Screenshot 2024-09-06 at 09 34 17

i'm sending it by email! Let me know!

SoCalKen99 commented 1 week ago

Roberto,

First, thanks so much for the quick response and for the addition of these new features. I can't wait to check them out!

I have not received an email for the new version. I checked TestFlight and don't see anything there, either.

cagnulein commented 1 week ago

I sent it this morning. Send me an email to Roberto.viola83 at Gmail.com with another account Thanks

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

Il giorno ven 6 set 2024 alle 18:59 SoCalKen99 @.***> ha scritto:

Roberto,

First, thanks so much for the quick response and for the addition of these new features. I can't wait to check them out!

I have not received an email for the new version. I checked TestFlight and don't see anything there, either.

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

Citizenyolo commented 1 week ago

debug-Sun_Sep_8_19_54_54_2024.log.zip Hi Roberto,

Had a 30 minute test drive with my Zwift Bike. I have 3 observations testing it on IndieVelo:

  1. Zwift Gear ratios: When I switch this on, I don't feel any gear change at all regardless of the gear gain setting. In the debug you can see the first 5 minutes or so testing it, then i switched it off and I could then feel the gear changes relying on QZ algorithm. Maybe it would help to create a tile as "Gear Ratio" to see the actual calculated gear ratio at any given moment. Gear number can range from - 10 to + 20 or even wider range depending on gear gain settings. These are arbitrary numbers one cannot easily relate to.
  2. Gear lag: There still is a noticeable delay (more than 200 ms) as the other reviewer also experienced. It takes 4-5 seconds for the gear change to be noticeable. Once I read somewhere that you could lower it to something like 40 ms but than it would drain the battery of the device quicker. Maybe you can enable this option and user can choose it. I always use my iphone plugged into the charger while riding so it would not impact battery life but gear shifting speed increase would be welcome.
  3. Fit file (metric calculation) discrepancy: There is a noticeable overstating both on speed and calories (also on elevation gain) on QZ fit file vs IndieVelo fit file (see both attached). IndieVelo seems to be the realistic one. 140 watt is not enough to go at 33 km/h speed (as QZ says) it's more like 23 km/h as IndieVelo estimated.

Fit files.zip

Hope this is useful, if you find anything you can tweak further, happy to test it.

Cheers, Zoltan

cagnulein commented 1 week ago

for the 3. enable the speed based on power setting in the bike setting. it will not be the same because every app has a different algorithm, but you will have similar

for the other 2 i will check the log tomorrow thanks

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

Il giorno dom 8 set 2024 alle 22:00 Zoltan Haas @.***> ha scritto:

debug-Sun_Sep_8_19_54_54_2024.log.zip https://github.com/user-attachments/files/16923440/debug-Sun_Sep_8_19_54_54_2024.log.zip Hi Roberto,

Had a 30 minute test drive with my Zwift Bike. I have 3 observations testing it on IndieVelo:

  1. Zwift Gear ratios: When I switch this on, I don't feel any gear change at all regardless of the gear gain setting. In the debug you can see the first 5 minutes or so testing it, then i switched it off and I could then feel the gear changes relying on QZ algorithm. Maybe it would help to create a tile as "Gear Ratio" to see the actual calculated gear ratio at any given moment. Gear number can range from - 10 to + 20 or even wider range depending on gear gain settings. These are arbitrary numbers one cannot easily relate to.
  2. Gear lag: There still is a noticeable delay (more than 200 ms) as the other reviewer also experienced. It takes 4-5 seconds for the gear change to be noticeable. Once I read somewhere that you could lower it to something like 40 ms but than it would drain the battery of the device quicker. Maybe you can enable this option and user can choose it. I always use my iphone plugged into the charger while riding so it would not impact battery life but gear shifting speed increase would be welcome.
  3. Fit file (metric calculation) discrepancy: There is a noticeable overstating both on speed and calories (also on elevation gain) on QZ fit file vs IndieVelo fit file (see both attached). IndieVelo seems to be the realistic one. 140 watt is not enough to go at 33 km/h speed (as QZ says) it's more like 23 km/h as IndieVelo estimated.

Fit files.zip https://github.com/user-attachments/files/16923491/Fit.files.zip

Hope this is useful, if you find anything you can tweak further, happy to test it.

Cheers, Zoltan

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

cagnulein commented 1 week ago

@Citizenyolo ok some notes about your log:

send me an email to roberto.viola83 at gmail.com indicating this ticket and I will send you the new one (i don't know the link between your github name and the email :) )

Citizenyolo commented 6 days ago

Speed now looks good with your recommended setting, thanks!

Tested the new build but I see no impact on enabling the zwift gear ratios. When I do that and try shifting, I feel no difference. I tried it first standalone on the QZ app and then on IndieVelo too, no change on resistance at all. See my screenshots.

Gear 0 and Gear 72 (gear gain set to 0.5) results in the same watt (and speed) at the same cadence, which is not realistic, nor can i feel any change in resistance. Only the number on the "Gears" tile change.

IMG_1379 IMG_1380

I would recommend to add a new tile "Zwift Gear" from the table from 1 to 24. This would help now to troubleshoot why no change and when it is fixed, users can relate to the same gear setting as in Zwift.

debug-Mon_Sep_9_18_10_48_2024.log.zip

Also (maybe I misunderstand something) it would be probably better to allow only Gear Gain = 1 when Zwift Gear Ratios are enabled. My understanding is that then I can shift from 1 - 24 as per the zwift gear ratio table. In this case each gear ratio represents is a fixed level of resistance.

cagnulein commented 6 days ago

thanks, i will check the log tomorrow. consider that the ratio function is ok, in this log i should be able to see the reason why you don't feel the change

i will let you know

cagnulein commented 6 days ago

one question: is the old algorithm still working on this version? what about the delay?

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

Il giorno lun 9 set 2024 alle 18:36 Zoltan Haas @.***> ha scritto:

Speed now looks good with your recommended setting, thanks!

Tested the new build but I see no impact on enabling the zwift gear ratios. When I do that and try shifting, I feel no difference. I tried it first standalone on the QZ app and then on IndieVelo too, no change on resistance at all. See my screenshots.

Gear 0 and Gear 72 (gear gain set to 0.5) results in the same watt (and speed) at the same cadence, which is not realistic, nor can i feel any change in resistance. Only the number on the "Gears" tile change.

IMG_1379.PNG (view on web) https://github.com/user-attachments/assets/0db0b412-12e0-47b0-ae55-3b7538839ced IMG_1380.PNG (view on web) https://github.com/user-attachments/assets/091dbdc1-fc0e-4f33-8861-8ac33d7728f6

I would recommend to add a new tile "Zwift Gear" from the table from 1 to

  1. This would help now to troubleshoot why no change and when it is fixed, users can relate to the same gear setting as in Zwift.

debug-Mon_Sep_9_18_10_48_2024.log.zip https://github.com/user-attachments/files/16933509/debug-Mon_Sep_9_18_10_48_2024.log.zip

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

Citizenyolo commented 6 days ago

Yes the old algorithm works the same with this version too, with about 3-4 sec delay between shifts on IndieVelo.

cagnulein commented 6 days ago

Ok Thanks for the confirmation I will check it tomorrow

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

Il giorno lun 9 set 2024 alle 20:59 Zoltan Haas @.***> ha scritto:

Yes the old algorithm works the same with this version too, with about 3-4 sec delay between shifts on IndieVelo.

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

cagnulein commented 6 days ago

Ok I got the issue. it's because the inclination sent from indievelo is near to 0 in this case. if you try on a inclination higher to 1% or less than -1% you should feel it i will fix it tomorrow, its just a math issue

about the delay: are you sure you connected qz on all the tiles in indievelo? i mean as power sensor and also as controllable? in the log i'm seeing qz bridging the gears lower than 400ms with also the acknowledgment of the trainer. so there is something else

@SoCalKen99 are you using indievelo too?

SoCalKen99 commented 6 days ago

Roberto,

No, I’m using Rouvy. I haven’t had a chance to test today’s version yet. With the previous version, I was experiencing the issue with strange resistance issues when the setting to use Zwift table was on. I’ve also seen consistently slow resistance change behavior, like Zoltan reported.

I was able to use the previous version successfully with Rouvy, with the setting for Zwift table off, with a Gear gain of 2.5, despite the slow resistance change, which seemed like 2-3 seconds. Honestly, I was using a combination of real shifting and virtual shifting to compensate for the slow virtual shifting when it got competitive.

If it would provide any benefit, I can capture a log file from my next Rouvy ride.

Ken Adams

@.***

From: Roberto Viola @.> Sent: Monday, September 9, 2024 12:59 PM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

Ok I got the issue. it's because the inclination sent from indievelo is near to 0 in this case. if you try on a inclination higher to 1% or less than -1% you should feel it i will fix it tomorrow, its just a math issue

about the delay: are you sure you connected qz on all the tiles in indievelo? i mean as power sensor and also as controllable? in the log i'm seeing qz bridging the gears lower than 400ms with also the acknowledgment of the trainer. so there is something else

@SoCalKen99 https://github.com/SoCalKen99 are you using indievelo too?

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2338967981 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBKJSN2HTFFREDDYDKDZVX4ZDAVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZYHE3DOOJYGE . You are receiving this because you were mentioned. https://github.com/notifications/beacon/BKZVKBJPXAF2XJ6UDD76BUTZVX4ZDA5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTULNHI22.gif Message ID: @. @.> >

cagnulein commented 6 days ago

I would recommend to add a new tile "Zwift Gear" from the table from 1 to 24. This would help now to troubleshoot why no change and when it is fixed, users can relate to the same gear setting as in Zwift.

for the moment i guess it's useless. Just look at the gear tile: from 1 to 24 qz is applying the same gear gain of zwift report in the table above. So simply keep the gear tile from 1 to 24. that's it :) i saw in the log, that you were playing also with negative gears: with the zwift gear setting, this is useless for now.

I also analyzed the log, looking for any sort of delays, but everything looks good to me, check these:

here the zwift play command Mon Sep 9 18:16:51 2024 1725898611758 Debug: /Users/cagnulein/qdomyos-zwift/src/zwift_play/abstractZapDevice.h int AbstractZapDevice::processCharacteristic(const QString &, const QByteArray &, ZWIFT_PLAY_TYPE) 2 "Async" "2308ffdfffff0f1a04080010001a04080110001a04080210001a0408031000" false false

setting the new gear value Mon Sep 9 18:16:51 2024 1725898611759 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bike.cpp void bike::setGears(double) setGears 1

sending the command to the trainer Mon Sep 9 18:16:51 2024 1725898611870 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/bluetooth.cpp void bluetooth::debug(const QString &) " >> 11 b3 01 07 00 32 28 // injectWrite"

the trainer ack Mon Sep 9 18:16:52 2024 1725898612185 Debug: /Users/cagnulein/qdomyos-zwift/src/devices/ftmsbike/ftmsbike.cpp void ftmsbike::characteristicChanged(const QLowEnergyCharacteristic &, const QByteArray &) "{00002ad9-0000-1000-8000-00805f9b34fb}" 3 " << " "80 11 01"

the whole process is indeed 400ms, from the event of the zwift play to the ack of the trainer, where the major lag is the trainer ack (300ms). So i guess, in order to understand this, we should try to:

also i'm sending a new one today with the math fix that i was tolding yesterday.

Let me know! We're getting it, don't worry!

cagnulein commented 5 days ago

hi guys any news? @Citizenyolo @SoCalKen99

SoCalKen99 commented 5 days ago

Roberto,Can you please check that you updated TestFlight for me? When I open TestFlight, the button says "Open", not "Update", as it usually does when there's a new version available. Sent from my iPhoneOn Sep 11, 2024, at 5:37 AM, Roberto Viola @.***> wrote: hi guys any news? @Citizenyolo @SoCalKen99

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

cagnulein commented 5 days ago

hi @SoCalKen99 check the build version on testflight, must be 863

SoCalKen99 commented 4 days ago

Roberto,

It is and the app version is 2.16.69.

After you sent the notification email that a new version was available, when I opened TestFlight, it didn’t give me the option to update – just open. Not sure what that means.

Ken Adams

@.***

From: Roberto Viola @.> Sent: Wednesday, September 11, 2024 7:13 AM To: cagnulein/qdomyos-zwift @.> Cc: SoCalKen99 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] Several Issues Using QZ with Rouvy and Zwift Play Controllers (Issue #2541)

hi @SoCalKen99 https://github.com/SoCalKen99 check the build version on testflight, must be 863

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2541#issuecomment-2343793318 , or unsubscribe https://github.com/notifications/unsubscribe-auth/BKZVKBMCER33AFLMONMYZOTZWBFVNAVCNFSM6AAAAABNEUWYKCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBTG44TGMZRHA . You are receiving this because you were mentioned. https://github.com/notifications/beacon/BKZVKBKS76L2GOGXUCRG7SLZWBFVNA5CNFSM6AAAAABNEUWYKCWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTULWNZKM.gif Message ID: @. @.> >

cagnulein commented 4 days ago

@SoCalKen99

Check the build version here

image

SoCalKen99 commented 4 days ago

Sorry - I don't know how to access that screen.

cagnulein commented 4 days ago

open the testflight app :) it's the testflight main view @SoCalKen99

SoCalKen99 commented 3 days ago

Roberto,

I've attached a log from yesterday's Rouvy ride with QZ with the Zwift app ratios for gears enabled. Unfortunately, it's not working well. I turned it off just a couple minutes into the ride, as it was basically unusable.

It didn't seem to be adjusting the trainer resistance in a very predictable, consistent or repeatable way. I use a KICKR Climb and I did notice that it started reacting rather violently to QZ gear changes (raising and lowering my front fork), so I wonder if QZ is somehow affecting Zwift gradient (which would be wreaking havoc on resistance calculations, no?)?

I also had some thoughts on how QZ Gears might be synchronized to Zwift virtual shifting. Since Zwift works on a virtual gear range of 1-24, it seems to me that QZ Gears need to be translated to and limited to that range when the Zwift app ratios for gears setting is enabled. It seems to me that QZ Gear 0 should equal Zwift gear 12, with negative QZ gear values reducing the Zwift gear towards 1 and positive QZ gear values increasing the Zwift gear towards 24. Or just make it simple and make it the same as Zwift and limit the values from 1-24 (perhaps it works this way when the Zwift app ratios for gears setting is enabled and like it does now when it's not?). I like this concept, and I think it's a worthy goal to make QZ virtual shifting work as closely as possible to Zwift's, as they have done a very good job with that feature.

I really appreciate the time and effort you've spent implementing and fine tuning this feature. It's a huge help with Rouvy (and other platforms, I'm sure) that have super steep climbs that exceed the gearing on my trainer bike. Rouvy does allow you to adjust the difficulty to compensate, but you get no credit for completed routes unless the difficulty is set to 100%.

debug-Thu_Sep_12_16_57_57_2024.log

cagnulein commented 3 days ago

thanks @SoCalKen99 let me explain better how it works and so how I can fix it. First of all we have to distinguish 2 types of fitness devices, the ones that have native virtual shifting support with zwift and the one that they don't.

now i handled both cases on the same way and in the only way: affecting the inclination sent from the 3rd app (in your case rouvy) adding or removing an offset (for what I read from your message, I'm calculating it too strong and it's something fixable easy). This so affects also your KICKR Climb, yes.

BUT, as I said, your trainer it has also native support on virtual gearing on zwift, so what we can do, it's to handle the gearing with the native command of zwift in your case, so you will have the exactly same behaviour. In order to do so i need you to follow this with zwift without qz https://github.com/cagnulein/qdomyos-zwift/blob/master/docs/20_supported_devices_and_applications.md#android-device and changing the virtual gear on zwift from 1 to 24. are you able to do so with an android device?

also answering to your question about the limit of 1 to 24, it's what i'm already doing underneath when you enable the new setting "zwift gear", i'm basically ignore any value less than 0 and higher than 24. so don't worry about this.

so in the meantime, i will analyze the log and i will decrease the strength of the actual implementation, but if you will proceed with the log from zwift i will give you native one also.

let me know if it's all clear!

cagnulein commented 3 days ago

also @SoCalKen99 i checked the log but it's a small one, i guess you have another from yesterday. @Citizenyolo any news?