cagnulein / qdomyos-zwift

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

iFit Virtual Device Implementation #441

Open jonathancolledge opened 2 years ago

jonathancolledge commented 2 years ago

iFit can't connect to QZ. it sees a machine called I_EB, but can't connect to it. EDIT: i_EB may not be QZ my rower saw that when QZ was off - it looks like ifit can't see any device. I have Virtual iFit turned on

Of note I'm using a Concept2 Rowing Erg with PM5 (my elliptical is in storage as we have moved to a smaller house). QZ connects to the PM5' but says connecting all the time...

debug-Tue_Sep_14_03_56_12_2021.log

hoveeman commented 2 years ago

@cagnulein that is great news! Good job! No rush on this as always!

cagnulein commented 2 years ago

@hoveeman actually ios to ios is a very hard thing, i don't understand what's wrong. Anyway

hoveeman commented 2 years ago

@cagnulein crazy! I will give it a try with iOS to Android and android to iOS.

I unfortunately won't have time to test until next week though. Thanks for the update!

cagnulein commented 2 years ago

@hoveeman no rush at all, i would like only to inform about the possibility:)

BCarltonMarine commented 2 years ago

Hope I did this right!

cagnulein commented 2 years ago

@BCarltonMarine i don't see the file at all. You need to attach it from a PC or MAC

BCarltonMarine commented 2 years ago

Says it's too big!

cagnulein commented 2 years ago

@BCarltonMarine compress it

BCarltonMarine commented 2 years ago

debug-Thu_Mar_31_10_57_55_2022.zip

cagnulein commented 2 years ago

@BCarltonMarine did you try a manual workout on the ifit app? do you have the same behaviour? it disconnect every 2 precise minute? describe me in the detail your issue. thanks

BCarltonMarine commented 2 years ago

Connecting to and pairing the bike all works fine at first. Here's what I'm noticing. It 1st asked me in the left hand corner on my ipad to join or follow the trainer. This icon is consistently popping up nonstop. The smart adjust kicks in right away but then I also noticed that the cadence begins to hang on the Ifit screen. Shortly after that, it starts to hang on losing the Bluetooth connection. Also I am not sure what the conversion is on the resistance but it seems pretty tough. I'm not sure what it should read in the qz app as opposed to the ifit screen . I'll be happy to do a video for you

cagnulein commented 2 years ago

yes thanks @BCarltonMarine a video will be very helpful. try also a manual workout. I would like to know if you see the same error there. Since i'm not a iFit subscriber, i tested it only with that part of iFit app. Thanks

Dredd2099 commented 2 years ago

Here's my log for not seeing anything to connect to on android debug-Thu_Mar_31_08_29_21_2022.log

If you need access to iFit, my offer of a spot in my fam account still stands and no I won't have access to your 'account' if privacy is an issue 😁

cagnulein commented 2 years ago

@Dredd2099 I checked your log and this is the root cause

Thu. Mar. 31 08:29:33 2022 1648729773783 Debug: ../src/virtualbike.cpp void virtualbike::error(QLowEnergyController::Error) "virtualbike::controller:ERROR AdvertisingError"

It seems that this phone can't bring up the virtual ifit interface. Are you using this one also with peloton or zwift?

For the family account, if it's not an issue for you, it could be a great idea. send me an email to roberto.viola83 at gmail.com and we can setup it. My only doubt is that iFit app could send different things while it's running a composed workout instead of a manual one (probably the @BCarltonMarine issue). Thanks!

Dredd2099 commented 2 years ago

@Dredd2099 I checked your log and this is the root cause

Thu. Mar. 31 08:29:33 2022 1648729773783 Debug: ../src/virtualbike.cpp void virtualbike::error(QLowEnergyController::Error) "virtualbike::controller:ERROR AdvertisingError"

It seems that this phone can't bring up the virtual ifit interface. Are you using this one also with peloton or zwift?

Hey Mr Roberto,

Yup. Tried on multiple android devices (phones and tablets), it just doesn't like me at all.

Will be sending iFit invite to the email that you provided.

cagnulein commented 2 years ago

@Dredd2099 are you using these devices for zwift or peloton too? Thanks for the invite!

Dredd2099 commented 2 years ago

@cagnulein no I don't use it actively for peloton but it's currently installed.

cagnulein commented 2 years ago

thanks for the membership @Dredd2099 but i don't think it could work. If I click on the mail that I received from iFit i got this

Screenshot 2022-04-01 at 21 54 45

about your device issues, your devices are renamed to "I_EB" ? (i don't remember if I already asked this)

Dredd2099 commented 2 years ago

@cagnulein yes sir, renamed to I_EB. Think I got it though, it looks like my HR band (bluetooth) is the culprit. If I have it off, I'll be able to see and connect eventually. Just have to be patient or retry connecting a few times. I'll try using other devices again to see if I get a more stable and repeatable results. Ty sir.

For iFit, you logging on with your current account? It requires an existing account as far as I can tell. If you need to setup a new one with new email just let me know and I'll resend the invite. My brother had the same issue when he tried accepting the invite too.

cagnulein commented 2 years ago

@Dredd2099 Ok let me know if with other devices are better.

Yes roberto.viola83 at gmail.com was already an ifit account. Maybe you can remove that one and add cagnulein at libero.it (not an ifit account yet). Thanks

Dredd2099 commented 2 years ago

I made a video that I think covers mr @BCarltonMarine issue as well

Bluetooth disconnection issues https://youtu.be/VN9HjIPp9CU

Stats discrepancy https://youtu.be/o5sIKOSo220

During a workout, if iFit loses connection but gets reconnected again

Constant

Devices: Mix of chromebook /android tablets/android phones

cagnulein commented 2 years ago

thanks @Dredd2099 do you have also a debug log from that session? I'm quite sure that during a structured workout there is a packet that I didn't manage (since I tried only manual workout)

cagnulein commented 2 years ago

@Dredd2099 is possible that the problem starts when the elapsed on QZ is about 4:15 ?

Dredd2099 commented 2 years ago

@cagnulein my whole intention was to provide a log to go with the videos but I did so much mix, matching and multiple runs that I did not know which is which anymore, my apologies 😅

I'll grab logs on next set of tests. Interesting observation on 4:15 QZ time, I'll keep that in mind and watch out for it. Ty sir.

cagnulein commented 2 years ago

@Dredd2099 no problem at all :D Also i discovered that I have 1 free month on my iOS device for iFit, so i will try to use it in the next days. I hope to bring you some good news in the next days ;)

Dredd2099 commented 2 years ago

@cagnulein can I post some qz ifit test videos on FB group? The excitement is real 😁 also, what's the iOS version number supposed to be?

Sweet on ifit membership, you can accept my membership invitation before it runs out then.

cagnulein commented 2 years ago

can I post some qz ifit test videos on FB group? The excitement is real 😁

@Dredd2099 absolutely! Go on!

also, what's the iOS version number supposed to be?

2.10 series that will be public when we will have a stable experience here and on #756

Sweet on ifit membership, you can accept my membership invitation before it runs out then.

yeah I tried again and no luck :( do you think I can ask to the iFit support or maybe we will run into legal issue since i'm not part of your "family"?

cagnulein commented 2 years ago

ok good news! I see the issue myself, i'm trying to fix it :)

cagnulein commented 2 years ago

fixed @Dredd2099 ! i will try to release now (10pm here :) )

cagnulein commented 2 years ago

@Dredd2099 released and sent to you. let me know!

Dredd2099 commented 2 years ago

Wow, that was quick. Will get on testing as soon as I can. Ty sir.

Edit: Haven't gotten it yet, store update seems to be taking longer than usual.

For iFit, it says log on to account on computer then settings, secondary user then accept from there. Hope that helps. I can resend invite if needed.

cagnulein commented 2 years ago

@Dredd2099 today i did my first full ride with iFit! QZ on iOS and Android tablet for iFit! Everything works great except 2 minor thing: 1) when ifit tries to connect to my separate HR it hangs, i just power off my hr. I don't know why, but I guess it's not a QZ issue 2) when i pressed stop on iFit a new frame has been sent, so i have to manage this also

Except for that, everything was amazing and i like the iFit platform more than the peloton one!

Did you find the time to try it yourself?

cagnulein commented 2 years ago

update: stop command implemented! it will be in the 2.10.61 ;)

cagnulein commented 2 years ago

another thing that i have to fix it's the odometer but it's easy, i'm sending kilometers instead of meters

Dredd2099 commented 2 years ago

So exciting. Waiting on my app to update so I can take a ride and check out all the bug stomping goodness 😁

cagnulein commented 2 years ago

@Dredd2099 it's important that you do a small test with the version that i sent you yesterday. Just to double check everything. I also fixed the mileage now!

jonathancolledge commented 2 years ago

I've just tried this and it keeps trying to start me on a manual iFit workout immediately after connecting to the bike. I'll try and restart everything and see if it'll let me select a workout...

cagnulein commented 2 years ago

@jonathancolledge on raspberry? i didn't build the new beta on android yet. It's strange because the bonding with the bike is after the workout selection. Probably we are doing different steps

jonathancolledge commented 2 years ago

Ah the only way I can see unlocked workouts is to pair in the app before selecting a workout - most are still locked, but some aren't. It worked once, then started to bump me in to a manual iFit workout every other time I tried. I have a log, I can send, but oddly my Pi doesn't like uploading right now!

cagnulein commented 2 years ago

@jonathancolledge yes I saw that too: if I pair the bike once, then QZ is always sending to iFit that the bike is starting, so is keeping to send start messages to iFit.

Do you have a premium account on iFit? I had your issue when i used a free account on iFit No need for the log, i know where the problem is

jonathancolledge commented 2 years ago

Ah, OK, yes I have a free account. On the Raspberry. I managed to start one ride (Devil's Thumb Ranch ride, but it was flat and I can't get access to another). I am waiting for them to give a 20% discount for Easter or something. I might email and ask for an Easter discount - you never know, they might say yes!

cagnulein commented 2 years ago

@jonathancolledge on ios i did a 1 month free, it's really good (I like it more than peloton actually)

Dredd2099 commented 2 years ago

I've just tried this and it keeps trying to start me on a manual iFit workout immediately after connecting to the bike. I'll try and restart everything and see if it'll let me select a workout...

I've had this issue if I pair from settings. I now choose a workout first then pair there once it asks 😁

cagnulein commented 2 years ago

@Dredd2099 yes exactly :) were you be able to try the last version that i send you?

Dredd2099 commented 2 years ago

Not yet mr Roberto. Both my iOS and Android devices refusing the update you pushed. Not sure what's happening 😅

hoveeman commented 2 years ago

@cagnulein Sorry for being out of pocket on here for a little over a week! I will have some availability this weekend to test if you'd like me to. As a reminder, I have both iOS and Android devices and should be able to test this. I would need the updates to the app though.

cagnulein commented 2 years ago

Not yet mr Roberto. Both my iOS and Android devices refusing the update you pushed. Not sure what's happening 😅

what do you mean with "refusing"? anyway only the iOS one worth the try. The android one is old for this test

@hoveeman great! I will send you the new one this evening!

Dredd2099 commented 2 years ago

Not yet mr Roberto. Both my iOS and Android devices refusing the update you pushed. Not sure what's happening 😅

what do you mean with "refusing"? anyway only the iOS one worth the try. The android one is old for this test

iOS testflight keeps defaulting me back to 2.9.47 When you send to mr hoveeman, could you resend to me again please

cagnulein commented 2 years ago

yes sure @Dredd2099 but don't you see the new version in the test flight app?

cagnulein commented 2 years ago

@Dredd2099 @hoveeman new version sent!