Closed RickNY closed 2 years ago
Thanks @RickNY So that's my plan 1) I will create a new branch for your treadmill where we will try together to fix this issue. 2) every time I will do a modification, you will have to build it (the process will be very fast after the first time) and sending the debug log we will understand together if it's the right path or not.
I will start this afternoon if the baby will get me some sleep :)
ok @RickNY first commit done
so do this
let me know
OK, with that change, the UI just shows "Connecting...", but doesn't ever show it connected to the Horizon -- however, the BT LED on the treadmill DOES light up. I think due to some sort of bug in Linux though, the connection doesn't break after the program terminates -- on the RPi, I have to toggle bluetooth off for the treadmill's BT light to go out.. Similarly I have to do the same on Debian 11.
The treadmill doesnt start moving automatically -- however, it also doesnt do anything because the app doesnt connect. Log attached. debug-Sat_Sep_3_08_57_18_2022.log.txt
@RickNY Thanks but the log seems truncated. Could you please try again and leave qz alive for at least 2 minutes to be safe? Thanks
Lets try this again.. debug-Sat_Sep_3_09_38_24_2022.log.txt
@RickNY Ok perfect! So that frame that I removed it's the start tape frame. So now I would like to put it under the qz start button event. Will be ok to you?
Not sure I understand -- I can make whatever changes you suggest to get it resolved
Oh, one thing I just realized -- if I hit the START button in the app, the speed up and incline up buttons will generate a beep on the treadmill -- but nothing actually happens with the treadmill.
@RickNY Let me try to explain me better.
The original issue it was the fact that the treadmill started automatically at the connection with QZ.
So what I did in the last commit was to remove the last part of the initialisation.
Your last log confirms that that part starts the treadmill (because now it's not starting anymore)
So my idea is to put this part in the start button event, so after my new modifications you will have to press the qz start button to start the treadmill.
Is it better?
Sorry for my English, but I'm Italian
Oh, one thing I just realized -- if I hit the START button in the app, the speed up and incline up buttons will generate a beep on the treadmill -- but nothing actually happens with the treadmill.
Yes because I have to put the start command now ;)
Understood on both now -- that sounds like its the behavior we would like. Will the "Connecting" thing change to the Horizon text once that change is made?
@RickNY Don't mind about the connecting thing, it's just a minor that I have to fix on Linux ;)
done @RickNY do a git pull and then a make -j2 and try again let me know
@janabouc maybe you're insterested about this thread even if you can't test it right now
Yes, I'm interested. I think I have had the same issue but I usually don't because I start the tread moving before I connect QZ. That way I can tell when QZ has connected (blue light) AND is registering output (speed is displayed).
It shows blue light always but it takes a minute to get speed displayed. And sometimes I have to reboot QZ to get the output to display.
OK, so issues on this: 1) The treadmill did not start on its own -- good. 2) The Start button on the app starts the treadmill -- good 3) Incline changes seem to work correctly up and down 4) Speed changes are very inconsistent. Clicking the + or - button in the app will always cause the treadmill to beep -- but will not always change the speed. Even more peculiar is that when it does change the speed, it does in increments that dont match the setting. 5) The first log and test I did was with km/h set as the default.. I changed it to what I would normally use - mph and restarted the app. However -- it took numerous attempts of opening/closing the app before the treadmill would actually start with the new settings. Oddly enough - once it did, the speed buttons worked correctly. 6) Pressing stop in the app does not change anything on the treadmill - it keeps running at the last speed. I dont know if that is expected or if it should do a slow stop. At any rate, if I was on the treadmill I could press the stop button there.
Im attaching a few logs here -- the earliest one was the test with kmh. The others will be additional logs once I had changed the setting to mph. The latest one will be when it successfully started with mph. debug-Sat_Sep_3_10_49_08_2022.log.txt debug-Sat_Sep_3_11_03_18_2022.log.txt debug-Sat_Sep_3_11_04_05_2022.log.txt debug-Sat_Sep_3_11_05_27_2022.log.txt debug-Sat_Sep_3_11_08_40_2022.log.txt debug-Sat_Sep_3_11_11_08_2022.log.txt
Also, restarting the app after changing an option (in this case - changing the speed step) also appears to not connect back to the treadmill again when it restarts.. At least the BT LED on the treadmill comes back on - but pressing the Start button in the app does nothing.
Apologies for the multiple comments - one other thing I forgot to add -- when the start button does work and the treadmill starts - it creates an issue that Jana had brought up in her original bug report -- it sets the workout time to 30 minutes, and starts to count down -- when it gets to the end it will stop the workout, which isnt desirable. Can we default that to 99 minutes (which I believe is the max you can set) -- if you can get away with it starting with no set workout time as an available option, that would be even better.
The only way I’ve found to do a time-unlimited run on my 7.0 is to turn it on and disregard the the start up routine and just push start on the treadmill. Then it will run until I turn it off.
I would prefer to control the treadmill’s starting and stopping on the treadmill, not on QZ because
On Sat, Sep 3, 2022 at 8:44 AM RickNY @.***> wrote:
Apologies for the multiple comments - one other thing I forgot to add -- when the start button does work and the treadmill starts - it creates an issue that Jana had brought up in her original bug report -- it sets the workout time to 30 minutes, and starts to count down -- when it gets to the end it will stop the workout, which isnt desirable. Can we default that to 99 minutes (which I believe is the max you can set) -- if you can get away with it starting with no set workout time as an available option, that would be even better.
— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/923#issuecomment-1236146715, or unsubscribe https://github.com/notifications/unsubscribe-auth/AONHDMJPKMYJPM53WZ5UT3TV4NW4PANCNFSM6AAAAAAQDWNBRA . You are receiving this because you were mentioned.Message ID: @.***>
-- Jana Bouc Website and Blog http://janabouc.com Instagram https://www.instagram.com/janabouc/ Facebook https://www.facebook.com/jana.bouc
ok thanks for the test @RickNY I will check this tomorrow, it's evening here and baby calls me ;)
@RickNY for the 30 minute issue could you try to enable the horizon_treadmill_7_8 setting and restart QZ? let me know if it's better
OK, the 7.8 setting reverted the behavior on starting from QZ to 99 minutes.. Also -- is it correct that the "Pause" button in the app does not work as expected on Horizon? As I discovered today, it actually issues a stop/end to the treadmill (same as what the stop button does) and resets the stats on the treadmill itself.
I'm with Jana on many of the points she brought up -- I guess when I am testing these code changes, its easier from where I am sitting on the computer to adjust the treadmill through the app. In real life though when Im using the device, I would be controlling everything speed/incline, start/stop, etc - through the treadmill.
is it correct that the "Pause" button in the app does not work as expected on Horizon? As I discovered today, it actually issues a stop/end to the treadmill (same as what the stop button does) and resets the stats on the treadmill itself.
@RickNY yes because I have sniffed out only the start and stop command to the treadmill, so I haven't any pause command to send to the treadmill. If you can collect a hci snoof about it I will implement it for sure!
@RickNY i checked the speed force issue and it's releated to the "Speed Step:" setting. Since your treadmill wants in miles/h it must be greter than 0.1 mi/h. Could you try to set it 0.1 or better 0.2 and try again?
about the stop is the 7.8 setting fixed also the stop, isn't it?
is it correct that the "Pause" button in the app does not work as expected on Horizon? As I discovered today, it actually issues a stop/end to the treadmill (same as what the stop button does) and resets the stats on the treadmill itself.
@RickNY yes because I have sniffed out only the start and stop command to the treadmill, so I haven't any pause command to send to the treadmill. If you can collect a hci snoof about it I will implement it for sure!
I dont know if this helps you -- here is an iOS snoop from the Horizon AFG Pro app connecting to the tread, sending Start, Pause, and Stop commands.
wow are you an ios dev @RickNY ?
wow are you an ios dev @RickNY ?
Haha -- NO. I just use Xcode from time to time for troubleshooting along with a good sense of how to find things online
@RickNY did you press start, then after 7 seconds pause, and after 1 second stop?
@RickNY did you press start, then after 7 seconds pause, and after 1 second stop?
Yes - that sounds about right
Let me know if you want me to capture other things -- like user profile info, weight, etc -- although I think that info is sent in the very beginning - because just opening the app and connecting updates those profile names.
@RickNY could I ask you to repeat the start pause stop sequence 2 or 3 times in a row, i would like to check the idmessage byte and the checksum byte.
after this, we can focus about the profiles
@RickNY could I ask you to repeat the start pause stop sequence 2 or 3 times in a row, i would like to check the idmessage byte and the checksum byte.
after this, we can focus about the profiles
OK.. Here is Start, Pause, Stop three times in a row after the initial connection. Dont know if this is relevant but after each Start there a 3 second countdown before the tread starts. horizon74_2a.zip
got the pause frame, i'm implementing it!
55aa120003030100f0e100
done @RickNY pull it and build it. let me know if the pause now works ;) thanks for the help
OK, done... The pause button still is stopping the treadmill and returning it to the "Select User" screen and resetting the session. There continues to be very inconsistent behavior with the initial connection to the treadmill -- and I can't tell when the app has connected or not and is ready to communicate until either the speed starts appearing in the app (if the treadmill was started prior to opening the app) or if using the Start button within the app. In either case, it seems to take multiple presses of the start button. The app since you made the change to keep it from starting automatically continues to just say "Connecting..." after it has started receiving data from the treadmill.
I dont know if this is relevant, but here is the flow when using the official Horizon app: 1) Start AFG app 2) An hourglass will appear in the Horizon app -- for around 30 seconds while it establishes the connection to the treadmill. I believe during this stage, the app is initiating the connection - and sending the relevant profile info to the treadmill (names, weight, etc in the app) 3) Once the hourglass goes away, there is full communication
Also - in regards to the speed steps -- I already had the speed step set to 0.1 and the "Use miles in UI" option set, but pressing the +/- buttons on speed within the app do as follows: 0.5, 0.8, 1.1, 1.4, 1.7 -- but then pressing the - button it goes from 1.7 to 1.3 to 0.9 to 0.5.
Im attaching two logs -- the earlier log is just the pause behavior. The later log is the speed steps - along with the pause and then stop issued.
1-debug-Mon_Sep_5_10_36_28_2022.log.txt 2-debug-Mon_Sep_5_10_56_43_2022.log.txt
Also -- I had changed the option to 0.2 as well, and it did those same steps as 0.1
1-debug-Mon_Sep_5_10_36_28_2022.log.txt
@RickNY you have to wait at least 1 minute between when you open qz and when you will be able to press something...the init phase it's very log, maybe i need to show something to show you that i'm initing the treadmill. also don't press play and pause fast. give it a 5 seconds in the middle. could you please try it back?
the logic that i added for the pause event is:
Also - in regards to the speed steps -- I already had the speed step set to 0.1 and the "Use miles in UI" option set, but pressing the +/- buttons on speed within the app do as follows: 0.5, 0.8, 1.1, 1.4, 1.7 -- but then pressing the - button it goes from 1.7 to 1.3 to 0.9 to 0.5.
yeah that's because QZ use km/h and then it lost a decimal in the conversion. I have to study an easy workaround. Anyway the speed control is working
OK. Log attached.. Roughly what I did:
1:00 -- Pressed start in app, treadmill started 0.5 MPH 1:30 -- Pressed + speed in app, speed increased to 0.8 MPH 1:45 -- Pressed Pause in app, treadmill stopped/ended and returned to "Select User" 2:07 -- Pressed Start in app again, treadmill just beeped but did not start again
Question -- on the UI +/- buttons for speed, are we sending absolute speed commands to the treadmill? Or are we sending a command similar to "Speed Up"? If you'd like, I can capture BT using the iPad AFG app instead -- as that also allows you to do speed +/- and incline +/- changes within the app while running.
Question -- on the UI +/- buttons for speed, are we sending absolute speed commands to the treadmill? Or are we sending a command similar to "Speed Up"?
absolute. no need to collect , it's just a math issue on the conversion. i have to figure out an easy way to fix it. anyway i guess it's a minor since you will not use the plus minus buttons on qz anymore after these debug sessions :)
@RickNY i don't see the log
@RickNY i don't see the log
Asking for a bit much now, aren't we? :) Try this -- I got distracted and pulled away midway through typing the last report. debug-Mon_Sep_5_11_15_11_2022.log.txt
Showing a "connecting" message/icon would be great! The treadmill shows a blue light immediately but it often takes 45 seconds or more before the speed shows and it doesn't always succeed.
I turn on the tread, push Start on tread, open QZ, set the countdown timer on my Apple Watch and if it gets to 1 minute without displaying speed, I reboot QZ and try again. Sometimes it works first try, sometimes it takes 2-3 attempts.
Showing a "connecting" message/icon would be great! The treadmill shows a blue light immediately but it often takes 45 seconds or more before the speed shows and it doesn't always succeed.
I turn on the tread, push Start on tread, open QZ, set the countdown timer on my Apple Watch and if it gets to 1 minute without displaying speed, I reboot QZ and try again. Sometimes it works first try, sometimes it takes 2-3 attempts.
yes probably replacing the connecting label with a "hold on, qz is initing your treadmill..." or something
@RickNY i don't see the log
Asking for a bit much now, aren't we? :) Try this -- I got distracted and pulled away midway through typing the last report.
thanks, i will check tomorrow, almost dinner time here :)
Showing a "connecting" message/icon would be great! The treadmill shows a blue light immediately but it often takes 45 seconds or more before the speed shows and it doesn't always succeed. I turn on the tread, push Start on tread, open QZ, set the countdown timer on my Apple Watch and if it gets to 1 minute without displaying speed, I reboot QZ and try again. Sometimes it works first try, sometimes it takes 2-3 attempts.
yes probably replacing the connecting label with a "hold on, qz is initing your treadmill..." or something
So, in these latest builds -- that is kind of there -- QZ is displaying "Connecting..." --- what would be good is when its completed, that it says "Connected" -- OR, does what the current production version of the app does -- display the treadmill name -- but only AFTER the connection is established and ready.
@RickNY yes as i told you the connecting thing it's a linux issue
@RickNY ok i guess i fixed the pause issue. Please pull it again and build. Thanks
Also, last night, I had an idea about the profiles that will solve also the long delay in the init phase. As soon as we're done with this pause issue, I would like to try to remove the profile writing, and see if the treadmill control could be achievable anyway
One thing at a time, my father always told me :)
OK, pause button seemed to work on this build.. However, once paused - I was unable to re-start through the app - and pressing start button on tread allowed the tread to resume - but QZ never reconnected after that and updated debug-Tue_Sep_6_07_11_46_2022.log.txt
OK.. Here is Start, Pause, Stop three times in a row after the initial connection. Dont know if this is relevant but after each Start there a 3 second countdown before the tread starts. horizon74_2a.zip
@RickNY in this file after the pause, the treadmill restart or it was just pause and then stop? I'm asking this because the treadmill wants a different frame to resume after the pause. If it's so i have to ask to collect another log with
start-pause-start-pause-start-pause-stop
Let me know
After starting the QZ app with a Horizon 7.4 AT-02 Treadmill running firmware version 5.001, the treadmill will start moving on its own approximately 30 seconds after the app is launched and connects. The treadmill sets itself to 0.5 mph along with a countdown timer for 30 minutes. The speed in the QZ app updates, but pressing the "Stop" button in the QZ app does not stop the treadmill when it has started this way. The only way to stop is to press the stop button on the treadmill itself. Note that this only occurs when the QZ app is connected, I could not reproduce this behavior with the Horizon AFG Pro app.
Treadmill is running firmware version Collected a debug log from a RPi when the action occurs.. Note on the Rpi the action took a bit longer than 30 seconds before the treadmill started on its own. debug-Fri_Sep_2_21_14_58_2022.log.txt