cagnulein / qdomyos-zwift

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

X22i Not staying connected via ADB #2493

Closed bwthomas77 closed 2 months ago

bwthomas77 commented 4 months ago

Describe the bug The QZ companion has trouble staying connected to the Treadmill. I have an NordicTrac X22i. I have tried multiple hard resets. I have never been able to get the PC running Zwift to be able to control incline or speed or from the +/- buttons on the app. The app is able to read the speed and inclination data and that is being sent to Zwift

To Reproduce Steps to reproduce the behavior:

  1. Install QZ Companion using instructions given. Both with and without updates. Both on my EERO network and on the AT&T router.
  2. Install via ADB goes fine
  3. After install I get errors that it cannot connect via ADB.

Expected behavior Treadmill consistently connects and is able to change speed and incline (slide bars active) adb debug output.txt adb shell input message.txt dumpsys.log logcat.txt Tue07-23-2024@17-31-21 16

Screenshots Tue07-23-2024@17-31-21 16

Desktop (please complete the following information):

Smartphone (please complete the following information):

Append a debug log

adb debug output.txt adb shell input message.txt dumpsys.log logcat.txt

Additional context The problem seems to be the companion app lists the device as offline even though it successfully pings. offline transport_id:1, I cannot seem to get to the root of this problem.

cagnulein commented 4 months ago

the problem seems adb, are you able to connect at all to the treadmill via adb from your pc?

bwthomas77 commented 4 months ago

the problem seems adb, are you able to connect at all to the treadmill via adb from your pc?

I am always able to connect on first try after hard reset. After that things don't seem to connect, continue to get device offline errors despite IP pinging fine

bwthomas77 commented 4 months ago

After this most recent install only speed data was showing, incline did not

At one point I could control the fan with the app, but that no longer works either.

cagnulein commented 4 months ago

did you try to reset to factory reset WITHOUT updating ifit app?

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

Il giorno gio 1 ago 2024 alle 17:49 bwthomas77 @.***> ha scritto:

the problem seems adb, are you able to connect at all to the treadmill via adb from your pc?

I am always able to connect on first try after hard reset. After that things don't seem to connect, continue to get device offline errors despite IP pinging fine

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

bwthomas77 commented 4 months ago

Yes, similar behavior. Also without updating the sliders are not available.

cagnulein commented 4 months ago

the sliders must be enabled in the ifit settings , they are disabled by default.

another trick would be allowing the qz companion root access so you shouldn't adb at all then. are you able to do so?

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

Il giorno gio 1 ago 2024 alle 17:52 bwthomas77 @.***> ha scritto:

Yes, similar behavior. Also without updating the sliders are not available.

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

bwthomas77 commented 4 months ago

Do you have written instructions on how to give root access? I'm not very familiar with android...

cagnulein commented 4 months ago

Let me try first another approach based on the accessibility service. I will try to implement now

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

Il giorno gio 1 ago 2024 alle 19:27 bwthomas77 @.***> ha scritto:

Do you have written instructions on how to give root access? I'm not very familiar with android...

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

cagnulein commented 4 months ago

which android version have this treadmill?

cagnulein commented 4 months ago

ok @bwthomas77 done i added a new device in the companion app called x22i no adb. once you will click it it will prompt to enable the accessibility service. Enable it (you need to enable this at every startup, i don't know why it doesn't save it, but first of all, let's see if it works).

Then do this:

Let me know!

New apk: https://github.com/cagnulein/QZCompanionNordictrackTreadmill/actions/runs/10204085440/artifacts/1766251655

bwthomas77 commented 4 months ago

Will do

Android is 7.1.2

From: Roberto Viola @.> Sent: Thursday, August 1, 2024 2:56 PM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

ok @bwthomas77https://github.com/bwthomas77 done i added a new device in the companion app called x22i no adb. once you will click it it will prompt to enable the accessibility service. Enable it (you need to enable this at every startup, i don't know why it doesn't save it, but first of all, let's see if it works).

Then do this:

Let me know!

New apk: https://github.com/cagnulein/QZCompanionNordictrackTreadmill/actions/runs/10204085440/artifacts/1766251655

- Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2263754414, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWB34PUJDHEGIJFNB5DZPKADXAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRTG42TINBRGQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

bwthomas77 commented 4 months ago

Success, touch inputs work now.

I haven’t tried a Zwift workout yet but will report

Sent from my iPhone

On Aug 1, 2024, at 15:33, Brad Thomas @.***> wrote:

 Will do

Android is 7.1.2

From: Roberto Viola @.> Sent: Thursday, August 1, 2024 2:56 PM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

ok @bwthomas77https://github.com/bwthomas77 done i added a new device in the companion app called x22i no adb. once you will click it it will prompt to enable the accessibility service. Enable it (you need to enable this at every startup, i don't know why it doesn't save it, but first of all, let's see if it works).

Then do this:

Let me know!

New apk: https://github.com/cagnulein/QZCompanionNordictrackTreadmill/actions/runs/10204085440/artifacts/1766251655

— Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2263754414, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWB34PUJDHEGIJFNB5DZPKADXAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRTG42TINBRGQ. You are receiving this because you were mentioned.Message ID: @.**@.>>

cagnulein commented 4 months ago

OMG really!? That's an amazing news!

bwthomas77 commented 3 months ago

Tested it out this evening with Zwift, iPhone app controls working. I actually didn’t have to reselect the no and option on the treadmill. The increments for elevation are a little strange, increases by 6,5 degrees when pressing plus on app. Goes down bye one. The Zwift elevation isn’t communicating from the pc to the iPhone app however.

Otherwise this is definitely a huge improvement as I couldn’t get app to control previously Thanks Brad Sent from my iPhone

On Aug 5, 2024, at 00:25, Roberto Viola @.***> wrote:



OMG really!? That's an amazing news!

— Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2268146507, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWDF2LLG46QPFELSNJLZP35DXAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENRYGE2DMNJQG4. You are receiving this because you were mentioned.Message ID: @.***>

cagnulein commented 3 months ago

I actually didn’t have to reselect the no and option on the treadmill.

great, that's a good news

The increments for elevation are a little strange, increases by 6,5 degrees when pressing plus on app. Goes down bye one.

i will check the coordinates, i used the ones that I had already implemented.

The Zwift elevation isn’t communicating from the pc to the iPhone app however.

did you add your zwift credentials in qz on the iphone? you must have the 2.16 version on iphone. if you don't have send me an email to roberto.viola83 at gmail.com indicating this ticket and I will send you it.

cagnulein commented 3 months ago

got the inclination issue, does your treadmill has negative inclination? @bwthomas77 if so which is the minimum one?

bwthomas77 commented 3 months ago

Yes, the range is -6 to 40 degrees

From: Roberto Viola @.> Sent: Tuesday, August 6, 2024 2:51 AM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

got the inclination issue, does your treadmill has negative inclination? @bwthomas77https://github.com/bwthomas77 if so which is the minimum one?

- Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2270514135, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWHCQZM4XB7WM3OB75DZQBW6JAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGUYTIMJTGU. You are receiving this because you were mentioned.Message ID: @.**@.>>

cagnulein commented 3 months ago

ok try this https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/3.4.4/QZCompanionNordictrackTreadmill.apk

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

Il giorno mar 6 ago 2024 alle ore 12:21 bwthomas77 @.***> ha scritto:

Yes, the range is -6 to 40 degrees

From: Roberto Viola @.> Sent: Tuesday, August 6, 2024 2:51 AM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

got the inclination issue, does your treadmill has negative inclination? @bwthomas77https://github.com/bwthomas77 if so which is the minimum one?

- Reply to this email directly, view it on GitHub< https://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2270514135>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADRIAWHCQZM4XB7WM3OB75DZQBW6JAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGUYTIMJTGU

. You are receiving this because you were mentioned.Message ID: @.**@.>>

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

bwthomas77 commented 3 months ago

Thanks

Downloaded new iOS app.

Two things: When I press the up or down button on inclincation on the app the treadmill goes up by 5.5 or so degree increments.

When I enter by zwift credentials, the app stops talking to the pc running zwift.

-Brad

From: Roberto Viola @.> Sent: Tuesday, August 6, 2024 7:46 AM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

ok try this https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/3.4.4/QZCompanionNordictrackTreadmill.apk

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

Il giorno mar 6 ago 2024 alle ore 12:21 bwthomas77 @.<mailto:@.>> ha scritto:

Yes, the range is -6 to 40 degrees

From: Roberto Viola @.<mailto:@.>> Sent: Tuesday, August 6, 2024 2:51 AM To: cagnulein/qdomyos-zwift @.<mailto:@.>> Cc: bwthomas77 @.<mailto:@.>>; Mention @.<mailto:@.>> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

got the inclination issue, does your treadmill has negative inclination? @bwthomas77https://github.com/bwthomas77 if so which is the minimum one?

- Reply to this email directly, view it on GitHub< https://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2270514135>, or unsubscribe< https://github.com/notifications/unsubscribe-auth/ADRIAWHCQZM4XB7WM3OB75DZQBW6JAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQGUYTIMJTGU

. You are receiving this because you were mentioned.Message ID: @.**@.mailto:***@***.******@***.***>>

- Reply to this email directly, view it on GitHub https://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2270927874, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAALYWHEP4OPVJQS7EZCOJTZQCPTVAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZQHEZDOOBXGQ . You are receiving this because you were assigned.Message ID: @.<mailto:@.>>

- Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2271094449, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWF5XQTN53TU6USQ73DZQCZQJAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENZRGA4TINBUHE. You are receiving this because you were mentioned.Message ID: @.**@.>>

cagnulein commented 3 months ago

The zwift credentials should be unrelated to the communication with zwift, check again.

for the inclination i will check again the coordinates, i'm in vacation for the next 15 days so I will do my best

cagnulein commented 3 months ago

sorry for the delay, i'm on vacation , here there is a new one https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/3.4.5/QZCompanionNordictrackTreadmill.apk

bwthomas77 commented 3 months ago

Thanks Robert,

No rush, whenever you get done with vacation.

Here's whats happening:

  1. The new companion app does not seem to be mapped correctly. When I press the elevation button on the iOS app it brings up the controls so must be pushing the white space somewhere. Speed works.
  2. Running a Zwift run on this setup, the inclincation does not translate to the iOS app. The speed data goes from the treadmill to the zwift running on PC but seems to intermittently drop.
  3. Interestingly I ran a test session before updating the companion app while I was riding my bike in Zwift on a TACX NEO 2. The inclination from the bike ride was moving the treadmill up and down (at about double the inclination that zwift was showing). This was without the wahoo tread as the input as it was connected to my tacx. Thanks, Brad

@. From: Roberto Viola @.> Sent: Wednesday, August 14, 2024 9:28 AM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.***> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

sorry for the delay, i'm on vacation , here there is a new one https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/3.4.5/QZCompanionNordictrackTreadmill.apk

- Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2288744557, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWBBFATF3NN26OTMNBLZRNLNLAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOBYG42DINJVG4. You are receiving this because you were mentioned.Message ID: @.**@.>>

cagnulein commented 3 months ago

Ok let's first the inclination coordinates first, then will check zwift. I will check again the coordinates in these days

cagnulein commented 3 months ago

ok i guess i got the error in the coordinates, try this https://github.com/cagnulein/QZCompanionNordictrackTreadmill/releases/download/3.4.6/QZCompanionNordictrackTreadmill.apk

cagnulein commented 3 months ago

Running a Zwift run on this setup, the inclincation does not translate to the iOS app. The speed data goes from the treadmill to the zwift running on PC but seems to intermittently drop.

you need to add the zwift credentials on qz for this @bwthomas77

bwthomas77 commented 3 months ago

The mapping now works! I can raise and lower the inclination from the app.

My Zwift credentials have been entered since I got the beta app that has that option, I don't think that is the issue. I may have had one of the options checked below that was? I will try again today.

From: Roberto Viola @.> Sent: Thursday, August 15, 2024 4:21 AM To: cagnulein/qdomyos-zwift @.> Cc: bwthomas77 @.>; Mention @.> Subject: Re: [cagnulein/qdomyos-zwift] X22i Not staying connected via ADB (Issue #2493)

Running a Zwift run on this setup, the inclincation does not translate to the iOS app. The speed data goes from the treadmill to the zwift running on PC but seems to intermittently drop.

you need to add the zwift credentials on qz for this @bwthomas77https://github.com/bwthomas77

- Reply to this email directly, view it on GitHubhttps://github.com/cagnulein/qdomyos-zwift/issues/2493#issuecomment-2290873896, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ADRIAWACRBBUGB6OKY7557LZRRQGLAVCNFSM6AAAAABL2WYS6WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDEOJQHA3TGOBZGY. You are receiving this because you were mentioned.Message ID: @.**@.>>

cagnulein commented 3 months ago

Great! Show me the options, you have to attach the image on github.com interface directly otherwise I can't see them

stale[bot] commented 2 months 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 2 months ago

@bwthomas77 are we ok with this?