cagnulein / qdomyos-zwift

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

[BUG] Power Profile for Sportstech ESX600 #2039

Closed hecuba closed 9 months ago

hecuba commented 9 months ago

Describe the bug My Sportstech ESX600 is recognized by QZ and transmits data to Zwift, but the resistance value is set to double the value of the target resistance.

To Reproduce Steps to reproduce the behavior:

  1. Enable ERG mode in QZ
  2. Pair with Zwift
  3. Start Workout in Zwift

Expected behavior The resistance should be set to adequate values.

Smartphone:

Additional context I added a wattage table and debug log to this issue.

wattage.sportstech.esx600.xlsx debug-DiJan23_22_59_35_2024.log

ChatGPT converted the table to a C function:

// Function to calculate power based on resistance and cadence
double calculatePower(double resistance, double cadence) {
    // Coefficients from the polynomial regression
    double intercept = 14.4968;
    double b1 = -4.1878;
    double b2 = -0.5051;
    double b3 = 0.00387;
    double b4 = 0.2392;
    double b5 = 0.01108;

    // Calculate power using the polynomial equation
    double power = intercept +
                   (b1 * resistance) +
                   (b2 * cadence) +
                   (b3 * resistance * resistance) +
                   (b4 * resistance * cadence) +
                   (b5 * cadence * cadence);

    return power;
}
cagnulein commented 9 months ago

done! i will send you a new ios version asap

hecuba commented 9 months ago

That was fast! Will try it when it is available and report back.

cagnulein commented 9 months ago

version sent! let me know

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

Il giorno mer 24 gen 2024 alle ore 09:22 hecuba @.***> ha scritto:

That was fast! Will try it when it is available and report back.

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

hecuba commented 9 months ago

Just tried the Zwift ERG mode with the new power profile and it just works. Will extend the testing in the next days and weeks, but for now this issue is resolved!

I already mentioned it in my mail but i still can't have the heart rate signal from my apple watch while being connected to this bike. When i turn on 'Fake Device' mode in experimental features, i see the heart rate in QZ from my watch. When i'm connected to the bike, the built in heart rate monitor takes precedence over the watch. I can put my hands on the measurement plates and have the hr signal. 'Disable HRM from Machinery' is turned on.

Do you have an idea how to solve this?

cagnulein commented 9 months ago

Fixed! I'm sending you another one today! Thanks for the feedback

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

Il giorno mer 24 gen 2024 alle ore 22:35 hecuba @.***> ha scritto:

Just tried the Zwift ERG mode with the new power profile and it just works. Will extend the testing in the next days and weeks, but for now this issue is resolved!

I already mentioned it in my mail but i still can't have the heart rate signal from my apple watch while being connected to this bike. When i turn on 'Fake Device' mode in experimental features, i see the heart rate in QZ from my watch. When i'm connected to the bike, the built in heart rate monitor takes precedence over the watch. I can put my hands on the measurement plates and have the hr signal. 'Disable HRM from Machinery' is turned on.

Do you have an idea how to solve this?

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

hecuba commented 9 months ago

Thank you! Looking forward to try it out.

It seems like there are not all options available in every profile. Is there a 'complete' profile which can be compared to as a template?

cagnulein commented 9 months ago

what do you mean? in the code? you can use the echelon bike as a template

cagnulein commented 9 months ago

this was just a copy and paste error :) this bike is not used from QZ users :) i guess you are the 2nd or 3rd person that uses this :)

hecuba commented 9 months ago

Ah, gotcha. I had the idea to cross-check the behaviour in another profile if i encounter another issue, so you don't have to do all the work. I figured that it isn't used much. It is kind of low-spec, but it is what i have available right now. :)

hecuba commented 9 months ago

Friendly reminder :) Can you send me the updated version on TestFlight?

cagnulein commented 9 months ago

i didn't find the time to build it. qz requests are going crazy during winter! i will try to do in the next days

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

Il giorno ven 26 gen 2024 alle 19:23 hecuba @.***> ha scritto:

Friendly reminder :) Can you send me the updated version on TestFlight?

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

hecuba commented 9 months ago

Okay, no problem. You were so fast the last time, I thought you had forgotten. :) Take your time. You‘re doing great work here!

cagnulein commented 9 months ago

sent!

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

Il giorno ven 26 gen 2024 alle ore 20:46 hecuba @.***> ha scritto:

Okay, no problem. You were so fast the last time, I thought you had forgotten. :) Take your time. You‘re doing great work here!

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

hecuba commented 9 months ago

Tried it and HR sync now works! Thanks for your time and effort. All issues are now resolved. :)

cagnulein commented 9 months ago

amazing! have a great weekend!

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

Il giorno sab 27 gen 2024 alle ore 08:07 hecuba @.***> ha scritto:

Closed #2039 https://github.com/cagnulein/qdomyos-zwift/issues/2039 as completed.

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