cagnulein / qdomyos-zwift

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

[REQ] BH i-Nexor Bike support? #2441

Open LunarstarPony opened 2 months ago

LunarstarPony commented 2 months ago

Saw that the BH AirMag is supported so I wonder if the BH I-Nexor is supported as well?

If it's not would it be possible to support it? I would able to provide logs.

For now the bike doesn't even shows up in the Manual Devices section in the app, so couldn't really force it to connect. Interesting enough tho the phone seems to recognize the Bike as a Bluetooth Headset? Screenshot_20240711-001825

LunarstarPony commented 2 months ago

debug-Sat_Jul_13_04_01_17_2024.log Hopefully this would be enough, it took so long that the bike just went into Idle xD

cagnulein commented 2 months ago

unfortunately same issue. Could you please try again this version https://github.com/cagnulein/qdomyos-zwift/actions/runs/9887327347/artifacts/1689899592 ? it was the first one that worked, i would like to see if it's still working. By working i mean that it can connect to the bike. Thanks

LunarstarPony commented 2 months ago

So Somehow it appears that the BT Just exploded after a few test and a reboot is needed but anyway it seems to be working now? Not sure how that odometer works tho debug-Sat_Jul_13_04_20_57_2024.log

cagnulein commented 2 months ago

wow yes it's working! i can adjust the odometer then! amazing! 10pm here, tomorrow i would like to do a century ride on my bike alone, im going to bed.

i will catch up soon!

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

Il giorno ven 12 lug 2024 alle 22:24 LunarstarPony @.***> ha scritto:

So Somehow it appears that the BT Just exploded after a few test and a reboot is needed but anyway it seems to be working now? Not sure how that odometer works tho debug-Sat_Jul_13_04_20_57_2024.log https://github.com/user-attachments/files/16199013/debug-Sat_Jul_13_04_20_57_2024.log

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

LunarstarPony commented 2 months ago

No Worries! Sweet Dreams!

cagnulein commented 2 months ago

@LunarstarPony distance fixed https://github.com/cagnulein/qdomyos-zwift/actions/runs/9922394566

LunarstarPony commented 2 months ago

debug-Thu_Jul_11_23_50_53_2024.log Everything seems to be mostly functional besides the slow connection time and randomly just unable to connect without restart my phone while Kinomap seems to have no issue connecting it(

LunarstarPony commented 2 months ago

Also wrong log debug-Sun_Jul_14_04_21_14_2024.log

cagnulein commented 2 months ago

ok i will think about this. I suggest to try this version a few times to see if it's quite stable Let me know!

LunarstarPony commented 2 months ago

No worries I 'll test it later!

LunarstarPony commented 2 months ago

BTW You mention it was possible to extract the data out of the software for something else like VRC OSC l, is there any docs or example for that?

LunarstarPony commented 2 months ago

Will need to look into how to pass data from the software to my PC and PC to Software for my VRChat Workouts over the OSC Protocol

cagnulein commented 2 months ago

qz is streaming using the DIRCON protocol over wifi. I suggest to use this protocol for example. (the one that use the wahoo device, basically FTMS bluetooth over ethernet). Otherwise you can webserver from QZ, it's altready streaming the floating window for example. you can check the full address clicking on the settings, ui customization, open external window button Let me know

LunarstarPony commented 2 months ago

I'll look into it! Would it be possible to get this working while retaining software support like Kinomap at the same time?

cagnulein commented 2 months ago

Yes absolutely!'

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

Il giorno sab 13 lug 2024 alle 23:05 LunarstarPony @.***> ha scritto:

I'll look into it! Would it be possible to get this working while retaining software support like Kinomap at the same time?

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

cagnulein commented 2 months ago

I mean connecting the bike to qz and then qz to kinomap

LunarstarPony commented 2 months ago

Yeah How would I get QZ to connect to Kinomap?

cagnulein commented 2 months ago

simply connect qz to the bike and then on another device select ftms device on kinomap you will find the qz device

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

Il giorno sab 13 lug 2024 alle 23:13 LunarstarPony @.***> ha scritto:

Yeah How would I get QZ to connect to Kinomap?

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

cagnulein commented 2 months ago

Will need to look into how to pass data from the software to my PC and PC to Software for my VRChat Workouts over the OSC Protocol

do you mean this one https://www.oculus.com/experiences/app/1856672347794301/?utm_source=oculus&utm_medium=share ?

LunarstarPony commented 2 months ago

https://docs.vrchat.com/docs/osc-overview This is how VRC talks to any over devices usually via a software running on PCs or other network devices

cagnulein commented 2 months ago

i can add OSC to QZ but which message should I send? I mean how the counterpart can parse the data?

LunarstarPony commented 2 months ago

Far as I know VRC OSC Data usually have the naming like this (This is for Face Tracking), as long as the avatar is setup with the same parameter as the OSC it will be synced. image

LunarstarPony commented 2 months ago

Just confirm that VRC OSC usually Send on Port 9000 and listening on 9001, there's usually a settings you can use to change where the OSC data is send to, and as long as the Avatar have parameters with the same name it will be drive, so can name it something like "QZ/Resistant" or "QZ/Bike/Resistant" if it's a different entity for Treadmills, Bikes and stuff.

image

cagnulein commented 2 months ago

https://github.com/kaoskorobase/oscpp great, i found this and it can be added easily. I will do later this week Which are the metrics that you need at first?

LunarstarPony commented 2 months ago

For me mainly the basics like Resistant(Send & Listen), RPM, Wattage, Speed, Distance for bikes and for Treadmill mainly the Speed(Send & Listen) Durations, and distance

cagnulein commented 2 months ago

Ok I will try to add them. Are you a coder? Maybe I can set the basics for this and then you can continue the PR?

LunarstarPony commented 2 months ago

Unfortunately I'm currently not much of a coder myself :c

I do wanna learn at some point tho

ATM I usually mainly focus on Unity and some Blender for VRChat Avatars

cagnulein commented 2 months ago

hahah ok :) i was planning to add mqtt for home assistant. would it better? could i ask what would you like to do with vrchat and these metrics? are you able to do group workouts?

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

Il giorno dom 14 lug 2024 alle 10:38 LunarstarPony @.***> ha scritto:

Unfortunately I'm currently not much of a coder myself :c

I do wanna learn at some point tho

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

LunarstarPony commented 2 months ago

That is indeed what we do Group Workouts c:

We got a group of peps that do Workouts on VRC quite often (3 Times a Week just for biking not including all the regular workout and yoga we did), so I'm wanting to make something in Unity that would allow me to Control and show data directly from my bike or even eventually make a model of a bike that would change animation speed xD

For now we already got OSC Software that can take Heart Rate data from Smart Watches and show it in VRC Already

Here's a photo of we biking a few days ago c:

VRChat_2024-07-08_17-51-09 137_2560x1440

cagnulein commented 2 months ago

wow that sounds like a lot of fun!

cagnulein commented 2 months ago

started the branch https://github.com/cagnulein/qdomyos-zwift/pull/2449

cagnulein commented 2 months ago

@LunarstarPony done https://github.com/cagnulein/qdomyos-zwift/actions/runs/9928677236 it should send to the 9000 in broadcast the resistance under /QZ/Resistance if it works i will simply add all the metrics Let me know

LunarstarPony commented 2 months ago

Oops overslept

LunarstarPony commented 2 months ago

Pretty sure I need a settings to type in the IP so that it's not broadcasting on local host since this ain't running on the PC itself

LunarstarPony commented 2 months ago

And yes it is indeed a lot of fun! VRChat workout is actually what makes me want to do Workout tbh. Consider you have the scrcpy-quest project I'm ganna assume you have VR as well, maybe you can join us at some point xD

cagnulein commented 2 months ago

Pretty sure I need a settings to type in the IP so that it's not broadcasting on local host since this ain't running on the PC itself

nope i'm sending it in broadcast, you can already try

cagnulein commented 2 months ago

And yes it is indeed a lot of fun! VRChat workout is actually what makes me want to do Workout tbh. Consider you have the scrcpy-quest project I'm ganna assume you have VR as well, maybe you can join us at some point xD

yes i have but i don't like to do workouts on it :)

LunarstarPony commented 2 months ago

That's fair, I just find group workout more enjoyable x3

cagnulein commented 2 months ago

yeah the problem is the heat for me also with a fan :)

did you try the build?

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

Il giorno lun 15 lug 2024 alle 06:04 LunarstarPony @.***> ha scritto:

That's fair, I just find group workout more enjoyable x3

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

LunarstarPony commented 2 months ago

Unfortunately I did not have the bike with me ATM! I'll give it a try when I get home!< 3

LunarstarPony commented 2 months ago

image

Nuh I also doesn't recall anyone using OSC Broadcast either, usually OSC Query

cagnulein commented 2 months ago

maybe it doesn't accept the broadcast one. tell me the local ip of the pc, I will hard code it just for a try

LunarstarPony commented 2 months ago

192.168.214.51

LunarstarPony commented 2 months ago

Also do it report value without connecting to a bike so I could test it without turning on my bike?

cagnulein commented 2 months ago

it must be connected to the bike. otherwise you can enable the "fake device" setting in the experimental settings to fake the presence of the bike. remember to turn it off when you want to ride it for real. this is the new build with the hardcoded ip https://github.com/cagnulein/qdomyos-zwift/actions/runs/9938818910

LunarstarPony commented 2 months ago

Gotcha! I'll be testing it with the fake device since having to reboot my phone everytime testing is somewhat pain in da ass xD

LunarstarPony commented 2 months ago

image

Receiving seems to be working well!

cagnulein commented 2 months ago

amazing!!! I will do the other metrics then!

LunarstarPony commented 2 months ago

Would the Send be implemented? c: Also Thanks again as well! x3

cagnulein commented 2 months ago

yes sure, i just need time :)