cagnulein / qdomyos-zwift

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

Gear UI on Zwift #2391

Closed cagnulein closed 1 week ago

cagnulein commented 5 months ago

@doudar look what i found! https://github.com/cbj42/KickrBikeDisplay/blob/main/KickrBikeDisplay.ino

doudar commented 5 months ago

That's pretty neat! Are you going to implement the display on QZ?

cagnulein commented 5 months ago

nope, did you remember when you talk to me about the possibility to have zwift showing the virtual gear even from QZ or SS2k? This is the answer about how we can do it! there is the protocol of the bluetooth custom char used by wahoo and from zwift!

doudar commented 5 months ago

Okay - I skimmed over it, and I thought it looked like a gear indicator for the kicker bike.

Oh I understand. You're thinking about implementing this protocol in reverse of how they have it here and Zwift should in theory pick it up. Yes, that should work. I'll see about adding it to a SS2K branch I'm actively working on. Thanks!

cagnulein commented 5 months ago

yep exactly. It should be quite easy to do, but I guess I have to expose a wahoo bike instead of a FTMS one

doudar commented 5 months ago

I bet it should work in addition to the FTMS.

doudar commented 5 months ago

The could be filtering by vendor string though

cagnulein commented 5 months ago

I will try :)

doudar commented 5 months ago

adding this here for more information. I'm trying to track down information about what might be in the flags field

https://forums.zwift.com/t/wahoo-kickr-bike-external-gear-display/597907/21?page=6

doudar commented 5 months ago

...Annnd I think this is another dead end for the onscreen support. It looks like they're working on this project because Zwift doesn't support the OSD for the Kicker bike. Bizarre.

doudar commented 5 months ago

@cagnulein - Bingo! This should work!

https://github.com/OevreFlataeker/ftms_emu/blob/0763c52864b55356eedd54d7811a6b02d96f8fe5/ble_atom/ble_atom.h#L85

cagnulein commented 5 months ago

wow that's great!

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

Il giorno sab 15 giu 2024 alle ore 20:57 Anthony Doud < @.***> ha scritto:

@cagnulein https://github.com/cagnulein - Bingo! This should work!

https://github.com/OevreFlataeker/ftms_emu/blob/0763c52864b55356eedd54d7811a6b02d96f8fe5/ble_atom/ble_atom.h#L85

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

stale[bot] commented 4 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

cagnulein commented 3 months ago

@doudar returning back on this, do you know if the atom wattbike has virtual shifting support on zwift natively?

doudar commented 3 months ago

It was one of the first smart bikes that had non-mechanical shifting. The shifters just change the magnet position on the eddy current brakes.

It was also the first (of very few bikes) that Zwift developed an on-screen UI for displaying which gear the bike was in.

So, yes, I think that all qualifies as "virtual shifting"

cagnulein commented 3 months ago

amazing! thanks for the confirmation, I will give it a go ASAP

cagnulein commented 3 months ago

this will simplify a lot the setup of the zwift play and zwift ride on qz

cagnulein commented 3 months ago

perfect, i have also the nrfconnect of the bike https://github.com/cagnulein/qdomyos-zwift/issues/2405

doudar commented 3 months ago

Yes! Combined with this: https://github.com/OevreFlataeker/ftms_emu/blob/0763c52864b55356eedd54d7811a6b02d96f8fe5/ble_atom/ble_atom.h#L85

That should be everything needed!

cagnulein commented 3 months ago

i just finished the implementation, let's see if it works!

doudar commented 3 months ago

It appears that Zwift is still supporting this feature. There have been bug reports of it not working and then was fixed. There are a few threads on the forums: https://forums.zwift.com/t/gears-not-displaying-wattbike-atom-april-2024-ios/629331 https://forums.zwift.com/t/wattbike-atom-gear-shift-problem/70222/38 https://forums.zwift.com/t/no-gears-displayed-wattbike-1-34-solved/605333/112 image

cagnulein commented 3 months ago

i'm trying on ios but on ios i can't set the manufacturer data, so if it doesn't work I will try on android, i guess zwift is looking for this. Let's see!

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

Il giorno dom 18 ago 2024 alle ore 16:05 Anthony Doud < @.***> ha scritto:

It appears that Zwift is still supporting this feature. There have been bug reports of it not working and then was fixed. There are a few threads on the forums:

https://forums.zwift.com/t/gears-not-displaying-wattbike-atom-april-2024-ios/629331

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2391#issuecomment-2295275182, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWEE45SNL2ES424WTVLZSCSZRAVCNFSM6AAAAABJKFHEQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGI3TKMJYGI . You are receiving this because you modified the open/close state.Message ID: @.***>

cagnulein commented 3 months ago

image

I unlocked the watt bike kit simply changing to the wattbikeatom name my android with qz

I guess I'm near, I have to add the services now

doudar commented 3 months ago

Awesome!

doudar commented 3 months ago

I know the Zwift logging is fairly worthless, but it might be worthwhile to see what's in there when you connected.

cagnulein commented 3 months ago

Thanks for the tip!

I'm doing this with my daughter on my knee so I will try when I will be a little stable :D

Il giorno dom 18 ago 2024 alle 18:59 Anthony Doud @.***> ha scritto:

I know the Zwift logging is fairly worthless, but it might be worthwhile to see what's in there when you connected.

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2391#issuecomment-2295326156, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWBTGIVMBORLWQAZEHDZSDHHLAVCNFSM6AAAAABJKFHEQWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJVGMZDMMJVGY . You are receiving this because you modified the open/close state.Message ID: @.***>

cagnulein commented 3 months ago

it's working image

doudar commented 3 months ago

Awesome!

doudar commented 3 months ago

So is it just the device name and adding the characteristic according to the c++ header file I sent, or was there more to it?

cagnulein commented 3 months ago

exactly, just these

doudar commented 3 months ago

Kind of a bummer if we need the device name, it confuses users a bit, but I think overall, it's worthwhile. That will be a very nice feature you can add to any bike or trainer with QZ!!!

doudar commented 3 months ago

Also, it will give you a chance to see if any other apps support the gear indication!

cagnulein commented 3 months ago

Also, it will give you a chance to see if any other apps support the gear indication!

i guess it's the only one, they have some agreements with the manufacturer

cagnulein commented 3 months ago

i don't have the zwift click here with me in vacation but it will be interesting if with the click connected directly on zwift, zwift controls the watt bike and so the gears on qz. This will be amazing!

cagnulein commented 2 months ago

i'm attaching also an ios bluetooth log from a zwift session with zwift ride that changes gears on zwift directly gear_change.zip

cagnulein commented 2 months ago

@doudar check this! https://github.com/jvivenot/KickrShiftr

doudar commented 2 months ago

Haha! That's a pretty cool idea!

cagnulein commented 2 months ago

i thought it was the code of the gear, nevermind :)

cagnulein commented 2 months ago

ok i have a lead, i guess it's about this https://github.com/cagnulein/qdomyos-zwift/commit/fbbd40a0f8a7358069c716dc3a75300eb3099717 Now I have to stay with my daughter, i will finish the analyze tomorrow! Thanks

cagnulein commented 2 months ago

i'm attaching also an ios bluetooth log from a zwift session with zwift ride that changes gears on zwift directly gear_change.zip

new one with handler described too zwift-trace.zip

cagnulein commented 2 months ago

ok the wahoo kickr sends the gears level to zwift using the indication of the characteristic [UUID: 0000000419ca465186e5fa29dcdd09d1] on the service [Service UUID: 0000000119ca465186e5fa29dcdd09d1]

for example on this Value: 3c08880412060a0440dcb702

the gears is the dcb7

f3ac
c891
90fa
d8e2
9fcb
dcb7
98a4
d490
90fd
dcec
a8dc
f3cb
c0bb
b8ad
b09f
a891
a083
c0bb

these should be the codificated gears levels

zwift request the gear change to the wahoo sending 2 frames on the characteristic [UUID: 0000000319ca465186e5fa29dcdd09d1] of the service [Service UUID: 0000000119ca465186e5fa29dcdd09d1]

first frame Value: 042a0410c89103

where the c891 is the gear requested

and a fixed second frame

Value: 00088804

so my idea now is to add these 2 chars on qz and then zwift should handle everything

stale[bot] commented 2 months ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] commented 3 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.