cagnulein / qdomyos-zwift

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

[BUG] Inconsistent resistance with 'Get Gears from Zwift' setting in latest version of QZ. #2680

Open Nagusia opened 2 days ago

Nagusia commented 2 days ago

Hi Roberto.

The buttons on Zwift play behave as expected and the gear changes are displayed on the screen. However, with Zwift on ATV the resistance does not change as expected (there is a problem with the setup which might be the cause). With Zwift on Windows 11 the resistance does change but feels laggy and inconsistent.

Because of the bluetooth limitation of ATV I had to use a third device (Samsung Tab) with Zwift Companion in order to connect the Zwift Play controllers and the QZ app (on a Pixel 4A). In the end I was able to set things up as in your video and could see the gears changing but resistance did not change. I attach a debug log.

debug-Sun_Oct_20_18_29_54_2024.log

On Windows 11 it was easier to set up and I could feel the resistance changing although somewhat erratically. Occasionally it felt like the resistance just disappeared and then came back. It was not as consistent as the classic QZ behaviour, and not as easy to control. Is it possible in settings to adjust the baseline resistance, for gear 8 for example?

debug-Sun_Oct_20_20_05_19_2024.log

Is it possible to used the Zwift Click buttons with this new set up?

cagnulein commented 2 days ago

I checked quickly the one on mobile. Set your trainer under ftms bike in the bike settings and press OK and restart qz Let me know!

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

Il giorno dom 20 ott 2024 alle 20:59 Nagusia @.***> ha scritto:

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

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

Nagusia commented 2 days ago

@cagnulein Good morning. I just did a short ride with the change you suggested. All connects up okay and the gears change up and down on the screen with the Zwift Play buttons as expected, but there is no change to resistance I can detect. In fact, the resistance number on the QZ app remains more or less constant. Here is the debug file.

debug-Mon_Oct_21_09_56_16_2024.log

cagnulein commented 2 days ago

the problem in this log is that zwift is not synced with qz, zwift is sending the hello message, qz is aswnering but zwift is still saying the hello message again. Can you show me a little video how you pair qz in zwift, i guess that your issue is there. Let me know

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

Il giorno lun 21 ott 2024 alle ore 10:19 Nagusia @.***> ha scritto:

@cagnulein https://github.com/cagnulein Good morning. I just did a short ride with the change you suggested. All connects up okay and the gears change up and down on the screen with the Zwift Play buttons as expected, but there is no change to resistance I can detect. In fact, the resistance number on the QZ app remains more or less constant. Here is the debug file.

debug-Mon_Oct_21_09_56_16_2024.log https://github.com/user-attachments/files/17457454/debug-Mon_Oct_21_09_56_16_2024.log

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

Nagusia commented 1 day ago

I have made a video of the connection process: QZ trial.zip It's not great quality I'm afraid but I hope you can see that I have connected everything correctly. You will also see that when I start the ride there is a 'connection failure' warning in Zwift. I go to the pairing screen to re-connect but although there is no longer a warning the resistance no longer changes. I guess that Zwift is not synchronised and imagine this is because I have to use Zwift companion to connect the phone running QZ as resistance source in Zwift. (This is because Zwift Play takes up the 2 available BT connections on ATV. I cannot see anywhere around this. Anyway, here are two debug files (I tried twice): debug-Mon_Oct_21_13_52_19_2024.log debug-Mon_Oct_21_13_43_12_2024.log I did a further test running Zwift on a Samsung Tab which has no limitations on BT connections. This was easy to connect and gear changing appeared to work although, as with the Windows 11 experience yesterday, it was hard to feel the difference between 1 gear up or down and it felt laggy. Here is the debug file: debug-Mon_Oct_21_14_52_39_2024.log

cagnulein commented 1 day ago

debug-Mon_Oct_21_13_52_19_2024.log

here i can see finally everything connected fine! but i don't see you changing gears

instead here https://github.com/user-attachments/files/17461818/debug-Mon_Oct_21_13_43_12_2024.log I can't see it, so maybe you did something different?

changing appeared to work although, as with the Windows 11 experience yesterday, it was hard to feel the difference between 1 gear up or down and it felt laggy. Here is the debug file: debug-Mon_Oct_21_14_52_39_2024.log

the fact is laggy it's because you need also to enable the zwift gear experimental one in the zwift accessories in QZ. with this disabled, qz is adding 0.5% when you add a gear.

Follow this https://github.com/cagnulein/qdomyos-zwift/discussions/2671 i'm planning to change the zwift gear experimental in this way

Nagusia commented 1 day ago

Follow this #2671 i'm planning to change the zwift gear experimental in this way

I've read the thread and the proposed table with 15 gears makes sense. I would be happy to help with testing on Android.

Nagusia commented 1 day ago

the fact is laggy it's because you need also to enable the zwift gear experimental one in the zwift accessories in QZ. with this disabled, qz is adding 0.5% when you add a gear.

Despite enabling the Zwift gear experimental setting I am still not feeling consistent changes in resistance which make any sense. In a previous comment you said that my trainer - Wahoo Kickr v4 2018 - was not compatible with this setting. Is this still the case in this version 2.18.1? Here is the debug file: debug-Mon_Oct_21_17_18_17_2024.log

I also tried the ATV setup again but the constant disconnects with Zwift mean I can't really test anything.

cagnulein commented 1 day ago

In a previous comment you said that my trainer - Wahoo Kickr v4 2018 - was not compatible with this setting.

hah you are right. Sorry I'm following too many cases. I will check again the log looking for an issue (probably tomorrow)

cagnulein commented 1 day ago

ok i can see an issue. Let me check deeply

cagnulein commented 1 day ago

no sorry, i was wrong, i see everything correctly.

just to understand better the issue:

i checked the timing and from when you change gears from zwift to the timeslot when qz sends the frame to the trainer is just 100ms. The trainer then answers back after 400ms. So in total there is a 0.5s delay, but the most part is the trainer that it's not quick to act the command. Is this the delay that you are talking about?

Let me know your thoughts

cagnulein commented 1 day ago

also, last note: without the "get gears from zwift", do you have the same issue using the zwift play directly on qz?

Nagusia commented 20 hours ago
  • enable the target incline tile setting so you will see the target incline sent from zwift. Because I guess that when you say that it's sluggish it's becasue zwift is sending less inclination and so you feel like the gear isn't applied, but instead is the inclination that it's turning down

Yes, I will do this. Now you mention it, this makes sense and confirms a suspicion I had that this is what might be happening. I guess the target incline tile will be an objective way on checking this. Should the target incline be the same as what Zwift shows?

i checked the timing and from when you change gears from zwift to the timeslot when qz sends the frame to the trainer is just 100ms. The trainer then answers back after 400ms. So in total there is a 0.5s delay, but the most part is the trainer that it's not quick to act the command. Is this the delay that you are talking about?

No, I felt that lag was much longer. 0.5 s would be fine. I think I perceived the problem with inclination as lag.

also, last note: without the "get gears from zwift", do you have the same issue using the zwift play directly on qz?

Not sure I understand this. I haven't used Zwift Play controllers directly on GZ because I didn't want to lose the other functions. I have been using Zwift Click with the previous version of GZ and the classic gear change system and it worked fine. (But it didn't work with the 'get gears from Zwift' setting - you said this was because my trainer wasn't compatible. Do you want me to try Zwift Click directly on GZ to see how it works?

cagnulein commented 20 hours ago

Yes, I will do this. Now you mention it, this makes sense and confirms a suspicion I had that this is what might be happening. I guess the target incline tile will be an objective way on checking this. Should the target incline be the same as what Zwift shows?

more or less. Zwift is showing the average one, qz is showing the actual one. Also there is a open point about this #2677 so it could be this is the issue

No, I felt that lag was much longer. 0.5 s would be fine. I think I perceived the problem with inclination as lag.

ok let me know

. Do you want me to try Zwift Click directly on GZ to see how it works?

no it doesn't worth, you will see the same.

I have been using Zwift Click with the previous version of GZ and the classic gear change system and it worked fine

perfect, this was the confirmation that i was looking, so the issue is about only to the "get gears from zwift" thing.

Nagusia commented 20 hours ago

more or less. Zwift is showing the average one, qz is showing the actual one. Also there is a open point about this #2677 so it could be this is the issue

Actually, the new Zwift HUD shows the exact gradient at that moment in time, as well as the average. Anyway, I will let you know.

cagnulein commented 20 hours ago

Didn't know this, thanks for the heads up!

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

Il giorno mar 22 ott 2024 alle 15:35 Nagusia @.***> ha scritto:

more or less. Zwift is showing the average one, qz is showing the actual one. Also there is a open point about this #2677 https://github.com/cagnulein/qdomyos-zwift/issues/2677 so it could be this is the issue

Actually, the new Zwift HUD shows the exact gradient at that moment in time, as well as the average. Anyway, I will let you know.

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

Nagusia commented 19 hours ago

I enabled the Target Incline Tile but it just showed 0% the whole time. I had the 'get gears from Zwift' setting enabled and also the 'use Zwift gears table' enabled (Is this right?). Starting off on the flat in gear 8 was comfortable but changing gear up or down didn't make any difference really. This continued to be the case on a 6% slope for a minute and then it suddenly got a lot harder despite changing to a lower gear. I turned round to go downhill and the resistance was maintained but then got easier again when I reached the flat. So there seem to be two problems: The Zwift gears table not working for my trainer. The incline issue. debug-Tue_Oct_22_15_58_31_2024.log

cagnulein commented 19 hours ago

I had the 'get gears from Zwift' setting enabled and also the 'use Zwift gears table' enabled (Is this right?)

you can disable the "use zwift gears table", as I said it's not working for your traienr. But let's check the target incline thing, it shouldn't stay to 0

let me check the debug log

cagnulein commented 19 hours ago

sorry my fault, it was the inclination tile, not the target one. let me finish the log check anyway

cagnulein commented 18 hours ago

@Nagusia i did a small patch https://github.com/cagnulein/qdomyos-zwift/actions/runs/11462610374 because when i was receiving the inclination from zwift, i wasn't adding any wind speed and any rolling and wind resistance. I was wondering if for your trainer these are required (this is happening only with get gears from zwift)

Google is very slow in these days, reviewing the app on the store, even the beta ones. For this reason, in order to check right now if the patch that I did is right, you can use the android build in the link (check at the bottom of the page in about 1 hour). In order to test it you need first to remove the current QZ version on your phone, install the one that you downloaded. This version is a 15 minutes trial (you can restart it as many times as you want) and I can unlock it if you want, send me an email to roberto.viola83@gmail.com mentioning this ticket and that you are on android.

So to summarize:

Let me know!

Nagusia commented 18 hours ago

Will do. Just one question. Can I save the profile in present app before uninstalling and then import in the new version? When I tried this with the most recent version 2.18.1 I seemed to lose all the settings.

cagnulein commented 18 hours ago

you can but follow this:

let me know!

Nagusia commented 17 hours ago

While waiting for the new build link did a ride with everything connected to virtual wahoo trainer (including resistance) and with the inclination tile enabled. The figure in the tile was identical to Zwift (climb difficulty at max) but half the Zwift percentage on descents (this is built in to Zwift I believe).

  • disable the use zwift gears table
  • enable the incline tile and disable the target one

I just want to confirm that with the new build you want me to trial it with 'get gears from Zwift' enabled (as opposed to 'use Zwift gears') and resistance connected directly to phone with QZ on, and not the virtual trainer.

cagnulein commented 16 hours ago

While waiting for the new build link did a ride with everything connected to virtual wahoo trainer (including resistance) and with the inclination tile enabled. The figure in the tile was identical to Zwift (climb difficulty at max) but half the Zwift percentage on descents (this is built in to Zwift I believe).

yes for the negative inclination is zwift that send the half. there is a setting on qz to double this.

this is expected because zwift, for the devices compatible with the cog, is not sending the inclination but its sending a sort of effort. i added an algorithm to estimate the inclination, its why we have to understand what i could improve

  • disable the use zwift gears table

  • enable the incline tile and disable the target one

I just want to confirm that with the new build you want me to trial it with 'get gears from Zwift' enabled (as opposed to 'use Zwift gears') and resistance connected directly to phone with QZ on, and not the virtual trainer.

exactly

Nagusia commented 16 hours ago

Tested the new build. The incline tile figure doesn't match up with Zwift. On uphill it is about half the Zwift figure. On downhills I didn't see a negative figure. You start off on gear 8 in Zwift, which corresponds to gear 0 in QZ. If you change to gear 7 in Zwift, it jumps to -8 in QZ. If you use the Zwift Click this doesn't happen and I guess it changes the incline 0.5% with each gear change as expected. debug-Tue_Oct_22_18_38_47_2024.log

cagnulein commented 16 hours ago

yes but beside the fact that it's not following exactly the inclination and that the gears does a jump on startup, now do you feel the resistance following the gears? the modification that i did in this one it's about this

Nagusia commented 16 hours ago

now do you feel the resistance following the gears?

Yes, I think so. It's certainly better than before, although I'm afraid I was more focused on the inclination issue. I'll try to give you more feedback tomorrow.

cagnulein commented 15 hours ago

Ok I will work on the inclination side

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

Il giorno mar 22 ott 2024 alle 19:25 Nagusia @.***> ha scritto:

now do you feel the resistance following the gears?

Yes, I think so. It's certainly better than before, although I'm afraid I was more focused on the inclination issue. I'll try to give you more feedback tomorrow.

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

cagnulein commented 1 hour ago

i fixed the inclination! on both negative and positive with the get gears, i will upload a new one soon Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno mar 22 ott 2024 alle ore 20:03 cagnulein @.***> ha scritto:

Ok I will work on the inclination side

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

Il giorno mar 22 ott 2024 alle 19:25 Nagusia @.***> ha scritto:

now do you feel the resistance following the gears?

Yes, I think so. It's certainly better than before, although I'm afraid I was more focused on the inclination issue. I'll try to give you more feedback tomorrow.

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

cagnulein commented 46 minutes ago

try this https://github.com/cagnulein/qdomyos-zwift/actions/runs/11475844697 now the inclination is perfect!