cagnulein / qdomyos-zwift

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

[BUG]SS2K + Peloton Bike (Low Impact Rides) #2527

Open Dekto opened 3 weeks ago

Dekto commented 3 weeks ago

Describe the bug

With Peloton Low Impact Rides, the automatic resistance only controls once at the start of the workout and then no more.

To Reproduce

Do a Low Impact Ride on the Peloton Bike with SmartSpin2k and the qdomyos-zwift (iOS) app.

Expected behavior

The resistance should change automatically when the trainer indicates the new range.

Smartphone:

Device: iPhone SE 2022 OS: iOS 17.6.1 Version qdomyos-zwift 2.15.4 SmartSpin2k 24.8.16

Append a debug log

debug-MoAug19_15_18_25_2024.log

*Additional context

Peloton Workout runs directly on the Peloton Bike Tablet.

cagnulein commented 3 weeks ago

hi @Dekto i saw in these log these changes

IMG_5851

did you notice them?

Dekto commented 3 weeks ago

No, unfortunately not!

The SmartSpin2k doesn't move...

cagnulein commented 3 weeks ago

ok so it's a problem there. do you have also the ss2k logs? @doudar can you help here?

doudar commented 3 weeks ago

@Dekto , what firmware version are you running?

doudar commented 3 weeks ago

I just looked at the QZ log. Please try starting with the resistance at 5 or higher, and let me know if that helps.

Dekto commented 3 weeks ago

@doudar SmartSpin2k Firmware 24.8.16

I started with the resistance at about 40.

Dekto commented 3 weeks ago

I'll be back home by the middle of next week. Then I can upload the SS2k logs...

Dekto commented 2 weeks ago

@doudar @cagnulein

Hello everyone,

I'm back from vacation and tested it again today.

Right after I started the low impact ride, the SS2k wanted to turn to resistance 100 or higher. Luckily I was able to unplug it in time so that it wasn't damaged!

Here are the Qdomyos logs:

debug-MiAug28_12_38_25_2024.log

Afterwards I drove a Powerzone course. The automatic resistance control worked perfectly.

Can you please fix the problem with the normal rides as I would really like to use them too.

Thank you!

cagnulein commented 2 weeks ago

welcome back @Dekto in this log i can see only a resistance requests from qz

Mi. Aug. 28 12:40:53 2024 1724841653685 Debug: /Users/cagnulein/qdomyos-zwift/src/bluetooth.cpp void bluetooth::debug(const QString &) " >> 04 1e // forceResistance 30"

so this was happening at the very beginning? it seems that the SS2K wasn't at the home position. What do you think @doudar ?

Dekto commented 2 weeks ago

@cagnulein

Yes, right at the beginning the resistance turned towards 100 very quickly.

What do you mean by home position?

How can I set it?

cagnulein commented 2 weeks ago

@Dekto for sure @doudar is the best man to say this, but i guess you have to put the ss2k to the resistance 1 BEFORE opening QZ. because when you open qz, the SS2K took the actual position as the resistance 1 position. am i right @doudar ?

doudar commented 2 weeks ago

I believe I have QZ on my Peloton working correctly now (had to activate a special Bluetooth developer mode). I'll see if I can duplicate this later today.

cagnulein commented 2 weeks ago

had to activate a special Bluetooth developer mode

@doudar what do you mean?

doudar commented 2 weeks ago

Also, it shouldn't damage the SS2k. The noise you hear if it hits the end stop is just the motor magnetically slipping. One of the reasons we chose a stepper motor in the design - it's like having a magnetic clutch built right into the motor.

doudar commented 2 weeks ago

had to activate a special Bluetooth developer mode

@doudar what do you mean?

"Enable Gabeldorsche"

cagnulein commented 2 weeks ago

never heard it before! https://www.reddit.com/r/Android/comments/wwo4ld/android_is_using_a_new_bluetooth_stack_for/

doudar commented 2 weeks ago

Neither had I. Neither QZ nor the SS2k config app run correctly on my Peloton tablet without it enabled. Without it enabled, we can see the devices correctly, but cannot pair with them.

On Wed, Aug 28, 2024 at 7:05 AM Roberto Viola @.***> wrote:

never heard it before! https://www.reddit.com/r/Android/comments/wwo4ld/android_is_using_a_new_bluetooth_stack_for/

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

Dekto commented 6 days ago

@cagnulein @doudar

Hello everyone,

unfortunately there was no reply here. That's why I would like to ask again. I would love to do the normal courses too, which is why I bought the Qdomyos app and the SmartSpin2k.

Is there further data I can provide to resolve the issue?

I just tried a low impact ride again. Set the Peloton resistance to zero and start the workout. The Qdomyos app displayed the correct Target R. But the SS2k went from zero to 100 again. I noticed that in the Qdomyos app the Peloton R.% stays at 0. Is the resistance from the Peloton Bike perhaps recognized in the Qdomyos app?

I would be very happy if you would help me...

cagnulein commented 6 days ago

@doudar were you able to do some test on your side?

doudar commented 6 days ago

Unfortunately not, because I don't have QZ on my iPhone and I can't get the QZ Android version to work properly on the Peloton tablet (the only android device I have available to me while I'm traveling this month).

Dekto commented 6 days ago

@cagnulein

Could you perhaps provide @doudar with a free version for iOS?

cagnulein commented 6 days ago

Unfortunately not, because I don't have QZ on my iPhone and I can't get the QZ Android version to work properly on the Peloton tablet (the only android device I have available to me while I'm traveling this month).

sure just sent! i thought you already had! let me know if you get it!

cagnulein commented 1 day ago

i got the issue now that i update the firmware: @doudar the SS2K doesn't return a inclination or a resistance value in the 2AD2 when i change the inclination or resistance from qz. Are you aware of this? This is the reason of the behaviour that @Dekto is seeing.

I did a small modification, removing the need to read the resistance from the SS2k and now it's working, but i guess it will be nice to have a feedback from the SS2K. What do you think?

doudar commented 1 day ago

Okay - I can look into this. It's probably a very easy fix, I just need to see if there was a reason I removed it.

cagnulein commented 1 day ago

Sounds good, thanks!

Il giorno ven 13 set 2024 alle 16:03 Anthony Doud @.***> ha scritto:

Okay - I can look into this. It's probably a very easy fix, I just need to see if there was a reason I removed it.

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

doudar commented 1 day ago

@cagnulein , I took a look at the code, and as long as a Peloton bike is connected, it should be outputting the resistance on 2AD2 bytes 6&7. If a bike that doesn't output resistance is connected, currently it outputs 0's. I should change that so that the 2AD2 hasResistance flag isn't set, or optionally calculate a resistance number from 1-100 by using the calculated end stops. I'll look into implementing those.

cagnulein commented 1 day ago

Hah wait! I didn't know you treat differently the bike. I observed this behavior with my dumb bike! So it behaviors differently?

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

Il giorno ven 13 set 2024 alle 19:48 Anthony Doud @.***> ha scritto:

@cagnulein https://github.com/cagnulein , I took a look at the code, and as long as a Peloton bike is connected, it should be outputting the resistance on 2AD2 bytes 6&7. If a bike that doesn't output resistance is connected, currently it outputs 0's. I should change that so that the 2AD2 hasResistance flag isn't set, or optionally calculate a resistance number from 1-100 by using the calculated end stops. I'll look into implementing those.

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