cagnulein / qdomyos-zwift

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

[REQ] Horizon Paragon X #637

Closed OswaldKolle1977 closed 4 months ago

OswaldKolle1977 commented 2 years ago

Could you please add support for the Horizon Paragon X treadmill?

OswaldKolle1977 commented 2 years ago

@cagnulein Still not working as expected... It changes the speed as follows: Manually set the speed to 10.0 km/h and then: 10.0km/h -> pressed + ==> Speed was set to 6.5 km/h 6.5 km/h -> pressed + ==> Speed was set to 4.3 km/h 4.3 km/h -> pressed - ==> Speed was set to 2.5 km/h 2.5 km/h -> pressed + ==> Speed was set to 1.8 km/h 1.8 km/h -> pressed - ==> Speed was set to 0.9 km/h 0.9 km/h -> pressed - ==> Speed was set to 0.8 km/h (minimum speed)

Here is the logfile: debug-Sat_Feb_12_17_05_57_2022.log

cagnulein commented 2 years ago

got it! because i'm changing in miles (as the other horizon want this)! is the speed in the QZ tile correct?

Il giorno sab 12 feb 2022 alle ore 17:15 Mario @.***> ha scritto:

@cagnulein https://github.com/cagnulein Still not working as expected... It changes the speed as follows: Manually set the speed to 10.0 km/h and then: 10.0km/h -> pressed + ==> Speed was set to 6.5 km/h 6.5 km/h -> pressed + ==> Speed was set to 4.3 km/h 4.3 km/h -> pressed - ==> Speed was set to 2.5 km/h 2.5 km/h -> pressed + ==> Speed was set to 1.8 km/h 1.8 km/h -> pressed - ==> Speed was set to 0.9 km/h 0.9 km/h -> pressed - ==> Speed was set to 0.8 km/h (minimum speed)

Here is the logfile: debug-Sat_Feb_12_17_05_57_2022.log https://github.com/cagnulein/qdomyos-zwift/files/8053971/debug-Sat_Feb_12_17_05_57_2022.log

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

OswaldKolle1977 commented 2 years ago

@cagnulein What do you mean? The speed shown in the tile within the app is the same like the speed on the treadmill (which is in km/h)

cagnulein commented 2 years ago

@OswaldKolle1977 the api of your treadmill sends the speed in miles but it wants km/h when I need to control it. It's the craziness of some horizon developer :) So I need to manage it differently but it's very easy. I will do in the next days ;)

cagnulein commented 2 years ago

done @OswaldKolle1977 it will be in the 2.10.27 Let me know I hope to release it today

OswaldKolle1977 commented 2 years ago

@cagnulein Hooray! It works now! Speed and inclination are displayed 1:1 to the treadmill values and I can control it with +/- Buttons within the app! (Speed is in 0.5 km/h steps)

I have to check it again - but I think it is not stopping when I press stop in the app / but stopps when I restart the app... But let me check this again tomorrow....

Now I would only need to read the workout-speed within zwift and transfer it to the treadmill :-) Is that also possible? I haven't found a workout with inclination - so I couldn't test that.... (I am only running - no bike)

cagnulein commented 2 years ago

yeah! auto inclination works only as shown in my qz auto inclination youtube video.

or you can download a zwo file for that workout and then qz will follow the speed and inclination in real time!

let me know for the stop

cagnulein commented 2 years ago

check the #589 for reference

cagnulein commented 2 years ago

any news? shall we close this @OswaldKolle1977 ?

OswaldKolle1977 commented 2 years ago

@cagnulein Sorry I had no time yesterday, I will check this evening... I also have to check if "auto start" is working, when it is activated...

OswaldKolle1977 commented 2 years ago

@cagnulein The stop-button is working as expected! BUT: there is still something not working correct...

Some other small things:

General Things

cagnulein commented 2 years ago

Speed is not transmitted to the treadmill when using the "Train Program" and the same Workout within Zwift.

For this provide me the zwo file.

cagnulein commented 2 years ago

Treadmill doesn't start when App starts, although "Pause when App Starts" is disabled.

What do you expect for this? It's just about the pause/play button on qz, not about the tape of your treadmill

cagnulein commented 2 years ago

When "Open Train Program" there comes a message: "Press Start to begin" - But there is no start button - when I start it on Treadmill, the message stays on top.

I mean the start button of qz in the top bar. You can close this message pressing outside of it

cagnulein commented 2 years ago

Under "Treadmill Options" you can choose "Speed Step" - this is ignored for the "Horizon Treadmill" and fixed 0.5 km/h steps is used.

Send me a debug log about this

cagnulein commented 2 years ago

The ODO-Meter is not counting correct (it was showing about 0.15km when it really was 2.x km) The treadmill gets a heartrate value (from 70 - 140) - must be by your app.

Send me a debug log for these. Thanks

OswaldKolle1977 commented 2 years ago

Speed is not transmitted to the treadmill when using the "Train Program" and the same Workout within Zwift.

For this provide me the zwo file.

Just for me to understand it: I load the File selected in the Train Program, dismiss the popup Message, then I press Start on my Treadmill and the App should switch the treadmill speed to the speed of the .zwo File multiplied by my duration times within the app. Right? This is the .zwo File Data: `

Mario Hills RUN (5km) 5km Interval Steigungslauf run

`

cagnulein commented 2 years ago

@OswaldKolle1977 Yes exactly but it should be well formatted. Can you upload the same zwo file that you opened on QZ?

OswaldKolle1977 commented 2 years ago

Okay

Treadmill doesn't start when App starts, although "Pause when App Starts" is disabled.

What do you expect for this? It's just about the pause/play button on qz, not about the tape of your treadmill

Well I thought it would start the Belt... At least when I press the start/pause Button in the App. If it is the wanted behavior then I did say nothing 😉

OswaldKolle1977 commented 2 years ago

@OswaldKolle1977 Yes exactly but it should be well formatted. Can you upload the same zwo file that you opened on QZ?

Here it is (without the txt of course) Hills RUN (5km).zwo.txt

cagnulein commented 2 years ago

Well I thought it would start the Belt... At least when I press the start/pause Button in the App. If it is the wanted behavior then I did say nothing

That's need to be fixed for this tm, let me check this in the next days

cagnulein commented 2 years ago

@OswaldKolle1977 Yes exactly but it should be well formatted. Can you upload the same zwo file that you opened on QZ?

Here it is (without the txt of course) Hills RUN (5km).zwo.txt

fixed in the next release! Thanks for the feedback, i will continue to the rest of the points today/next days

cagnulein commented 2 years ago
  • Treadmill doesn't start when App starts, although "Pause when App Starts" is disabled.

about this, confirm me one thing. When the tape is hold, if you press the plus button in the speed tile on QZ, the session start on your tape? If it's so i can use the same bluetooth function to start it. Let me know @OswaldKolle1977

OswaldKolle1977 commented 2 years ago
  • Treadmill doesn't start when App starts, although "Pause when App Starts" is disabled.

about this, confirm me one thing. When the tape is hold, if you press the plus button in the speed tile on QZ, the session start on your tape? If it's so i can use the same bluetooth function to start it. Let me know @OswaldKolle1977

When the tape is hold, +/- buttons don't change anything (neither within the app, nor at the treadmill). Additionally: When treadmill was stopped after a workout, the speed/incline in the app stay at the last value! Pressing +/- then, will increase/decrease the shown values within the app without restarting the treadmill. Logfile will be in the next post.

cagnulein commented 2 years ago

ok @OswaldKolle1977 so I have to found a start command. And probably I have to found also a workout state to put speed and incline to zero

OswaldKolle1977 commented 2 years ago

Under "Treadmill Options" you can choose "Speed Step" - this is ignored for the "Horizon Treadmill" and fixed 0.5 km/h steps is used.

Send me a debug log about this Further informations about this: When the speed is an integer value (2.0, 3.0, ...) and the Speed Step is set to 1.0: +/- work as expected! BUT: is the speed a double value, then the behavior is completely wrong! Values as follows: 3.7 (+) -> 4.0 4.2 (-) -> 3.4 3.4 (-) -> 2.8 2.8 (-) -> 2.6 2.6 (-) -> 2.2 2.2 (+) -> 3.0 3.0 (+) -> 4.0

With the Speed Step at 1.3 (double value) it is the opposite: When the belt speed is an integer, it is not calculating correct, but correct, when it is a double): 3.0 (+) -> 3.9 3.9 (+) -> 5.2 5.2 (+) -> 6.5 --- Everything is correct - also if I press (-)

The ODO-Meter is not counting correct (it was showing about 0.15km when it really was 2.x km) The treadmill gets a heartrate value (from 70 - 140) - must be by your app.

Send me a debug log for these. Thanks

I had no connection to zwift - maybe it is a little different now, because the heartrate was set to 0.... I have to do another debug for this I think...

Logfile: debug-Thu_Feb_17_17_19_35_2022.log

OswaldKolle1977 commented 2 years ago

One more thing: The duration time shown in the app is different to the time shown on the treadmill - It seems like you count it yourself - and not use the value received from the treadmill - correct? (I don't care about that time, just wanted to say it...)

cagnulein commented 2 years ago

One more thing: The duration time shown in the app is different to the time shown on the treadmill - It seems like you count it yourself - and not use the value received from the treadmill - correct? (I don't care about that time, just wanted to say it...)

yes is right, but Does it sound good? I mean, the elapsed time is the one that I'm sending to strava too

cagnulein commented 2 years ago

With the Speed Step at 1.3 (double value) it is the opposite: When the belt speed is an integer, it is not calculating correct, but correct, when it is a double): 3.0 (+) -> 3.9 3.9 (+) -> 5.2 5.2 (+) -> 6.5 --- Everything is correct - also if I press (-)

ok i guess this one is releated to #618 , I will follow you up there

cagnulein commented 2 years ago

@OswaldKolle1977 i tried to managed the start button. It will be in the version 2.10.31 Let me know if it works. Another question: is the stop button from QZ work?

OswaldKolle1977 commented 2 years ago

One more thing: The duration time shown in the app is different to the time shown on the treadmill - It seems like you count it yourself - and not use the value received from the treadmill - correct? (I don't care about that time, just wanted to say it...)

yes is right, but Does it sound good? I mean, the elapsed time is the one that I'm sending to strava too

I would say yes, because the time of the treadmill stopps immediately after pressing stop, while in reality the belt is running a couple of seconds more... Nevertheless your timer should be quite close to the one of the treadmill...

OswaldKolle1977 commented 2 years ago

@OswaldKolle1977 i tried to managed the start button. It will be in the version 2.10.31 Let me know if it works. Another question: is the stop button from QZ work?

Yes, the stop button has the same function like the start/stop button of the treadmill. It is not the long-press to end / exit the current run.

cagnulein commented 2 years ago

hah ok @OswaldKolle1977 what happens if you press stop twice on qz? the tape stops and resumes? if so i have to use the same function, isn't it?

cagnulein commented 2 years ago

did you see my previous comment @OswaldKolle1977 ?

OswaldKolle1977 commented 2 years ago

did you see my previous comment @OswaldKolle1977 ?

Oh - sorry... No, I haven't... I can check that later....

jbekkema commented 2 years ago

what happens if you press stop twice on qz? the tape stops and resumes?

I gave it a try using the iOS TestFlight v2.10.31 build: the Stop button on QZ stops (pauses) the treadmill. Pushing it again in QZ has no effect (the treadmill stays in the paused state), which seems like the correct behaviour.

The pause button also correctly pauses the treadmill. However the Start button has no effect. If the treadmill is stopped/paused, pushing the Start button in QZ does not cause the treadmill to start.

QZ also doesn’t seem to notice if the treadmill is started or stopped using the treadmill itself. For example, if there is an active session, and I push the Stop button on the treadmill (not in QZ) which causes the treadmill to pause, QZ still thinks the treadmill is running (the Elapsed time keeps increasing and the state of the buttons remain the same). If possible it would be nice if QZ could automatically match the state of the treadmill. I’m not sure if the treadmill reports its current state over Bluetooth? If not, maybe the a zero speed could be used as an indicator?

jbekkema commented 2 years ago

which seems like the correct behaviour.

Actually, I'm wrong. When using the offical "fitDisplay" app, pushing the pause button in the app causes the treadmill to display "PAUSE" on the screen (and pause the treadmill and timer), while pushing the stop button in the app causes the treadmill to display "END" on the screen (which stops the treadmill and resets it back to the start). When pushing the Start button in fitDisplay, the treadmill counts down 3,2,1 and then starts.

I think when pushing the Stop button in QZ it needs to send the same END command, rather than sending the PAUSE command. I also think the Start button in QZ needs to send the same start command that causes the treadmill to start with the 3 second countdown.

I'll see if I can get a bluetooth dump from iOS. If not, @OswaldKolle1977 might have better luck with an Android device.

[Edit] Bluetooth logs for starting and stopping sent via email :)

cagnulein commented 2 years ago

QZ also doesn’t seem to notice if the treadmill is started or stopped using the treadmill itself. For example, if there is an active session, and I push the Stop button on the treadmill (not in QZ) which causes the treadmill to pause, QZ still thinks the treadmill is running (the Elapsed time keeps increasing and the state of the buttons remain the same). If possible it would be nice if QZ could automatically match the state of the treadmill. I’m not sure if the treadmill reports its current state over Bluetooth? If not, maybe the a zero speed could be used as an indicator?

I can totally do this using the speed value. Yeah maybe if @OswaldKolle1977 can collect a simple hci snoof with some start-pause-start-pause-start-stop sequence from the fitdisplay app, it will make my life easier :D

OswaldKolle1977 commented 2 years ago

QZ also doesn’t seem to notice if the treadmill is started or stopped using the treadmill itself. For example, if there is an active session, and I push the Stop button on the treadmill (not in QZ) which causes the treadmill to pause, QZ still thinks the treadmill is running (the Elapsed time keeps increasing and the state of the buttons remain the same). If possible it would be nice if QZ could automatically match the state of the treadmill. I’m not sure if the treadmill reports its current state over Bluetooth? If not, maybe the a zero speed could be used as an indicator?

I can totally do this using the speed value. Yeah maybe if @OswaldKolle1977 can collect a simple hci snoof with some start-pause-start-pause-start-stop sequence from the fitdisplay app, it will make my life easier :D

I am trying to do that this evening...

cagnulein commented 2 years ago

syncing start and stop done @jbekkema it will be in the 2.10.32

jbekkema commented 2 years ago

syncing start and stop done @jbekkema it will be in the 2.10.32

Awesome!

OswaldKolle1977 commented 2 years ago

QZ also doesn’t seem to notice if the treadmill is started or stopped using the treadmill itself. For example, if there is an active session, and I push the Stop button on the treadmill (not in QZ) which causes the treadmill to pause, QZ still thinks the treadmill is running (the Elapsed time keeps increasing and the state of the buttons remain the same). If possible it would be nice if QZ could automatically match the state of the treadmill. I’m not sure if the treadmill reports its current state over Bluetooth? If not, maybe the a zero speed could be used as an indicator?

I can totally do this using the speed value. Yeah maybe if @OswaldKolle1977 can collect a simple hci snoof with some start-pause-start-pause-start-stop sequence from the fitdisplay app, it will make my life easier :D

I am trying to do that this evening...

Okay - I did two starts / stops. 1st start with 0% incline and 5km/h with 30:00 Minutes decreasing. (~30 seconds until STOP) 2nd start with 0% incline and 5km/h with 170:00 Minutes decreasing (the Treadmill shows 2:49 - without seconds) (~20 seconds until STOP) btsnoop_hci.log

cagnulein commented 2 years ago

thanks @OswaldKolle1977 i will check it tomorrow!

cagnulein commented 2 years ago

thanks @OswaldKolle1977 i see clearly the start now and i see also the number of minutes that you set. Question for both of you @jbekkema : which value should i use for this time? I mean i can put a 9999 value for example? or maybe in the app @OswaldKolle1977 you have the opportuniny to start a free run without set this time?

jbekkema commented 2 years ago

Ideally it would be possible to start the treadmill with no workout time limit set. The display on the treadmill counts down from this time, so it would look a bit weird if it was counting down from a large number.

The fitDisplay app has a number of workout modes, some of them (such as manual mode) have a workout time limit associated with them. Others don't have this limit, for example if using "Distance Target" you specify a maximum distance, but there is no time limit. Others, like the "Calories Target" are similar. This makes me think it should be possible to craft a Bluetooth command that starts the treadmill without a limit in place.

I think the "Beat" mode in the app is the command we want to clone. It starts the treadmill with a starting speed and starting incline, but has no other limit. It's called "Beat" mode as it also allows you to select music to play on your device, but this has nothing to do with the treadmill itself. So my guess is it's just sending a "Start" packet with no limits (which is what we want).

@cagnulein Did you receive the Bluetooth packet captures I previously sent via email? And if so, were they helpful at all? If so, happy to do another capture of the above mode/s as well.

cagnulein commented 2 years ago

@jbekkema understood. We need to capture this mode from the android of @OswaldKolle1977 , so please you lead on this choosing the best workout mode that you want from me to clone and tell to @OswaldKolle1977 to capture this. Do you agree?

jbekkema commented 2 years ago

No worries, if the Bluetooth packet dumps from iOS are no good then I'll leave it to @OswaldKolle1977 as I don't have an Android device.

From what I can tell the process in fitDisplay should be like so: 1) Launch the app and connect to the treadmill 2) Select the "Beat" option, select at least one music track (it won't let you start without at least one selected) and click OK 3) Select a "Beginning Speed" and "Incline" and click START 4) fitDisplay will send the Stop (END) command to the treadmill when the music finishes, or if the "x" icon is clicked.

02B6CEE2-E085-40E8-955A-9BF0781AB061 4BE29CFB-F299-4CFA-BE24-C1B660F7B821_1_105_c E920EDEE-8E29-47FF-8390-04589F3C3FC0

OswaldKolle1977 commented 2 years ago

@jbekkema understood. We need to capture this mode from the android of @OswaldKolle1977 , so please you lead on this choosing the best workout mode that you want from me to clone and tell to @OswaldKolle1977 to capture this. Do you agree?

@cagnulein Sorry for the confusion! I don't use the fitDisplay App (because it is a horrible app) so I have chosen the first mode I have seen - and then thought it might be good for you to see how the treadmill handles huge time values in the bluetooth stream. Haven't thought of a different start behavior - my fault! I normally use a "free mode" - so start the treadmill, select the speed and incline and finish it manually - or if the workout is done it would be nice if it stops automatically.

I will do another bluetooth hci snoof with a manual mode later this evening. @jbekkema I don't want to stop the belt when music is done - so I try to find a "free mode" in the fitdisplay app where I only have to select speed and incline and start it from there. Your 2nd choice within the app could also be "more" and select another running option - I never tried the "beats" mode... But for what we want, this might be an option - because the start of the treadmill is the one we both want (speed+incline Time increasing from 0:00:00 - nothing more) - correct?

jbekkema commented 2 years ago

I don't use the fitDisplay App (because it is a horrible app)

Strongly agree!

so I try to find a "free mode" in the fitdisplay app where I only have to select speed and incline and start it from there.

I was unable to find any mode like that. There was nothing like a free mode listed under the "More" menu. Maybe the Android version is different. Only the "Beats" mode didn't require any additional requirements.

I don't want to stop the belt when music is done

Roberto only needs to see what the Bluetooth packet format is for starting the treadmill with no additional parameters, which the Beats mode should show. The treadmill stopping when the music is finished is part of the fitDisplay app (and obviously QZ won't do that) :)

But for what we want, this might be an option - because the start of the treadmill is the one we both want (speed+incline Time increasing from 0:00:00 - nothing more) - correct?

Yep, that's correct

OswaldKolle1977 commented 2 years ago

@jbekkema : You are right - there is no other option to select a "normal run" - so I did two runs with the "beat" activity...

@cagnulein Here is the HCI snoop file (two starts, the first with 5.6 km/h and 1.5 % incline and the second with 0 % incline and 8 km/h (I hope I remembered this correctly - if it matters...) -- They are both very short... btsnoop_hci.log