cagnulein / qdomyos-zwift

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

VZFit and QZ: Incorrect kilometers #1382

Closed Jazzy0806 closed 1 year ago

Jazzy0806 commented 1 year ago

Describe the bug When I start a session on the Apple Watch, I'm shown fewer miles via QZ than in VZfit.

To Reproduce Steps to reproduce the behavior:

  1. Open QZ app on iPhone
  2. Start session on Apple Watch
  3. Open VZfit and connect with QZ via iPhone
  4. End session

Expected behavior The kilometers shown should be the same.

Smartphone (please complete the following information):

Append a debug log

Follow this guide https://github.com/cagnulein/qdomyos-zwift/wiki/How-do-i-get-the-debug-log-in-case-something-doesn't-work%3F

Additional context The sessions are doubled and show up twice in Strava/Health and on the Apple Watch

debug-Mi__März_29_16_44_08_2023.log

Thanks for your help!

cagnulein commented 1 year ago

@emalafeew Hi, how are you calculating speed and so distance in Vzfit? Don't you use the speed sent from QZ? @Jazzy0806 can you also attach a log where you enable the speed based on power setting? I guess this is another issue that you had, right?

Jazzy0806 commented 1 year ago

@cagnulein Will load the debug of using "Speed calculates on power" later. I'm at the gym right now 😂 But nothing's going to happen there. The bike won't move in VZfit with this feature enabled.

cagnulein commented 1 year ago

@Jazzy0806

But nothing's going to happen there. The bike won't move in VZfit with this feature enabled.

that's the reason why I would like to check the debug log, it should move :) so I guess you have some settings wrong. Also speed calculates over power should be always enabled in order to have a realistic speed to report to vzfit. I added this settings expecially for vzfit 2 years ago :)

Jazzy0806 commented 1 year ago

Here's the log. After pedaling 30 seconds it all of a sudden moved. Seems to work now. Will keep a eye on it tomorrow, it's bedtime here. debug-Mi__März_29_19_40_49_2023.log

Jazzy0806 commented 1 year ago

The kilometers don't match even with "Speed calulates on Power" enabled. QZ says 0,79 kilometers, VZFit says 1,11 kilometers. Miles output is disabled in the settings.

cagnulein commented 1 year ago

@Jazzy0806 we need to know from @emalafeew how they calculate them. For what I knew, VZFit used the speed from QZ 2 years ago. I don't know how they calcualte now. Maybe they changed their algorithm and so it's impossible to have the same value. But if it's so, it seems to me a VZfit bug rather than something that I can do on QZ :)

Jazzy0806 commented 1 year ago

Today I tried again. Opened QZ on my iPhone, started it on Apple Watch and connected to VZfit. Bike wouldn't move at all. Not a single meter, just pedaling in place. Same setting, nothing changed.

debug-Do__März_30_16_58_31_2023.log

cagnulein commented 1 year ago

@Jazzy0806 I guess I understood this. Set disable to the cadence sensor setting in QZ under accesories (since your bike provide already the cadence). Let me know if it's better (at least with the speed thing).

For the distance thing we have to wait Vzfit (i asked him to check this ticket on messenger, if you can do the same, it's better, thanks)

Jazzy0806 commented 1 year ago

@Jazzy0806 I guess I understood this. Set disable to the cadence sensor setting in QZ under accesories (since your bike provide already the cadence). Let me know if it's better (at least with the speed thing).

For the distance thing we have to wait Vzfit (i asked him to check this ticket on messenger, if you can do the same, it's better, thanks)

Ah, you're right! The cadence sensor is still on the pedal. Oops! Will try it right now.

Jazzy0806 commented 1 year ago

@Jazzy0806 I guess I understood this. Set disable to the cadence sensor setting in QZ under accesories (since your bike provide already the cadence). Let me know if it's better (at least with the speed thing).

For the distance thing we have to wait Vzfit (i asked him to check this ticket on messenger, if you can do the same, it's better, thanks)

No, doesn't work. I even put the battery out of the cadence sensor. No speed in the tile. debug-Do__März_30_16_58_31_2023 2.log

cagnulein commented 1 year ago

@Jazzy0806 in this log I still see the cadence sensor setting set to the bryton cadence sensor. Please set it to disabled and press ok and restart QZ. This is the right way to do this test. Thanks

Jazzy0806 commented 1 year ago

@Jazzy0806 in this log I still see the cadence sensor setting set to the bryton cadence sensor. Please set it to disabled and press ok and restart QZ. This is the right way to do this test. Thanks

That's exactly what I did. I set it to disabled, closed the app, restarted it. The battery is out of the sensor.

Jazzy0806 commented 1 year ago

I'll try again later.

cagnulein commented 1 year ago

@Jazzy0806 maybe you send me the wrong log so, because in the log the sensor is there

Do. März 30 16:58:31 2023 1680188311535 Debug: /Users/cagnulein/qdomyos-zwift/src/main.cpp int main(int, char **) "cadence_sensor_name" QVariant(QString, "Bryton Cadence")

it's the timestamp right?

Jazzy0806 commented 1 year ago

@Jazzy0806 maybe you send me the wrong log so, because in the log the sensor is there

Do. März 30 16:58:31 2023 1680188311535 Debug: /Users/cagnulein/qdomyos-zwift/src/main.cpp int main(int, char **) "cadence_sensor_name" QVariant(QString, "Bryton Cadence")

it's the timestamp right?

I'm not sure. I think so. Will give it another try.

Jazzy0806 commented 1 year ago

Tried it again, and again it didn't move. Cadence sensor is disabled, I double checked this.

debug-Do__März_30_17_43_06_2023.log

Jazzy0806 commented 1 year ago

Maybe I should delete the app and load new?

Jazzy0806 commented 1 year ago

Deleting the app and reload it was the solution. Now everything works fine (except from the distance)

cagnulein commented 1 year ago

ok i will check the log anyway so we will know which setting was wrong thanks

Il giorno gio 30 mar 2023 alle 18:41 Jazzy0806 @.***> ha scritto:

Deleting the app and reload it was the solution. Now everything works fine (except from the distance)

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

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

cagnulein commented 1 year ago

there was for sure a bike weight of 80kg that was wrong that could be the issue. because it was like you were trying to move your weight + 80kg.

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

Il giorno gio 30 mar 2023 alle ore 18:41 cagnulein @.***> ha scritto:

ok i will check the log anyway so we will know which setting was wrong thanks

Il giorno gio 30 mar 2023 alle 18:41 Jazzy0806 @.***> ha scritto:

Deleting the app and reload it was the solution. Now everything works fine (except from the distance)

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

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

Jazzy0806 commented 1 year ago

Something's still not right. I can not enable "Speed calculates on Power" with my Renpho bike. It still won't move in VZfit. Attached are two files: one trying to get the bike moving with "Speed calculates on Power", one with this function disabled (there it moves). debug-FrApr14_11_38_13_2023.log

Jazzy0806 commented 1 year ago

The second log file is too big :(

cagnulein commented 1 year ago

The second log file is too big :(

zip it

Jazzy0806 commented 1 year ago

debug-SaApr15_13_35_29_2023.log.zip

cagnulein commented 1 year ago

i will check it asap

Jazzy0806 commented 1 year ago

IMG_6169

IMG_6170

I don't know why it was splitted, but it was 28 something kilometers on VZfit. QZ says 18,49. Something's not right here and I don't know what it is.

cagnulein commented 1 year ago

@Jazzy0806 i still didn't receive any feedback from vzfit, did you? we need them to cross the information. because it seems that they over calculate speed. maybe using the difficulty in the game?

Jazzy0806 commented 1 year ago

@Jazzy0806 i still didn't receive any feedback from vzfit, did you? we need them to cross the information. because it seems that they over calculate speed. maybe using the difficulty in the game?

This could be. I'm riding on difficulty 5. Didn't get a reaction so far.

cagnulein commented 1 year ago

try changing the speed, put the max difficulty and check if the delta is minor, if so, you should talk with them

let me know

Jazzy0806 commented 1 year ago

try changing the speed, put the max difficulty and check if the delta is minor, if so, you should talk with them

let me know

I'll try this and will let you know.

emalafeew commented 1 year ago

We use the speed and distance supplied by QZ if two conditions are true:

  1. The fitness device reports speed at the wheel (as determined by FTMS flags or reports as a hub speed sensor)
  2. The user has enabled "Authentic Mode"

Note that authentic mode is not enabled by default, because

a. VZfit also supports cadence & power sensors that do not directly report speed b. It's a game and was tuned to go a bit faster than reported c. Without resistance control we modify your virtual speed up and down hills

Hope that helps! -Eric

On Wed, Mar 29, 2023 at 11:23 AM Roberto Viola @.***> wrote:

@emalafeew https://github.com/emalafeew Hi, how are you calculating speed and so distance in Vzfit? Don't you use the speed sent from QZ? @Jazzy0806 https://github.com/Jazzy0806 can you also attach a log where you enable the speed based on power setting? I guess this is another issue that you had, right?

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

Jazzy0806 commented 1 year ago

Authentic mode made it! Unbelievable that I didn't try this 🙈

cagnulein commented 1 year ago

great!