cagnulein / qdomyos-zwift

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

Support for Pro-Form Cycle Trainer 300 ci #1892

Closed fitzd closed 4 months ago

fitzd commented 7 months ago

Is your feature request related to a problem? Please describe. Resistance control within app do not work on the bike. The data from the bike is being displayed on the app though.

Describe the solution you'd like I would like to control the resistance of the bike through the app.

Describe alternatives you've considered I tried to enable the different bike settings within the app for Proform one by one with no luck.

Additional context None

cagnulein commented 7 months ago

hi @fitzd please attach a debug log with the issue, thanks

fitzd commented 7 months ago

Here you go debug-Sun_Dec_17_10_52_36_2023.log

cagnulein commented 7 months ago

got it, did you try to enable the proform cycle trainer 400 setting in the proform bike settings (only this one enabled there) and restart qz? if it doesn't work, try all of them, one by one, (only one must be enabled at a time) and restart qz after each change. Let me know

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

Il giorno dom 17 dic 2023 alle ore 20:26 Fitzgerald Daiz < @.***> ha scritto:

Here you go debug-Sun_Dec_17_10_52_36_2023.log https://github.com/cagnulein/qdomyos-zwift/files/13697518/debug-Sun_Dec_17_10_52_36_2023.log

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

fitzd commented 7 months ago

Hi Roberto, yes I've tried one by one listed in the Proform bike section including the cycle trainer 400 setting, except for the last 3 (the ip ones and the adb one). When I tried enabling the first 4 on the list one by one, each time my bike would constantly disconnect and reconnect from the app, if that's relevant at all.

cagnulein commented 7 months ago

so this means that your bike has a different profile. you can collect it from the ifit app following this https://github.com/cagnulein/qdomyos-zwift/blob/master/docs/20_supported_devices_and_applications.md#android-device

let me know

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

Il giorno dom 17 dic 2023 alle 20:37 Fitzgerald Daiz < @.***> ha scritto:

Hi Roberto, yes I've tried one by one listed in the Proform bike section including the cycle trainer 400 setting, except for the last 3 (the ip ones and the adb one). When I tried enabling the first 4 on the list one by one, each time my bike would constantly disconnect and reconnect from the app, if that's relevant at all.

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

fitzd commented 7 months ago

Here you go. I adjusted resistance and fan speed while logging. BT_HCI_2023_1217_124211.cfa.zip

cagnulein commented 7 months ago

thanks, i will check in the next days!

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

Il giorno dom 17 dic 2023 alle 20:58 Fitzgerald Daiz < @.***> ha scritto:

Here you go. I adjusted resistance and fan speed while logging. BT_HCI_2023_1217_124211.cfa.zip https://github.com/cagnulein/qdomyos-zwift/files/13697590/BT_HCI_2023_1217_124211.cfa.zip

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

cagnulein commented 7 months ago

I checked the "NordicTrack GX 2.7" setting available in QZ and seems perfect for your bike, did you try it?

fitzd commented 7 months ago

I just tried it again and the resistance does not change if I try to increase or decrease through the app. The app's speed stays stuck at whatever speed the bike is set to. I also noticed when I adjust the fan setting through the app, the fan speed will change in the app but the bike's fan doesn't actually change.

cagnulein commented 7 months ago

i will check it again, it seemed the same the fan is not handled for proform bike in qz, but i can do for sure I will let you know

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

Il giorno lun 18 dic 2023 alle 14:16 FIT Dz @.***> ha scritto:

I just tried it again and the resistance does not change if I try to increase or decrease through the app. The app's speed stays stuck at whatever speed the bike is set to. I also noticed when I adjust the fan setting through the app, the fan speed will change in the app but the bike's fan doesn't actually change.

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

cagnulein commented 7 months ago

@fitzd ok i understood why it's not changing the resistance. i need a hci snoof where you set all the resistance from the first one to the last one and then back to the first one by the ifit app directly same thing for the fan

keep 2-3 seconds between change

Let me know!

fitzd commented 7 months ago

btsnoop_hci.log Set resistance from 1-16. No actual fan control in app. I thought you meant to control resistance from bike itself before my mistake.

cagnulein commented 7 months ago

ok perfect, i'm start working on this, thanks

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

Il giorno mar 19 dic 2023 alle ore 06:50 FIT Dz @.***> ha scritto:

btsnoop_hci.log https://github.com/cagnulein/qdomyos-zwift/files/13711661/btsnoop_hci.log Set resistance from 1-16. No actual fan control in app. I thought you meant to control resistance from bike itself before my mistake.

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

cagnulein commented 7 months ago

@fitzd done! https://github.com/cagnulein/qdomyos-zwift/actions/runs/7274620672 download from the bottom of this page

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. 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. Let me know if you have any questions

fitzd commented 7 months ago

Hi Roberto, I tried the new version you linked on two different devices but the bike's resistance does not change when tapping on the - or + sign in the resistance tile within QZ

cagnulein commented 7 months ago

could you please share a debug log so i can check what i did wrong?

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

Il giorno gio 21 dic 2023 alle 05:20 FIT Dz @.***> ha scritto:

Hi Roberto, I tried the new version you linked on two different devices but the bike's resistance does not change when tapping on the - or + sign in the resistance tile within QZ

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

cagnulein commented 7 months ago

did you enable the new setting for your bike?

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

Il giorno gio 21 dic 2023 alle 07:35 cagnulein @.***> ha scritto:

could you please share a debug log so i can check what i did wrong?

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

Il giorno gio 21 dic 2023 alle 05:20 FIT Dz @.***> ha scritto:

Hi Roberto, I tried the new version you linked on two different devices but the bike's resistance does not change when tapping on the - or + sign in the resistance tile within QZ

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

fitzd commented 7 months ago

(Old link removed) Hello here it is. Yes I enabled the new bike settings

Edit: New Upload: debug-Thu_Dec_21_06_26_18_2023.log

cagnulein commented 7 months ago

@fitzd i guess the file is corrupted. it's only a 0 byte file. Thanks!

fitzd commented 7 months ago

Sorry about that re-uploaded above

cagnulein commented 7 months ago

@fitzd can you check, if you change manually the reistance on the bike, if it changes correctly on the qz as well? and if it does, what if now you press the plus button on the resistance tile on qz? Let me know!

fitzd commented 7 months ago

Adjusting resistance on bike immediately shows on the tile. But when I tap on the tile after to increase or decrease it doesn't change the bike.

cagnulein commented 7 months ago

do you mind upload also a debug log in this scenario, I can't see any issue in the code explaining this. Thanks

fitzd commented 7 months ago

debug-Thu_Dec_21_09_38_58_2023.log

cagnulein commented 7 months ago

thanks I will check probably in a couple of days. Tomorrow I will have a travel day (more or less 700km alone along Italy :) )

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

Il giorno gio 21 dic 2023 alle ore 17:42 FIT Dz @.***> ha scritto:

debug-Thu_Dec_21_09_38_58_2023.log https://github.com/cagnulein/qdomyos-zwift/files/13744200/debug-Thu_Dec_21_09_38_58_2023.log

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

cagnulein commented 6 months ago

@fitzd i added more init frames in the code since i can't fine any other differences. It's building here https://github.com/cagnulein/qdomyos-zwift/actions/runs/7321444729

Let me know and merry christmas!

stale[bot] commented 6 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 6 months ago

@fitzd any news?

fitzd commented 5 months ago

@cagnulein Hi sorry was out of country but came back recently. I had a chance to try the new build today but still the same issue. Changes on bike show up on tile but pressing the - or + on the tile doesn't change the bike itself.

cagnulein commented 5 months ago

argh, could you please upload another debug log with this?

fitzd commented 5 months ago

debug-Sun_Jan_28_20_12_41_2024.log

Sorry for the late reply. Here's my latest debug where I tried to increase and decrease resistance after I waited for the correct bike stats to populate the tiles before I tapped the tiles.

cagnulein commented 5 months ago

argh the debug log is a 0 byte. can you upload it again? Thanks!

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

Il giorno lun 29 gen 2024 alle ore 04:19 FIT Dz @.***> ha scritto:

debug-Sun_Jan_28_20_12_41_2024.log https://github.com/cagnulein/qdomyos-zwift/files/14079258/debug-Sun_Jan_28_20_12_41_2024.log

Sorry for the late reply. Here's my latest debug where I tried to increase and decrease resistance after I waited for the correct bike stats to populate the tiles before I tapped the tiles.

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

fitzd commented 5 months ago

Sorry, not sure why it sometimes copy no data to the file when uploading debug-Sun_Jan_28_20_12_41_2024.log

cagnulein commented 5 months ago

@fitzd ok i tried to add more frames too

https://github.com/cagnulein/qdomyos-zwift/actions/runs/7723358007

can you try this?

also if it still doesn't work, can you try to change manually the resistance on the bike to a different resistance value, check that qz is getting it and then try to change again from the qz tile?

Let me know!

fitzd commented 5 months ago

Thanks for working with me thus far. Still no response from the bike after tapping the tile. When I first start up qz it looks like it finds I_EB right away, and then it takes about 10 seconds before QZ shows the actual resistance setting from the bike.

After getting the resistance setting, I adjust the bike resistance and see it reflected on QZ right away. Then I try to set the resistance via the +/- buttons on QZ but it doesn't change the resistance on the bike.

Here's my debug log from my latest attempt. debug-Fri_Feb_2_17_54_16_2024.log

cagnulein commented 5 months ago

Argh i will check it once again, it must be something!

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

Il giorno sab 3 feb 2024 alle 01:59 FIT Dz @.***> ha scritto:

Thanks for working with me thus far. Still no response from the bike after tapping the tile. When I first start up qz it looks like it finds I_EB right away, and then it takes about 10 seconds before QZ shows the actual resistance setting from the bike.

After getting the resistance setting, I adjust the bike resistance and see it reflected on QZ right away. Then I try to set the resistance via the +/- buttons on QZ but it doesn't change the resistance on the bike.

Here's my debug log from my latest attempt. debug-Fri_Feb_2_17_54_16_2024.log https://github.com/cagnulein/qdomyos-zwift/files/14147289/debug-Fri_Feb_2_17_54_16_2024.log

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

cagnulein commented 5 months ago

@fitzd never give up, let's try this https://github.com/cagnulein/qdomyos-zwift/actions/runs/7783558952 share always a debug log if it still doesn't work. i hope we are near

fitzd commented 5 months ago

debug-Mon_Feb_5_19_42_59_2024.log Sorry still the same issue. Here's the steps I performed during logging:

  1. Resistance was already set to 3 on the bike
  2. Start QZ after setting bike settings to proform 300 ci and restarting app
  3. About 10 seconds later the resistance tile shows 3, I increase the resistance on the bike 3 times, then decrease it 3 times. It shows the correct resistance on the app almost right after I change it on the bike.
  4. With the resistance back to 3 on the bike, I try to increase the resistance by tapping on the tile 3 times, then I try to decrease it 3 times. No change to the bike's actual resistance or reading on the tile.
cagnulein commented 5 months ago

ok thanks, i will check this again!

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

Il giorno mar 6 feb 2024 alle ore 03:52 FIT Dz @.***> ha scritto:

debug-Mon_Feb_5_19_42_59_2024.log https://github.com/cagnulein/qdomyos-zwift/files/14174101/debug-Mon_Feb_5_19_42_59_2024.log Sorry still the same issue. Here's the steps I performed during logging:

  1. Resistance was already set to 3 on the bike
  2. Start QZ after setting bike settings to proform 300 ci and restarting app
  3. About 10 seconds later the resistance tile shows 3, I increase the resistance on the bike 3 times, then decrease it 3 times. It shows the correct resistance on the app almost right after I change it on the bike.
  4. With the resistance back to 3 on the bike, I try to increase the resistance by tapping on the tile 3 times, then I try to decrease it 3 times. No change to the bike's actual resistance or reading on the tile.

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

cagnulein commented 5 months ago

@fitzd looking deeply i found 2 inverted bytes in the init phase. maybe that's the issue https://github.com/cagnulein/qdomyos-zwift/actions/runs/7828462423

finger crossed!

fitzd commented 5 months ago

It worked!!! Those inverted bytes were the issue. I can successfully change the resistance on the bike using the app's tiles. Thank you!

cagnulein commented 5 months ago

finally! amazing! i will push this update into the play store version soon!

fitzd commented 5 months ago

Thank you! Can't wait to update to the latest version

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.

cagnulein commented 4 months ago

@fitzd any news?

fitzd commented 4 months ago

Hi @cagnulein, I downloaded both the beta and the regular version from google playstore but I don't see proform 300 as an option in the bike settings yet.

cagnulein commented 4 months ago

it's the Cycle Trainer 300 CI which version do you see on the store? it should see 2.16.46 Let me know

fitzd commented 4 months ago

It works now, sorry for the confusion! I uninstalled and re-installed and cleared app storage data as well. I may have still been on the non-beta earlier. I can confirm that I'm on beta version 2.16.46.

cagnulein commented 4 months ago

Glad to hear it! Roberto Viola Software engineer and open source enthusiast http://robertoviola.cloud

Il giorno mar 5 mar 2024 alle ore 17:40 FIT Dz @.***> ha scritto:

It works now, sorry for the confusion! I uninstalled and re-installed and cleared app storage data as well. I may have still been on the non-beta earlier. I can confirm that I'm on beta version 2.16.46.

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