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

Unable to connect my Zwift Play to QZ #2458

Closed
felixlbr opened this issue Jul 17, 2024 · 68 comments
Closed

Unable to connect my Zwift Play to QZ #2458

felixlbr opened this issue Jul 17, 2024 · 68 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@felixlbr
Copy link

I followed the tutorial on Youtube to use my controllers Zwift Play on QZ but it doesn’t work. Even my Home Trainer that I am able to connect, when I can’t change gear by using “+” “-“ on the screen. I am using Zwift Cog and not a classic Gear

To Reproduce
Steps to reproduce the behavior:

  1. Enable “Zwift Play”, “Gear” and adjust “Gear gain”
  2. Quit the app
  3. Connect my Zwift Play to my Ipad via Bluetooth
  4. Restart QZ

Expected behavior
I expected to have my Zwift Play connected to QZ. I only see my Home Trainer “found” on the dashboard.

image

Device

  • OS: IpadOS
  • Version 17.5.1

debug-mer__juil__17_22_12_06_2024.log

@felixlbr felixlbr added the bug Something isn't working label Jul 17, 2024
@cagnulein
Copy link
Owner

cagnulein commented Jul 17, 2024 via email

@cagnulein
Copy link
Owner

hi @felixlbr I checked the log: I can't see the zwift play at all in bluetooth in this log. Are you sure they aren't connected somewhere else and also did you press a button on both before opening QZ to wake them up?
You can also use the free app nrfconnect to see if you can see them. They are called "zwift play"
Let me know

@cagnulein
Copy link
Owner

Video.mov

cagnulein added a commit that referenced this issue Jul 18, 2024
@felixlbr
Copy link
Author

@cagnulein
Copy link
Owner

cagnulein commented Jul 22, 2024 via email

cagnulein added a commit that referenced this issue Jul 22, 2024
@cagnulein
Copy link
Owner

cagnulein commented Jul 22, 2024 via email

@cagnulein
Copy link
Owner

@felixlbr any news?

@felixlbr
Copy link
Author

IMG_1780

I can still not change gear with my zwift play, I have the impression that gear does not affect the Home trainer Resistance

@cagnulein
Copy link
Owner

cagnulein commented Jul 26, 2024 via email

@felixlbr
Copy link
Author

I am currently on vacation, I will be able to send it in one week.

@cagnulein
Copy link
Owner

cagnulein commented Jul 26, 2024 via email

@cagnulein
Copy link
Owner

ajchellew/zwiftplay#5

@Citizenyolo
Copy link

I have the same issue with my new Zwift Ride. Same way to replicate it as described above.

Zwift Play does seem to connect and the device appears on the Bluetooth list. If I go to Settings / Advanced setting and pull down the Manual Device list it appears as "Zwift Ride".

However virtual shifting does not work. The only thing it does is when I press the orange brake lever on my LEFT handlebar it changes the virtual shift with a -2 value and if I press it hard it decreases with a value of about -6 or more. It does not feel more difficult or more easy in watt terms. If I press the same button on the RIGHT side, nothing happens, no values change.

I would also consider assigning a different button for gear shifting. Did you know that the orange brake lever (the long button) has a dual function in Zwift? If you press it softly it is used for steering to that direction. If you press it hard it is used for braking (front or rear).

In Zwift the shifting is assigned to the buttons on the SIDE. You can find two shifters (like on a real roadbike) and in Zwift either of the 2 you press on the right side will shift to smaller virtual cog (more effort) and when you press either on the left side will shift to larger virtual cog (less effort). Maybe you could consider keeping consistency with this approach.

debug-Tue_Aug_6_18_44_36_2024.log

I have attached the log file.

@cagnulein
Copy link
Owner

Hi @Citizenyolo thanks for the log.
Checked and understood the issue: your zwift ride is different from the previous one because it sends both controller frome one bluetooth device.
I just handled it and I'm sending you a new build. Check the gear tile in qz to see that if it's changing: in the log that you sent me the gears just moves only negative (from 0 to -99), did you notice this?

About the buttons: yes we can map also other buttons, for first of all, let's see if this it's working, then we can proceed mapping other buttons.

Let me know

cagnulein added a commit that referenced this issue Aug 6, 2024
@Citizenyolo
Copy link

Thank You!

Yes, The Virtual gear only progressed in negative increments and only on the left side button (no positive gear change when pressing on the right side button). Also it should probably progress in an increment of 1 at a time and not 2, 4 or 8. Also It changed nothing on the pedalling difficulty in any way.

Shall I go to the Testflight app on my iPhone and install QZ again or I need to wait for it to offer update?

@cagnulein
Copy link
Owner

cagnulein commented Aug 6, 2024 via email

@Citizenyolo
Copy link

Citizenyolo commented Aug 6, 2024

Now it's shifting up and down but there is no change in resistance at all. I can shift from -50 to +50 and have the same watt output at the same rpm.
debug-Tue_Aug_6_20_47_24_2024.log

@Citizenyolo
Copy link

Citizenyolo commented Aug 6, 2024

Another issue is that when I launch two apps at the same time (1) IndieVelo on my iPad and (2) QZ on my iPhone, while both of them connect to my trainer but when IndieVelo is running the virtual shifting (using Zwift Play buttons) no longer works on QZ. I tried to shift from the app and the values go up and down but does not change the resistance feel.
debug-Tue_Aug_6_20_52_04_2024.log

@cagnulein
Copy link
Owner

cagnulein commented Aug 6, 2024 via email

@Citizenyolo
Copy link

Citizenyolo commented Aug 6, 2024

I’ll try try it now but the resistance does not change even if i change virtual gear only on QZ. Zwift play works, changes gear, wattage is the same on QZ during training

@Citizenyolo
Copy link

Citizenyolo commented Aug 6, 2024

OK, I restarted IndieVelo and the Zwift Play shifting is moving the "Gears" tile up or down. BUT it does nothing. I can be in gear 500 and pull 54 watt and do the same in -500 gear. There does not seem to be any connection between resistance feel and the gear set with or without IndieVelo is the same ie. constant. I would forget about IndieVelo for starters and focus on QZ. My understanding is that when the gears change in QZ, the resistance should change too. This does not happen yet.

@cagnulein
Copy link
Owner

I’ll try try it now but the resistance does not change even if i change virtual gear only on QZ. Zwift play works, chamges gear, wattage is rhe same on QZ zraining

that's normal, i'm applying gears mod only when i receiving a resistance request from any 3rd party apps. of course i can do this as well, but let's focus on indievelo first. I will check the log again, in the meantime, try the same setup with zwift, just to double check that it's an indievelo setup issue.

let me know

@cagnulein
Copy link
Owner

i was checking the log and just a stupid question but it worth to ask: are you connecting the iphone to indievelo right? you don't have to connect your trainer to indievelo

@Citizenyolo
Copy link

So the set up is as follow (and maybe wrong, but I'm new to this gear :) ) (1) Indivelo is run on an iPad Pro and connects to the trainer AND
IMG_0057

IMG_0056

IMG_0055
(2) on my iPhone 14 Pro Max I have QZ and it also connects to the Wahoo trainer.

@cagnulein
Copy link
Owner

ok that's the issue, on indievelo you have to select the iphone not the kickr core. don't you see the qz device there?

cagnulein added a commit that referenced this issue Aug 6, 2024
@cagnulein
Copy link
Owner

cagnulein commented Aug 6, 2024 via email

@Citizenyolo
Copy link

Citizenyolo commented Aug 6, 2024

Buttons are perfect, same as in Zwift. Lag is much better but it's still there but not 5-10 sec more like 2-3 sec lag.

debug-Tue_Aug_6_22_41_34_2024.log

@cagnulein
Copy link
Owner

got the issue, i don't know why but it wasn't fixed the previous one. let me check. perfect for the buttons!

cagnulein added a commit that referenced this issue Aug 6, 2024
@Citizenyolo
Copy link

Lag is still there, I did not feel any change vs previous version. Log is attached. This week I'm working from home so you can reach me any time for testing new versions. Thanks!

debug-Tue_Aug_6_23_35_11_2024.log

@cagnulein
Copy link
Owner

ok i have to add some other debug log to understand it. tomorrow we will solve it for sure :)
have a good night!

cagnulein added a commit that referenced this issue Aug 6, 2024
@Citizenyolo
Copy link

Citizenyolo commented Aug 7, 2024

I tested it but something got worse. Now the resistance does not change to any direction, always at about 75 watt. Attached the log. The "gear" tile does change though and the buttons work as expected.

debug-Wed_Aug_7_10_01_40_2024.log

@cagnulein
Copy link
Owner

i don-t see a the connection from indievelo, that's the issue. did you pair as before?

@Citizenyolo
Copy link

I tried again and I think I connected correctly this time. Before the update the name of the trainer was "QZ" and now it changed to "iPhone 14". That's why I overlooked it. I also attached my heart rate monitor FYI.

The update does not seem to address the lag, which is about 3-4 sec.

debug-Wed_Aug_7_10_14_38_2024.log

Attached the log.

@cagnulein
Copy link
Owner

ok now i see everything and everything is under 200ms. I'm wondering if the issue is that your trainer doesn't get small difference from the gears. try to increase the gears gain for example to 5, so this means that every time you press it it will increase by 5.

@Citizenyolo
Copy link

ok now i see everything and everything is under 200ms. I'm wondering if the issue is that your trainer doesn't get small difference from the gears. try to increase the gears gain for example to 5, so this means that every time you press it it will increase by 5.

Where can I set it? In Advanced settings I can see Watt gain, cadence gain, speed gain but no gear gain setting...

@cagnulein
Copy link
Owner

bike options

@Citizenyolo
Copy link

I set gear gain from 1 to 5. When I change gear it now goes in about 10 or 20 increments. It now feels much more responsive but the change from one gear to the next next is dramatic eg. from 75 watt to 180 watt at same rpm.

Zwift publishes the gear ratio for each gear. you can see the increments is about 0.2 from each gear. The current version feels more like an increment of 1.0 or more per gear change.

Zwift gears

debug-Wed_Aug_7_10_31_26_2024.log

@Citizenyolo
Copy link

If it's any help I can go through the gears in zwift at a constant rpm and tell you for each virtual gear the wattage. May help to calibrate a more consistent feel? Or maybe more settings in QZ to address it?

@cagnulein
Copy link
Owner

cagnulein commented Aug 7, 2024

Ok so let me summarize it: so now with the gears gain to 5 you feel that it's changing immediately right? so this means that your trainer has low sensitivity to the inclination changes.
I mean, QZ is applying an offset to the inclination sent from indievelo. Assume that you are at 0% in indievelo, and you have gear 1 in QZ, QZ is sending 0.5% to your trainer.

What you are telling me, is that 0.5% or 1% is not noticable, instead a 2.5% is noticeable, right?

another test that you can do, without QZ, pairing indievelo directly to your trainer, is to see on a hill how much you feel the inclination, i mean if it's the indivelo grade changes from 0.5 to 1 and you don't feel it, that's a confirmation of what i'm saying

If it's so, you just need to find a confortable gears gain, for example, maybe 2 is enough for you

@Citizenyolo
Copy link

So, a few test:

I tested IndieVelo on my trainer and the gradient changes were between 0% and +/- 1%. The watt meter showed about a 30W change immediately and there was an immediate subtle change in resistance feel. Same is for Zwift natively.

I also fired up Mywhoosh with Belgium (0% gradient all the way) hooked up to QZ. I lowered the gear gain to 2. When I change 1 gear the difference in wattage is about 100 watts. That's a lot for one gear.

On IndieVelo maybe there is a workaround to this, as it does offer to change virtual gear on the screen or with a bluetooth keyboard's +/-. You already successfully reverse engineered the buttons on the Zwift Play so maybe it would be not only easier to link the buttons to Indivelo's +/- bluetooth reciever but also keep Indivelo's famous accuracy intact. Someone seems to have experimented with this idea already:

https://github.com/jat255/zwift_click_handling

debug-Wed_Aug_7_11_01_41_2024.log

@cagnulein
Copy link
Owner

ok so for what you are saying a gears gain of 0.5 or even less it should be the perfection.
Maybe the issue is that qz is sending too much frames on the trainer?
Try to set the 0.5 gears gain and do just one gear change at a time. do you feel the difference?
It could be a matter of too much frames because usually indievelo or zwift sends the inclination only when it changes, qz, if you are changing the gears continuosly it sends it each time. (so in a second i can send 5 different settings to the trainer max.).

We just need to figure out the limit of your trainer, check the guy here #2470 it has your same setup and it seems ok to him after the lag patch. I'm mentioning him here to discuss about this @jontnswift

@Citizenyolo
Copy link

I set the gear resistance to 0.3 which gives about the same gear ratio change as Zwift virtual cogs.
On 0% gradient Brussels I set constant effort to result in 100w and that was at about 76 rpm.

If I change one gear, within about 1 second (as per previous guy's observation) you feel a slight change and read 111 watt. If you keep pedalling at that constant RPM and 0% gradient it takes about 3 seconds to arrive at the 130 Watt that 1 gear changes means.

Overall we are in good place already: Zwift click working and I can use this for exercise purposes for all the apps. The only scenario where this may not be fast enough for some people is for racing, but for 90% of the people this is brilliant!

I may have a quick fix idea for IndiVelo for racers / quicker shifting. You can assign maybe the lower right side buttons on zwift play for transmitting "+" signal for and lower left to transmit "-" signal. You can keep the upper side buttons as is for QZ gear change, it is a duplicate anyway as per Zwift assignment.

My iphone (with QZ running) is connected to my iPad (running IndieVelo) as a bluetooth device. Wouldn't that be picked up by IndieVelio as a keyboard +/- input? If yes, that's an extra solution for IndieVelo and in future if other apps follow that virtual gear change route, it is quite likely/logical they will use the +/- buttons for that, too.

Overall this is great stuff, thanks for your quick fix!

@cagnulein
Copy link
Owner

I may have a quick fix idea for IndiVelo for racers / quicker shifting. You can assign maybe the lower right side buttons on zwift play for transmitting "+" signal for and lower left to transmit "-" signal. You can keep the upper side buttons as is for QZ gear change, it is a duplicate anyway as per Zwift assignment.

sure, do you think this could solve your issue?
I didn't get from what you are saying if it's a delay thing of qz or a delay thing of your trainer or just a gear gain issue. From your phrase it seems that you need a more precise settings, and yes I can do easily this mod. Let me know if you want to proceed in this way!

@Citizenyolo
Copy link

That would be great if we can have that +/- set up to the lower buttons. IndieVelo does change gears a bit faster but it is clumsy to use the touchscreen for that.

@cagnulein
Copy link
Owner

hah no wait i misread the message: i guess you would like to set a 2x gear with the top button. No i can't emulate a keyboard button to indievelo. I don't understand how it could be faster on indievelo: it's the same message sent from a device to another. How much faster is it? in the order of 0.5s?

@Citizenyolo
Copy link

I may be completely wrong, I'm no expert, just brainstorming :) . But in that scenario I would choose the Wahoo trainer in IndieVelo (not QZ). QZ as an app or "virtual trainer" connected to my iPad (running Indivelo app) could send +/- signal whenever I press the correct keys in Zwift Play. This would trigger Indivelo's built in virtual gear change which constantly listens to +/- input for that from a bluetooth keyboard.

@cagnulein
Copy link
Owner

QZ can't broadcast itself like a bluetooth keyboard, that's the issue. Indievelop app should have some APIs to do this in order to implement this. The only way to do what you are asking is using indievelo on PC and play a macro to use + and - minus button on the PC itself. Ipad and ios devices are out of the game.

But again I would like to understand where the delays comes in: i mean from my point of view, qz is a man on the middle, i accept that there is a delay because there is a one more device in, but i guess it's in the order of some hundreds millseconds, not more. If there is more, there is somethign else that we have to understand (unfortunately it's not easy on remote). For example do you see the gears change immediately on qz? If so we can say that the zwift play controller to QZ is fine, and we can focus on the trainer to qz communication only.

@Citizenyolo
Copy link

I think you are right. Gears now DO change almost immediately on QZ. I think the delay is about 1/5th of a second only.

I also did another test, which I should have done earlier. I compared the speed of watt change by changing gear on Indivelo's on screen touch enabled virtual gear buttons. If I shift up quickly 5 gears it also takes a few seconds for the full impact to arrive. Your solution now delivers about 99% the same experience. The only thing I can still finetune is the gear change, which I think will be between 0.3 and 0.5 to replicate the zwift gear ratio steps.

I would leave the buttons as is, users coming from Zwift would have the same experience.

Overall I think we can close this: Questo lavoro è perfetto.

Thank You!!

@cagnulein
Copy link
Owner

Amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants