cagnulein / qdomyos-zwift

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

Cannot get data on the QZ iOS App from the QZ Companion running on the NordicTrack C990 #1405

Closed DaveInAus closed 1 year ago

DaveInAus commented 1 year ago

Installed QZ Companion App (via downloaded APK) on NordicTrack C990 - Selected 2950 Max 22 Speed Installed QZ Software on iOS iPhone and under Treadmill->Nordick Track set 2950 with IP 192.168.1.142

Can successfully ping treadmill using Fing from the iPhone Data is however 0 on the iPhone QZ app

Included debug data from iPhone App as well as wolflog from the C990.

debug-Sat-Apr-8-22-30-32-2023.log wolflogs 2023-04-08_logs.txt

cagnulein commented 1 year ago

hi @DaveInAus I checked the log. The QZ configuration is ok, but the issue is on the treadmill side, I can't see any chagned speed or any changed inclination in the wolflogs. Did you stop the workout before sending me the wolflogs? If so send me it before stop the workout beucase ifit will clear it after stopping the workout

Let me know and sorry for the delay and happy Easter!

DaveInAus commented 1 year ago

Hi @cagnulein I started the Treadmill in manual and it was running at 2kph with incline 0 (default) Looks as though this is in the wolf log [1] 27335689 05:44:53.4883 [Trace:FitnessConsole] Clamped Kph from 2 to 2. [1] 27335691 05:44:53.4904 [Trace:FitnessConsole] Clamped Grade from 0 to 0.

Do I need to change the speed so that the companion app can detect it?

Happy Easter to you to!

Cheers @DaveInAus

cagnulein commented 1 year ago

it's an easy one! do you see "clamped" instead of "changed"?

Happy easter to you too!

@DaveInAus @victorypoint

DaveInAus commented 1 year ago

@cagnulein is 'clamped' something the companion app should be looking for as well?

Just out of interest how does the qz companion app send incline data to the treadmill?

cagnulein commented 1 year ago

yes @DaveInAus the companion is parsing the log file and send it to the qz app. so if clamping is the word, i have to made this modification in the code because now i'm looking for changed.

let me do this!

DaveInAus commented 1 year ago

Excellent @cagnulein looking forward to the update however I'm away at the moment so will only be able to check in 4 weeks

cagnulein commented 1 year ago

👍

Il giorno mar 11 apr 2023 alle 10:54 DaveInAus @.***> ha scritto:

Excellent @cagnulein https://github.com/cagnulein looking forward to the update however I'm away at the moment so will only be able to check in 4 weeks

— Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/1405#issuecomment-1502937146, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWG6OUMWCAHK3GXRW7TXAUL5HANCNFSM6AAAAAAWXOFFQE . 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, here's a fresh logcat from my machine for a quick manual workout of speed and incline changes. "Clamped" does appear in the log but it doesn't appear to indicate any speed or incline change. See attached

logcat.txt

cagnulein commented 1 year ago

@victorypoint thanks!

@DaveInAus are you sure that the clamped lines in your log reflect the actual speed or incline of the treadmill?

DaveInAus commented 1 year ago

@cagnulein I'm pretty sure the Treadmill does start at 2kph in Manual Mode with 0% incline Looking at the log again I do see [10] 27329105 05:44:46.9044 [Trace:FitPro] Changed KPH to: 2

but I think you are looking for changes in [Trace:FitnessConsole] [6] 27349297 05:45:07.0965 [Trace:FitnessConsole] Kph changed from 2 to 0

@victorypoint - when you start in manual mode do you see the 2kph reflected in the QZ app before changing any settings on the treadmill?

victorypoint commented 1 year ago

@cagnulein, yes I do. QZ always shows the initial change from 0 to 2kph when a manual workout is started.

DaveInAus commented 1 year ago

Thanks @victorypoint

@cagnulein - must be another issue then. I think I can remember changing the incline with no change in the QZ data

cagnulein commented 1 year ago

debug-Sat-Apr-8-22-30-32-2023.log wolflogs 2023-04-08_logs.txt

in this log, the communication from QZ companion to QZ works but the messages are empty, this means that the QZ companion can't read anything useful in the wolflogs. In the wolflogs, I see this

[10] 27329105 05:44:46.9044 [Trace:FitPro] Changed KPH to: 2
[10] 27348973 05:45:06.7717 [Trace:FitPro] Changed KPH to: 0

but the timestamp is not matchig the log of the QZ log. Is the timestamp aligned between the 2 of them? If you want you can screenshot me the text box in the QZ companion app pressing the log button in the QZ companion after a quick run so we can see what it's doing

Let me know

victorypoint commented 1 year ago

@DaveInAus, try this script instead to capture logcat as a Livestream. Copy it to your Companion install folder and make sure to run the script just before you begin a manual workout and let it run during workout. Enable the Increase logcat size line if needed. Hope it helps.

get-logcat.zip

DaveInAus commented 1 year ago

@cagnulein and @victorypoint

Thanks for the update Currently away on business. Will be home mid-May and provide some feedback

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

DaveInAus commented 1 year ago

Hi @victorypoint Ran the logcat but get the error cannot connect to 192.168.1.142:5555: No connection could be made because the target machine actively refused it. (10061) It does ping successfully and no logcat.txt is generated

Also - I viewed the Wolflog and all is getting set correctly as I change settings on the Treadmill [5] 253363244 22:34:37.7785 [Trace:FitPro] Changed KPH to: 2.1 [5] 253363246 22:34:37.7804 [Trace:Workout] Not recording Watts value of Sindarin.Core.Facades.ConsoleStateValues at time 3 because the console info is not trustworthy. [5] 253363248 22:34:37.7823 [Trace:FitPro] Changed Watts to: 108 [5] 253363250 22:34:37.7842 [Trace:Workout] Not recording CurrentDistance value of Sindarin.Core.Facades.ConsoleStateValues at time 3 because the console info is not trustworthy. [5] 253363252 22:34:37.7861 [Trace:Workout] SetMeters 1 [5] 253363254 22:34:37.7885 [Trace:Workout] Not recording CurrentCalories value of Sindarin.Core.Facades.ConsoleStateValues at time 3 because the console info is not trustworthy. [40] 253363449 22:34:37.9832 [Trace:FitnessConsole] Kph changed from 2 to 2.1 [44] 253363539 22:34:38.0734 [Trace:Workout] Not recording CurrentDistance value of Sindarin.Core.Facades.ConsoleStateValues at time 3 because the console info is not trustworthy. [44] 253363543 22:34:38.0773 [Trace:Workout] SetMeters 1 [39] 253363832 22:34:38.3666 [Trace:Workout] SetMeters 1 [39] 253363834 22:34:38.3687 [Trace:FitPro] Commands sent: 514650 [4] 253363921 22:34:38.4559 [Trace:Workout] Set current time (r) to 4 from RunningTime 4 and PauseOverrideTime 0 [4] 253363923 22:34:38.4574 [Trace:Workout] ConsoleStateStats is entering the Running state, time is 4 [4] 253363954 22:34:38.4888 [Trace:FitPro] KeyCode observed: [KeyObj Code:SpeedUp, RawKeyCode:18446744073709534975, TimePressed:12, TimeHeld:110] [37] 253364109 22:34:38.6437 [Trace:Usb] Successful Read Requests: 514325 [37] 253364123 22:34:38.6577 [Trace:FitPro] Changed KPH to: 2.2 [37] 253364125 22:34:38.6595 [Trace:Workout] SetMeters 1 [42] 253364215 22:34:38.7491 [Trace:FitPro] KeyCode observed: [KeyObj Code:NoKey, RawKeyCode:18446744073709551615, TimePressed:0, TimeHeld:0] [43] 253364317 22:34:38.8513 [Trace:FitnessConsole] Kph changed from 2.1 to 2.2 [10] 253364403 22:34:38.9373 [Trace:FitPro] Changed Watts to: 109 [10] 253364405 22:34:38.9392 [Trace:Workout] SetMeters 1 [41] 253364891 22:34:39.4255 [Trace:Workout] SetMeters 1 [5] 253364982 22:34:39.5161 [Trace:Workout] Set current time (r) to 5 from RunningTime 5 and PauseOverrideTime 0 [39] 253365171 22:34:39.7054 [Trace:FitPro] Changed KPH to: 2.3 [39] 253365173 22:34:39.7078 [Trace:FitPro] Changed Watts to: 110 [39] 253365175 22:34:39.7096 [Trace:Workout] SetMeters 1 [37] 253365366 22:34:39.9010 [Trace:FitnessConsole] Kph changed from 2.2 to 2.3 [40] 253365453 22:34:39.9874 [Trace:FitPro] Changed KPH to: 2.4 [40] 253365456 22:34:39.9904 [Trace:Workout] SetMeters 1 [10] 253365545 22:34:40.0792 [Trace:FitPro] KeyCode observed: [KeyObj Code:SpeedUp, RawKeyCode:18446744073709551615, TimePressed:13, TimeHeld:140] [22] 253365647 22:34:40.1812 [Trace:FitnessConsole] Kph changed from 2.3 to 2.4 [41] 253365733 22:34:40.2673 [Trace:Workout] SetMeters 1 [4] 253365822 22:34:40.3569 [Trace:Workout] Set current time (r) to 6 from RunningTime 6 and PauseOverrideTime 0 [4] 253365827 22:34:40.3613 [Trace:FitPro] KeyCode observed: [KeyObj Code:NoKey, RawKeyCode:18446744073709551615, TimePressed:0, TimeHeld:0] [46] 253366010 22:34:40.5442 [Trace:Workout] SetMeters 1 [39] 253366290 22:34:40.8242 [Trace:FitPro] Changed Watts to: 112 [39] 253366295 22:34:40.8293 [Trace:Workout] SetMeters 1 [44] 253366571 22:34:41.1052 [Trace:Workout] SetMeters 1 [39] 253366658 22:34:41.1929 [Trace:Workout] Set current time (r) to 7 from RunningTime 7 and PauseOverrideTime 0 [39] 253366666 22:34:41.2003 [Trace:FitPro] KeyCode observed: [KeyObj Code:InclineUp, RawKeyCode:18446744073709550335, TimePressed:14, TimeHeld:60] [6] 253366853 22:34:41.3874 [Trace:FitPro] Changed Grade to: 0.5 [6] 253366857 22:34:41.3916 [Trace:Workout] SetMeters 1 [39] 253366946 22:34:41.4802 [Trace:FitPro] KeyCode observed: [KeyObj Code:NoKey, RawKeyCode:18446744073709551615, TimePressed:0, TimeHeld:0] [45] 253367049 22:34:41.5832 [Trace:FitnessConsole] Grade changed from 0 to 0.5 [37] 253367137 22:34:41.6712 [Trace:FitPro] Changed Grade to: 1 [37] 253367140 22:34:41.6748 [Trace:Workout] SetMeters 2 [10] 253367241 22:34:41.7760 [Trace:FitPro] KeyCode observed: [KeyObj Code:InclineUp, RawKeyCode:18446744073709550335, TimePressed:15, TimeHeld:200] [39] 253367346 22:34:41.8805 [Trace:FitnessConsole] Grade changed from 0.5 to 1

Thanks

cagnulein commented 1 year ago

@DaveInAus adb is enabled on your treadmill tablet ? anyway the wolflog is fine, i can see the speed and grade. what about the companion log? if you press the dump log button in the companion when the workout is running, do you see something in the textbox below the button? send me some screenshot. In QZ main app you're still seeing the tiles all to 0?

DaveInAus commented 1 year ago

@cagnulein - adb debugging is enabled on the treadmill. how does one dump that log again?

cagnulein commented 1 year ago

@DaveInAus simply pressing the dump log button in the QZ companion app during a workout

DaveInAus commented 1 year ago

@cagnulein - still 0 values in the log - but messages are being received from the Treadmill - 192.168.1.142 debug-Mon-May-15-17-12-08-2023.log

cagnulein commented 1 year ago

@DaveInAus this is the log from the QZ MAIN app, i need the log from the companion in order to identify the issue. Press the dump log button in the companion and at least send me some photos. thanks

DaveInAus commented 1 year ago

@cagnulein - find attached latest wolflog dumpfile and photo of screen 2023-05-15_logs.txt unnamed

cagnulein commented 1 year ago

ok the file from the companion was correct @DaveInAus after that 8:28 line in the companion there are others? because in the log file, the log ends at 8:22 so it seems that the workout was early than the log in the companion.

What I need to see if it's the companion is parsing correctly the file when the workout is in progress

DaveInAus commented 1 year ago

@cagnulein - log with changing speed and incline 2023-05-15_logs.txt

cagnulein commented 1 year ago

@DaveInAus maybe my italianenglish is bad :) what i need it's both logs: QZ Companion and log from the tablet of the same workout, because it seems that the companion can't parse the wolflogs (even if the log is correct)

DaveInAus commented 1 year ago

@cagnulein - here's from my iphone (QZ) and companion app (Treadmill) at the same time for a 1 minute 'workout' :) 2023-05-15_logs.txt debug-Mon-May-15-19-04-31-2023.log

cagnulein commented 1 year ago

@DaveInAus i don't know how to say it :) i mean i need the QZ Companion log :) the https://github.com/cagnulein/qdomyos-zwift/files/11476171/2023-05-15_logs.txt is not the companion log, but instead is the treadmill tablet log (useful, but we already saw that the wolflog is acting right).

So in a session like you just did, collect these 2 files PLUS the "dump log" button from the companion app. The companion app, writes the log on the screen (in the text box) and also in the /sdcard/logcat.txt file

Let me know

DaveInAus commented 1 year ago

@cagnulein ok i think this may be part of the problem - there is no logcat.txt file anywhere on the treadmill sd card

cagnulein commented 1 year ago

@DaveInAus did you press the dump log button in the companion while the workout is running ? if so the text box in the companion is populated?

DaveInAus commented 1 year ago

@cagnulein image

Won't write any log file and the same message

cagnulein commented 1 year ago

@DaveInAus I guess I got the issue: can you try to set the companion to the c1750 and restart the treadmill and so the companion? the photo shows me an error in the parsing. Let me know!

DaveInAus commented 1 year ago

@cagnulein thanks for all your patience! C1750 is the answer to a C990 - maybe I did try this at a stage but did not restart the treadmill :)

image

cagnulein commented 1 year ago

yeah!

victorypoint commented 1 year ago

This is excellent news fellas! Sorry I missed out on all the chatter as I was off in another city running a marathon. -Al

DaveInAus commented 1 year ago

Hi @cagnulein, @victorypoint

I have found I need to restart the treadmill before a workout, otherwise it won't automatically connect. If I restart the qz app on my phone it makes no difference, I need to restart the treadmill which is restarting the companion app. I did also see a message box that the companion app stopped working.

It would be good to be able to dump the log to the logcat.txt file and have more realestate at the bottom of the companion app window. The log takes up 3/4 of the screen

cagnulein commented 1 year ago

It would be good to be able to dump the log to the logcat.txt file and have more realestate at the bottom of the companion app window. The log takes up 3/4 of the screen

maybe the QZ Companion doesn't have the premission for write the file? did you check it?

victorypoint commented 1 year ago

Hi @cagnulein, @victorypoint

I have found I need to restart the treadmill before a workout, otherwise it won't automatically connect. If I restart the qz app on my phone it makes no difference, I need to restart the treadmill which is restarting the companion app. I did also see a message box that the companion app stopped working.

It would be good to be able to dump the log to the logcat.txt file and have more realestate at the bottom of the companion app window. The log takes up 3/4 of the screen

@DaveInAus, can you provide a bit more clarity on this. Do you need to restart the treadmill in order to see the QZ tiles update current speed and incline? Do you need to restart treadmill to control speed and incline from QZ (speed and incline +- buttons)? Or both?

stale[bot] commented 1 year ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

cagnulein commented 1 year ago

@DaveInAus are you still interested on this?