cagnulein / qdomyos-zwift

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

Matching QZ Speed to Zwift Speed using Zwift Workout files (.zwo) #1209

Closed victorypoint closed 1 year ago

victorypoint commented 1 year ago

I'm testing a Zwift Run workout file loaded and started in Zwift and QZ at the same time. The idea is to have QZ control TM speed while the workout runs in Zwift.

I've loaded this custom Zwift workout into both Zwift (Windows 11) and QZ (Android) - https://whatsonzwift.com/workouts/ai-endurance/run-anaerobic-run

First workout entry in file is a ramp: Warmup Duration="620" PowerLow="0.65" PowerHigh="0.8" pace="1" /

Expected initial workout speed based on 5K pace (pace 1) of 21:34 = 13.91 kph x 0.65 = 9.04 kph (rounded to 9.0 kph)

Zwift displays initial workout speed as 9.0 kph and then progresses to 9.1, 9,2, 9.3, etc.. QZ (when configured with exact paces as Zwift) displays initial workout speed as 8.7 kph and then progresses to 9.2, 9.3, etc

QZ initial speed appears to be incorrect (8.7kph) and the ramp speeds appear to be 0.1 kph ahead of Zwift

Attached is QZ log of a test session where the TM starts at 2.0 kph, then the Zwift workout file is loaded and started. Treadmill/QZ speed starts at 8.7, 9.2 ... 9.5 then manually stopped

debug-Tue_Jan_24_15_47_34_2023.log

cagnulein commented 1 year ago

I explained this yesterday but probably I wasn't clear.

yes because qz app sends first 9.0451 then after 2 seconds 9.05183
with the rounding the first is 9.0 and the second is 9.1

so it starts from the 9.04 maybe due to the miles to km conversion. Let me check again the debug log

cagnulein commented 1 year ago

for reference

Thu Jan 26 11:50:14 2023 1674748214814 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) "Tag is" Warmup
Thu Jan 26 11:50:14 2023 1674748214815 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.04173 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214816 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.0451 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214817 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.04846 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214818 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.05183 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214819 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.05519 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214820 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.05856 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214821 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.06192 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214822 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.06529 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
Thu Jan 26 11:50:14 2023 1674748214822 Debug: ../src/zwiftworkout.cpp static void zwiftworkout::convertTag(double, const QString &, const QString &, QList<trainrow> &, const char *, ...) TrainRow "duration = 00:00:01 distance = -1 speed = 9.06865 lower_speed = -1 average_speed = -1 upper_speed = -1 fanspeed = -1 inclination = -200 lower_inclination = -200 average_inclination = -200 upper_inclination = -200 resistance = -1 lower_resistance = -1 average_resistance = -1 upper_resistance = -1 requested_peloton_resistance = -1 lower_requested_peloton_resistance = -1 average_requested_peloton_resistance = -1 upper_requested_peloton_resistance = -1 cadence = -1 lower_cadence = -1 average_cadence = -1 upper_cadence = -1 forcespeed = 1 loopTimeHR = 10 zoneHR = -1 maxSpeed = -1 power = -1 mets = -1 latitude = nan longitude = nan altitude = nan azimuth = nan"
cagnulein commented 1 year ago

so as you said

Expected initial workout speed based on 5K pace (pace 1) of 21:34 = 13.91 kph x 0.65 = 9.04 kph (rounded to 9.0 kph)

QZ is starting from 9.04 without rounding. And so that's why after 2 seconds (always without rounding) you're seeing 9.1, because qz sends 9.056 and the treadmill translates to 9.1 :)

victorypoint commented 1 year ago

Yes, I totally understand this. What I'm confused about is why the 9.1 is sent a few seconds after 9.0 instead of after 30 seconds which is what a linear ramp equation would expect.

cagnulein commented 1 year ago

yes you are right, i have to check again the debug log tomorrow

victorypoint commented 1 year ago

@cagnulein , I tested the entire .zwo file and captured logs for - https://whatsonzwift.com/workouts/ai-endurance/run-anaerobic-run. Both Zwift and QZ hit all the expected timings for each line in the file (warmup, steadystate, cooldown) to almost the exact second. Disregard the steadystate 20 vs 40 second duration problem I reported earlier - it worked fine this time.

Regarding the slight speed differences in warmup and cooldown ramps, I have a theory.

In Zwift, it evenly divides the ramp duration into even-spaced speed changes - 0.1 kph every 28.2 seconds. So even the last speed (11.1 kph) gets about 28.2 seconds. That means the ramp duration (620 seconds) gets divided into 22 = 28.2 seconds.

In QZ, the warmup ramp almost instantly starts at 9.1 kph and just changes to 11.1 kph at the end of 620 seconds. There is little to no time to run at the initial 9.0 or final speed of 11.1 kph. Similarly, the cooldown ramp starts at 11.1 kph but just changes to 9.0 kph at the end of 600 seconds. There is little to no time to run at the final speed of 9.0 kph. So perhaps QZ is subdividing the ramp duration incorrectly, leaving really no time to run the start and end speeds?

Let me know what you think.

logs.zip

    <Warmup Duration="620" PowerLow="0.65" PowerHigh="0.8" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <SteadyState Duration="60" Power="0.65" pace="1" />
    <SteadyState Duration="20" Power="1.15" pace="1" />
    <Cooldown Duration="600" PowerLow="0.8" PowerHigh="0.65" pace="1" />
cagnulein commented 1 year ago

@victorypoint i completely rewrite the ramp code for running, please download the new qz version from here https://github.com/cagnulein/qdomyos-zwift/actions/runs/4062887620

No need to change any settings on your side

Let me know

victorypoint commented 1 year ago

@victorypoint i completely rewrite the ramp code for running, please download the new qz version from here https://github.com/cagnulein/qdomyos-zwift/actions/runs/4062887620

No need to change any settings on your side

Let me know

Ok, will do tonight. Only Windows and Linux builds that I see? Is there one for Android?

cagnulein commented 1 year ago

in the play store. which version do you see?

victorypoint commented 1 year ago

in the play store. which version do you see?

QZ v2.12.56 is currently in the Play store. Is that the correct one to test?

cagnulein commented 1 year ago

nope 2.12.57

cagnulein commented 1 year ago

try now, i pushed to the internal tester too

victorypoint commented 1 year ago

Ok, I received Android 2.12.57 and just finished testing with the same .zwo file. The initial warmup ramp is very close to the Zwift interpretation. Nice work! Unfortunately the intervals got scrambled when processing the steadystate lines, and the final cooldown ramp was not reached. Here's a summary of 2 separate tests and the included logs.

logcat-Wed_Feb_1_19_44_30_2023 debug-Wed_Feb_1_19_44_30_2023

At this point, I thought QZ was getting interrupted by notifications and missed sending swipes because I didn't have QZ Android Notification turned on. The next test is with QZ notification on.

logcat-Wed_Feb_1_20_17_45_2023 debug-Wed_Feb_1_20_17_45_2023

logs2.zip

cagnulein commented 1 year ago

let's comment the first one

these are the changing from QZ

Wed Feb 1 19:44:42 2023 1675295082225 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9 true 1 0
Wed Feb 1 19:45:09 2023 1675295109228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.1 true 1 0
Wed Feb 1 19:45:37 2023 1675295137227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.2 true 1 0
Wed Feb 1 19:46:05 2023 1675295165226 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.3 true 1 0
Wed Feb 1 19:46:33 2023 1675295193239 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.4 true 1 0
Wed Feb 1 19:47:02 2023 1675295222227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.5 true 1 0
Wed Feb 1 19:47:30 2023 1675295250228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.6 true 1 0
Wed Feb 1 19:47:58 2023 1675295278226 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.7 true 1 0
Wed Feb 1 19:48:26 2023 1675295306228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.8 true 1 0
Wed Feb 1 19:48:55 2023 1675295335228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.9 true 1 0
Wed Feb 1 19:49:23 2023 1675295363227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10 true 1 0
Wed Feb 1 19:49:51 2023 1675295391227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.1 true 1 0
Wed Feb 1 19:50:19 2023 1675295419227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.2 true 1 0
Wed Feb 1 19:50:48 2023 1675295448229 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.3 true 1 0
Wed Feb 1 19:51:16 2023 1675295476228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.4 true 1 0
Wed Feb 1 19:51:44 2023 1675295504225 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.5 true 1 0
Wed Feb 1 19:52:12 2023 1675295532226 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.6 true 1 0
Wed Feb 1 19:52:41 2023 1675295561227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.7 true 1 0
Wed Feb 1 19:53:09 2023 1675295589228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.8 true 1 0
Wed Feb 1 19:53:37 2023 1675295617225 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.9 true 1 0
Wed Feb 1 19:54:05 2023 1675295645227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11 true 1 0
Wed Feb 1 19:54:34 2023 1675295674229 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11.1 true 1 0
Wed Feb 1 19:55:02 2023 1675295702229 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 19:55:22 2023 1675295722227 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 19:56:22 2023 1675295782228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 19:56:42 2023 1675295802228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 19:57:42 2023 1675295862225 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 19:58:02 2023 1675295882228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 19:59:02 2023 1675295942228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 19:59:22 2023 1675295962228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 20:00:22 2023 1675296022226 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 20:00:42 2023 1675296042228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 20:01:42 2023 1675296102228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 20:02:02 2023 1675296122228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 20:03:02 2023 1675296182226 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Wed Feb 1 20:03:22 2023 1675296202228 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Wed Feb 1 20:04:22 2023 1675296262226 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0

so for the QZ point of view everything is perfect, do you agree?

Let's see the companion log instead

02-01 19:44:41.240  1389  7907 I QZ:UDPListenerService: requestSpeed: 9.0 3.0
02-01 19:45:08.267  1389  7907 I QZ:UDPListenerService: requestSpeed: 9.1 9.0
02-01 19:45:36.226  1389  9889 I QZ:UDPListenerService: requestSpeed: 9.2 9.1
02-01 19:46:04.482  1389 10679 I QZ:UDPListenerService: requestSpeed: 9.3 9.2
02-01 19:46:32.126  1389 12312 I QZ:UDPListenerService: requestSpeed: 9.4 9.3
02-01 19:47:01.630  1389 13539 I QZ:UDPListenerService: requestSpeed: 9.5 9.4
02-01 19:47:29.277  1389 14367 I QZ:UDPListenerService: requestSpeed: 9.6 9.5
02-01 19:47:57.229  1389 14367 I QZ:UDPListenerService: requestSpeed: 9.7 9.6
02-01 19:48:25.184  1389 14367 I QZ:UDPListenerService: requestSpeed: 9.8 9.7
02-01 19:48:54.367  1389 17477 I QZ:UDPListenerService: requestSpeed: 9.9 9.8
02-01 19:49:22.631  1389 19007 I QZ:UDPListenerService: requestSpeed: 10.0 9.9
02-01 19:49:50.583  1389 19795 I QZ:UDPListenerService: requestSpeed: 10.1 10.0
02-01 19:50:18.237  1389 21302 I QZ:UDPListenerService: requestSpeed: 10.2 10.1
02-01 19:50:47.128  1389 21678 I QZ:UDPListenerService: requestSpeed: 10.3 10.2
02-01 19:51:15.379  1389 21678 I QZ:UDPListenerService: requestSpeed: 10.4 10.3
02-01 19:51:43.328  1389 23966 I QZ:UDPListenerService: requestSpeed: 10.5 10.4
02-01 19:52:11.292  1389 25475 I QZ:UDPListenerService: requestSpeed: 10.6 10.5
02-01 19:52:40.159  1389 26254 I QZ:UDPListenerService: requestSpeed: 10.7 10.6
02-01 19:53:08.120  1389 26254 I QZ:UDPListenerService: requestSpeed: 10.8 10.7
02-01 19:53:36.392  1389 26254 I QZ:UDPListenerService: requestSpeed: 10.9 10.8
02-01 19:54:04.332  1389 26254 I QZ:UDPListenerService: requestSpeed: 11.0 10.9
02-01 19:55:21.480  1389 32688 I QZ:UDPListenerService: requestSpeed: 9.0 11.0
02-01 19:56:21.352  1389  3357 I QZ:UDPListenerService: requestSpeed: 16.0 9.0
02-01 19:56:41.321  1389  4140 I QZ:UDPListenerService: requestSpeed: 9.0 16.0
02-01 19:57:41.214  1389  5289 I QZ:UDPListenerService: requestSpeed: 16.0 9.0
02-01 19:58:01.190  1389  5289 I QZ:UDPListenerService: requestSpeed: 9.0 16.0
02-01 20:00:21.273  1389 12230 I QZ:UDPListenerService: requestSpeed: 16.0 9.0
02-01 20:03:01.327  1389 18558 I QZ:UDPListenerService: requestSpeed: 16.0 16.0
02-01 20:03:21.291  1389 19747 I QZ:UDPListenerService: requestSpeed: 9.0 16.0
02-01 20:04:21.197  1389 21293 I QZ:UDPListenerService: requestSpeed: 16.0 9.0

it seems the main issue is QZCompanion that not always is receiving the request speed

cagnulein commented 1 year ago

yes indeed, that's the issue

02-01 19:54:28.005  1389 26254 I QZ:UDPListenerService: no longer listening for UDP broadcasts cause of error bind failed: EADDRINUSE (Address already in use)
02-01 19:54:35.621  1389  1389 I QZ:UDPListenerService: Service started
02-01 19:54:35.626  1389 31155 I QZ:UDPListenerService: Waiting for UDP broadcast
cagnulein commented 1 year ago

if you agree @victorypoint i can try to comment https://github.com/cagnulein/QZCompanionNordictrackTreadmill/blob/26db2e8344b8f01d0f512bfdb9c2080345a45ef4/app/src/main/java/org/cagnulein/qzcompanionnordictracktreadmill/UDPListenerService.java#L268 so the socket will stay open and it doesn't require to open each time.

What do you think?

cagnulein commented 1 year ago

if you agree @victorypoint i can try to comment https://github.com/cagnulein/QZCompanionNordictrackTreadmill/blob/26db2e8344b8f01d0f512bfdb9c2080345a45ef4/app/src/main/java/org/cagnulein/qzcompanionnordictracktreadmill/UDPListenerService.java#L268 so the socket will stay open and it doesn't require to open each time.

What do you think?

victorypoint commented 1 year ago

if you agree @victorypoint i can try to comment https://github.com/cagnulein/QZCompanionNordictrackTreadmill/blob/26db2e8344b8f01d0f512bfdb9c2080345a45ef4/app/src/main/java/org/cagnulein/qzcompanionnordictracktreadmill/UDPListenerService.java#L268 so the socket will stay open and it doesn't require to open each time.

What do you think?

Yes that sounds good. I didn't realize you were opening and closing the socket for each request

cagnulein commented 1 year ago

yeah, me neither, i guess it's a copy and paste error

cagnulein commented 1 year ago

done @victorypoint https://github.com/cagnulein/QZCompanionNordictrackTreadmill/actions/runs/4074874390

victorypoint commented 1 year ago

@cagnulein , I tested the new QZCompanion build. QZ appears to be sending correct speed changes as before with the exception of the final cooldown ramp. QZCompanion was receiving the correct speed changes until 11:35:49 when it received a 9 kph speed change instead of 16. It should have received a 16 kph speed change around 11:35:29. Then the alternating 16 and 9 speed changes went well however the final cooldown ramp speeds were not received. Speed changed to 16 kph at 11:42:09 then stayed there.

It looks like we're getting closer.

logs3.zip

cagnulein commented 1 year ago

yes a saw something strange in the cooldown too in your log from yesterday but i can't replicate this on my own. i will try again tomorrow, thanks!

victorypoint commented 1 year ago

Can we test this with the fake treadmill option in QZ?

cagnulein commented 1 year ago

yes i guess so but you will not see the reaction of the treadmill

Il giorno gio 2 feb 2023 alle 19:11 Al Udell @.***> ha scritto:

Can we test this with the fake treadmill option in QZ?

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

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

victorypoint commented 1 year ago

@cagnulein , I just tested the same .zwo file with QZ 2.12.59 and QZCompanion 3.2.16. It looks like QZ transmitted the initial warmup ramp and all steadystate changes perfectly, but no cooldown ramp was sent. QZCompanion received all speed changes perfectly with no dropouts or disconnects.

logs4.zip

cagnulein commented 1 year ago

ok thanks for the test, now i have to understand your cooldown issue. I have to match your settings, i guess it's something about your settings. I will let you know

victorypoint commented 1 year ago

ok thanks for the test, now i have to understand your cooldown issue. I have to match your settings, i guess it's something about your settings. I will let you know

Ok. Let me know what you need from my end. So you're convinced it's something to do with my QZ or Companion settings? It's strange because both ramps worked fine in Companion 3.0.7 and 3.1.3. Perhaps I should test these versions again with the new QZ 2.12.59 to confirm the ramps work?

cagnulein commented 1 year ago

for what I saw in the log, 2.12.59 don't send the cooldown ramp, i guess it's due to the new ramp algorithm but I have to understand why

cagnulein commented 1 year ago

i tried again, also with an android device as you and i see the cooldown in the qz log, that's unbelieable! Could you please send me the exact zwo file that you're using. I'm worried about some strange character on it or something similar...I just downloaded from the page of the first post of this ticket

victorypoint commented 1 year ago

A strange character would definitely explain it. I'm attaching 2 .zwo files:

zwift-workouts.zip

cagnulein commented 1 year ago

got the issue finally! I'm fixing it! I will build a new one tomorrow!

victorypoint commented 1 year ago

got the issue finally! I'm fixing it! I will build a new one tomorrow!

What was the issue? Anything to do with strange characters in the .zwo file as you suspected?

cagnulein commented 1 year ago

no just the fact that powerhigh and powerlow were on reverse. i didn't build it yet

Il giorno lun 6 feb 2023 alle 22:21 Al Udell @.***> ha scritto:

got the issue finally! I'm fixing it! I will build a new one tomorrow!

What was the issue? Anything to do with strange characters in the .zwo file as you suspected?

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

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

victorypoint commented 1 year ago

@cagnulein , I just tested QZ 2.12.60 Android with QZCompanion 3.2.16. QZ sent the cooldown ramp! Excellent! The only strange thing I noticed is that the final 9.0 kph speed wasn't reached at the end (it ended on 9.1 kph). But it just doesn't matter because Zwift doesn't reach 9.0 at the end either.

Here's the speed sequence:

Line   2240: Tue Feb 7 19:07:20 2023 1675811240203 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9 true 1 0
Line   4874: Tue Feb 7 19:07:47 2023 1675811267213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.1 true 1 0
Line   7417: Tue Feb 7 19:08:15 2023 1675811295206 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.2 true 1 0
Line   9921: Tue Feb 7 19:08:43 2023 1675811323210 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.3 true 1 0
Line  13585: Tue Feb 7 19:09:11 2023 1675811351269 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.4 true 1 0
Line  16103: Tue Feb 7 19:09:40 2023 1675811380215 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.5 true 1 0
Line  18658: Tue Feb 7 19:10:08 2023 1675811408211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.6 true 1 0
Line  21153: Tue Feb 7 19:10:36 2023 1675811436217 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.7 true 1 0
Line  23686: Tue Feb 7 19:11:04 2023 1675811464213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.8 true 1 0
Line  26496: Tue Feb 7 19:11:33 2023 1675811493210 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.9 true 1 0
Line  28963: Tue Feb 7 19:12:01 2023 1675811521216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10 true 1 0
Line  31376: Tue Feb 7 19:12:29 2023 1675811549215 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.1 true 1 0
Line  34019: Tue Feb 7 19:12:57 2023 1675811577217 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.2 true 1 0
Line  36753: Tue Feb 7 19:13:26 2023 1675811606213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.3 true 1 0
Line  39197: Tue Feb 7 19:13:54 2023 1675811634216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.4 true 1 0
Line  41746: Tue Feb 7 19:14:22 2023 1675811662213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.5 true 1 0
Line  44188: Tue Feb 7 19:14:50 2023 1675811690213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.6 true 1 0
Line  46745: Tue Feb 7 19:15:19 2023 1675811719209 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.7 true 1 0
Line  49020: Tue Feb 7 19:15:47 2023 1675811747211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.8 true 1 0
Line  51749: Tue Feb 7 19:16:15 2023 1675811775216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.9 true 1 0
Line  54388: Tue Feb 7 19:16:43 2023 1675811803216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11 true 1 0
Line  57204: Tue Feb 7 19:17:12 2023 1675811832210 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11.1 true 1 0
Line  60008: Tue Feb 7 19:17:40 2023 1675811860215 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line  61902: Tue Feb 7 19:18:00 2023 1675811880209 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line  67375: Tue Feb 7 19:19:00 2023 1675811940211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line  69112: Tue Feb 7 19:19:20 2023 1675811960213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line  74591: Tue Feb 7 19:20:20 2023 1675812020214 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line  76244: Tue Feb 7 19:20:40 2023 1675812040214 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line  81864: Tue Feb 7 19:21:40 2023 1675812100212 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line  83593: Tue Feb 7 19:22:00 2023 1675812120209 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line  89107: Tue Feb 7 19:23:00 2023 1675812180210 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line  90949: Tue Feb 7 19:23:20 2023 1675812200217 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line  96445: Tue Feb 7 19:24:20 2023 1675812260212 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line  98295: Tue Feb 7 19:24:40 2023 1675812280218 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line 103692: Tue Feb 7 19:25:40 2023 1675812340210 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line 105495: Tue Feb 7 19:26:00 2023 1675812360212 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.04173 true 1 0
Line 110636: Tue Feb 7 19:27:00 2023 1675812420210 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 15.9969 true 1 0
Line 112563: Tue Feb 7 19:27:20 2023 1675812440209 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11.1 true 1 0
Line 115476: Tue Feb 7 19:27:48 2023 1675812468216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11 true 1 0
Line 118001: Tue Feb 7 19:28:16 2023 1675812496233 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.9 true 1 0
Line 120468: Tue Feb 7 19:28:44 2023 1675812524216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.8 true 1 0
Line 123103: Tue Feb 7 19:29:12 2023 1675812552211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.7 true 1 0
Line 125651: Tue Feb 7 19:29:40 2023 1675812580211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.6 true 1 0
Line 128310: Tue Feb 7 19:30:08 2023 1675812608211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.5 true 1 0
Line 130901: Tue Feb 7 19:30:36 2023 1675812636239 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.4 true 1 0
Line 133539: Tue Feb 7 19:31:04 2023 1675812664212 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.3 true 1 0
Line 136243: Tue Feb 7 19:31:32 2023 1675812692239 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.2 true 1 0
Line 138789: Tue Feb 7 19:32:00 2023 1675812720212 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10.1 true 1 0
Line 141255: Tue Feb 7 19:32:28 2023 1675812748216 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 10 true 1 0
Line 143783: Tue Feb 7 19:32:56 2023 1675812776213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.9 true 1 0
Line 146348: Tue Feb 7 19:33:25 2023 1675812805211 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.8 true 1 0
Line 148794: Tue Feb 7 19:33:53 2023 1675812833214 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.7 true 1 0
Line 151288: Tue Feb 7 19:34:21 2023 1675812861209 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.6 true 1 0
Line 153759: Tue Feb 7 19:34:49 2023 1675812889215 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.5 true 1 0
Line 156187: Tue Feb 7 19:35:17 2023 1675812917217 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.4 true 1 0
Line 158704: Tue Feb 7 19:35:45 2023 1675812945217 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.3 true 1 0
Line 161564: Tue Feb 7 19:36:13 2023 1675812973215 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.2 true 1 0
Line 164001: Tue Feb 7 19:36:41 2023 1675813001213 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 9.1 true 1 0

logs5.zip

victorypoint commented 1 year ago

@cagnulein , when I get a chance I'll test other .zwo files with both speed and incline changes. Can you confirm that additional lines like the following will work in QZ?

<IntervalsT Repeat="4" OnDuration="30" OnPower="0.95" OffDuration="45" OffPower="0.5" pace="1"/>
<SteadyState Duration="60" Power="0.84" Incline="0.03" pace="1"/>
cagnulein commented 1 year ago

I just tested QZ 2.12.60 Android with QZCompanion 3.2.16. QZ sent the cooldown ramp! Excellent! The only strange thing I noticed is that the final 9.0 kph speed wasn't reached at the end (it ended on 9.1 kph). But it just doesn't matter because Zwift doesn't reach 9.0 at the end either.

ah! great! so it would be nice if you can also try ramp files in order to be sure that there is no differences between qz and zwift. thanks!

@cagnulein , when I get a chance I'll test other .zwo files with both speed and incline changes. Can you confirm that additional lines like the following will work in QZ?

<IntervalsT Repeat="4" OnDuration="30" OnPower="0.95" OffDuration="45" OffPower="0.5" pace="1"/>
<SteadyState Duration="60" Power="0.84" Incline="0.03" pace="1"/>

yes they are managed inside QZ. The only thing it's not managed yet is the incline value in the steady state. Also that value is very strange, 0.03?!

victorypoint commented 1 year ago

Yeah, so for example, here's a workout from the new 2023 Zwift Academy series with plenty of incline - https://whatsonzwift.com/workouts/zwift-academy-run-2023/long-workout-roller-coaster. I've attached the converted .zwo file. So the Incline="0.03" translates to 3%.

Roller Coaster.zip

cagnulein commented 1 year ago

Perfect! I'm adding it right now!

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

Il giorno mer 8 feb 2023 alle ore 14:57 Al Udell @.***> ha scritto:

Yeah, so for example, here's a workout from the new 2023 Zwift Academy series with plenty of incline - https://whatsonzwift.com/workouts/zwift-academy-run-2023/long-workout-roller-coaster. I've attached the converted .zwo file. So the Incline="0.03" translates to 3%.

Roller Coaster.zip https://github.com/cagnulein/qdomyos-zwift/files/10686193/Roller.Coaster.zip

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

victorypoint commented 1 year ago

@cagnulein, I tested QZ 2.12.61 Android with QZCompanion 3.2.16. The workout tested is Zwift Academy 2023 Roller Coaster Short - https://whatsonzwift.com/workouts/zwift-academy-run-2023/short-workout-roller-coaster. All went well except the very first incline change was not received by QZCompanion. All other speeds and inclines were sent and received. This is excellent work!

The specific .zwo line with first inclination change is:

So looking at the QZ log, the speed and first incline change was sent:

Looking at the treadmill logcat, the speed swipe was received but not the first incline swipe:

A swipe to increase the incline from 0 to 3% was not received. It would have the form - input swipe 75 714 75 621 200

Logs and .zwo file attached.

zwo-logs.zip

cagnulein commented 1 year ago

great! Found the issue   @victorypoint Do you remember that we add a filter of 500 ms between each swipe? The issue of the first inclination is about this. Because on the same command we have a speed change and a inclination change. So the swipe for the speed was raised, but then, when the inclination tried to change, the filter blocks it.

So how could we fix this? Maybe QZ should send this in 2 different commands? I guess it's the easiest way. What do you think?

victorypoint commented 1 year ago

Yes, two different commands would work great. The other option is just to increase the spacing between the sends. Whatever you think would work best

cagnulein commented 1 year ago

Done! It will be inside the next android build

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

Il giorno ven 10 feb 2023 alle ore 14:04 Al Udell @.***> ha scritto:

Yes, two different commands would work great. The other option is just to increase the spacing between the sends. Whatever you think would work best

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

victorypoint commented 1 year ago

Regarding auto-incline in Zwift, I haven't used it in a while but found out recently that it seems to be broken in the latest QZ + QZCompanion. I tested in Zwift Bike mode and received no inclination swipes. QZ log is showing an error - "Debug: virtualtreadmill.cpp void virtualtreadmill::treadmillProvider() "virtualtreadmill connection error".

I also tested GPX follow in QZ with Box Hill and Passo Dello Stelvio files - no auto-incline unfortunately.

I'm wondering if a QZ setting got changed accidentally that disabled this feature. Auto-resistance is enabled. Auto-speed and incline work fine from the tile +- buttons. Also, as noted above, auto-speed and incline work with Zwift workout files (.zwo).

Attached are QZ and logcat logs for both GPX follow and Zwift bike mode,

auto-incline.zip

cagnulein commented 1 year ago

@victorypoint ok for the auto incline on zwift did you try to select WAHOO KICKR instead of WAHOO TREADMILL ? because I guess zwift wants to see a bike profile first.

cagnulein commented 1 year ago

for the gpx instead, i don't see it running from the QZ directly. It seems that there is a general error but I'm not understanding which one is. I have to simulate the same here. I will come back to you ASAP

cagnulein commented 1 year ago

@victorypoint for the gpx, can you try disabling the treadmill force speed setting?

victorypoint commented 1 year ago

@victorypoint ok for the auto incline on zwift did you try to select WAHOO KICKR instead of WAHOO TREADMILL ? because I guess zwift wants to see a bike profile first.

No have not as I haven't switched to KICKR before. Have always just used TREADMILL in both bike and running pairings.

cagnulein commented 1 year ago

ok give it a try when you have a moment, maybe Zwift is filtering out the inclination if they saw a "treadmill" device

victorypoint commented 1 year ago

Done! It will be inside the next android build

@cagnulein , I just tested QZ Android 2.12.63 with same Roller Coaster zwo file as before. I'm getting the same result this time - the very first incline change was not received by QZCompanion. All other speeds and inclines were sent and received.

Again, the specific .zwo line with first inclination change is: SteadyState Duration="60" Power="0.84" Incline="0.03" pace="1"/

At that moment, QZ logged these lines:

Mon Feb 13 18:45:14 2023 1676328314371 Debug: ../src/trainprogram.cpp void trainprogram::scheduler() "trainprogram change speed 11.6847" Mon Feb 13 18:45:14 2023 1676328314373 Debug: ../src/treadmill.cpp virtual void treadmill::changeSpeed(double) changeSpeed 11.6847 true 1 0 Mon Feb 13 18:45:14 2023 1676328314374 Debug: ../src/trainprogram.cpp void trainprogram::scheduler() "trainprogram change inclination3" Mon Feb 13 18:45:14 2023 1676328314375 Debug: ../src/treadmill.cpp virtual void treadmill::changeInclination(double, double) changeInclination 3 true 1 0

Logs attached

zwo-logs.zip

victorypoint commented 1 year ago

@victorypoint for the gpx, can you try disabling the treadmill force speed setting?

@cagnulein, good! TM speed force off fixed the problem for gpx follow incline. So to summarize, having speed force on and having GPX follow both speed and incline is not supported? Just auto-incline supported?

Logs attached

gpx follow box hill - tm force speed on.zip gpx follow box hill - tm force speed off.zip