cagnulein / qdomyos-zwift

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

Domyos connected cyclette (E-Fold) #22

Closed cagnulein closed 3 years ago

cagnulein commented 3 years ago

@alpat59 let's continue here πŸ‘

alpat59 commented 3 years ago

I’m checking just now on Zwift web dashboard. I saw my workout and in particular power, speed, heart rate but no cadence data. I understood that bike provides rpm to tool but maybe I was wrong. I attach an image. 528ACE19-4E11-4153-8C40-4AA17FE83E91

cagnulein commented 3 years ago

ok so, just to summarize. Things to be done:

  1. speed and cadence on display
  2. cadence to zwift
cagnulein commented 3 years ago

The tool doesn't goes down for me.

For me console displays values but values are at 0 for speed and cadence. The other values seems shown correct data.

I have done few tries with an old treadmill and found positions in the frame for cadence and speed cadence: 16 speed: 8

Thanks

are you sure about speed: 8? because in the 7-8 bytes i have the odometer now (i'm talking about the frame for writing the display)

Yusuf-Demiryurek commented 3 years ago

Yes, I'm pretty sure when I put speed on position 8 of the frame write to display, bike console displays speed.

cagnulein commented 3 years ago

Yes, I'm pretty sure when I put speed on position 8 of the frame write to display, bike console displays speed.

so i delete the odometer?

cagnulein commented 3 years ago

cadence: 16

added https://github.com/cagnulein/qdomyos-zwift/commit/45d118b90e20c54d4b773db5476505e1ebdfd44f

Yusuf-Demiryurek commented 3 years ago

Yes, I'm pretty sure when I put speed on position 8 of the frame write to display, bike console displays speed.

so i delete the odometer?

I will try again this night and confirm, because odometer works. Maybe I'm wrong.

cagnulein commented 3 years ago

@kenands i took another look to the log

btsnoop_hci_domyos_bike500.log

and seems you're right: bytes 7-8 are the speed (multiplied by 10)

0000 f0 cb 03 03 06 ff 01 01 4d 01 01 00 00 00 01 00 3d 00 01 00

In this log: speed 0x14D so 33,3 KM/h.

But i can't see the odometer so i don't know why IT'S WORKING the odometer πŸ˜„ Maybe the odometer on your console it's updated directly from the machine? Anyway I commit this change, i guess it's ok. https://github.com/cagnulein/qdomyos-zwift/commit/19dcb2e6000474f93b3cfc442f1fe55f95d54995

Yusuf-Demiryurek commented 3 years ago

Haha :) I don't know how it works for odometer but it works, to be sure odometer it's the distance ?

cagnulein commented 3 years ago

@kenands yes, the odometer is the distance. Let me know this night πŸ‘

Yusuf-Demiryurek commented 3 years ago

@cagnulein you did a great work :)

I'm wrong for odometer, it's not display ^^ I maybe dreamed.

to summarize:

_ in bike console: Kcal - ok heart rate - ok cadence - ok speed - it's display but value seems to be 10 times higher
odometer - it's not display

_ in zwift: power - ok heart rate - ok candence - not yet write the resistance - not yet

debug-mar. oct. 20 21:25:56 2020.log

Many thanks :)

cagnulein commented 3 years ago

@cagnulein you did a great work :)

thanks, you too on debugging it :) it's a great team :D

I'm wrong for odometer, it's not display ^^ I maybe dreamed.

hahahah

to summarize:

_ in bike console: Kcal - ok heart rate - ok cadence - ok speed - it's display but value seems to be 10 times higher

ok, fixed https://github.com/cagnulein/qdomyos-zwift/commit/6aeb3c475fd801b15115c49590a20038a015f7c5

odometer - it's not display

when you catch the log the first time with the app on the phone, the odometer was working? Because, if with the app the odometer works, we should see the bytes in the logs.

_ in zwift: power - ok heart rate - ok candence - not yet

ok, now i focus on this point

write the resistance - not yet

maybe this weekend :)

P.S. which is your account name on zwift?

cagnulein commented 3 years ago

@kenands i guess i fix also the cadence issue

https://github.com/cagnulein/qdomyos-zwift/commit/7b4a3d3aca66bd105c5c30d8ad9b1516fefac07f

i guess you should enable the cadence icon on zwift

Screenshot_20201021_084402_com zwift zwiftgame

i also added some new debug prints in order to understand better the behaviour, but i think it's solved now

Yusuf-Demiryurek commented 3 years ago

@cagnulein I agree for the great team :D

You are too fast ^^

I'm Moving today, I will try this night and keep you inform :)

Thanks to you I don't need to buy an expensive bike to use zwift, so I can buy a domyos treadmill instead :)

cagnulein commented 3 years ago

@kenands hahahah thank to you too, now i'm thinking about adding some smart device to my dumb spin bike πŸ˜„ in short, i would like to read the analogic sensor of my spin bike with my raspberry in order to send the cadence to zwift πŸ˜„

Yusuf-Demiryurek commented 3 years ago

@cagnulein you are crazy :smile: how will you read the analogic sensor ?

I did a new try and it works well :smile:

Speed is ok. Odometer: when I did the btsnoop log session, odometer was working, I did a new try and I think the odometer show 0.1km approximately 30secondes after the start. cadence is ok.

debug-mer. oct. 21 21:58:29 2020.log

Screenshot_2020-10-21-21-58-56-338_com zwift zwiftgame

1603310711819

I send you a friend request on zwift.

thanks :)

cagnulein commented 3 years ago

@kenands with a raspberry's GPIO I will read the analogic value :D

Ok, thanks for the new log, tomorrow I will look into it. Have a good night

cagnulein commented 3 years ago

@kenands the last log is corrupt, but i should have discovered where the odometer was from the first log. Let's try with https://github.com/cagnulein/qdomyos-zwift/commit/60a8f7b93f42064710e696d8899e972da2792522

Today i will work on writing the resistance from zwift, cross your fingers :)

Yusuf-Demiryurek commented 3 years ago

@cagnulein , sorry for the log

Good new πŸ˜„ 🀞

I have no time to try today becasue I'm moving but as soon as my bike and my computer are in place I will try and send you the log :)

Have a good day !

cagnulein commented 3 years ago

@kenands i've already done https://github.com/cagnulein/qdomyos-zwift/commit/a6c369cb0b4608fba070d08307d870b377cd8fce i don't know if it works, but the code makes sense to me πŸ˜„

of course you have to enable these ones

Screenshot_20201021_084402_com zwift zwiftgame

alpat59 commented 3 years ago

@cagnulein Hi Roberto, i compiled on rPi3 the last version of the code and i saw a sort of regression.... I connected zwift (on iPad) with Bridge; "potenza" was connected, "frequenza cardiaca" was rightly connected with my apple watch (by zwift companion app running on iPhone). Same configuration adopted two days ago... but "cadenza" doesn't show anything to connect, no data seems to be transmitted from bridge to zwift (even if bridge shows the connection with Domyos as I can see in the log - I'm running in no-gui way) and so no movement in zwift, no data updated on domyos console.. something different by two days ago... Let me know how I can help you better. Thank you Bye

cagnulein commented 3 years ago

@cagnulein Hi Roberto, i compiled on rPi3 the last version of the code and i saw a sort of regression.... I connected zwift (on iPad) with Bridge; "potenza" was connected, "frequenza cardiaca" was rightly connected with my apple watch (by zwift companion app running on iPhone). Same configuration adopted two days ago... but "cadenza" doesn't show anything to connect, no data seems to be transmitted from bridge to zwift (even if bridge shows the connection with Domyos as I can see in the log - I'm running in no-gui way) and so no movement in zwift, no data updated on domyos console.. something different by two days ago... Let me know how I can help you better. Thank you Bye

Could you please restart the bridge when you saw this behavior? I don't think is a regression in the code, I guess there is something in the bluetooth instead

alpat59 commented 3 years ago

Sorry for late answer. Yes, I restarted the bridge many times. Anyway tomorrow I’ll check again if there is something wrong by my side. Tks

cagnulein commented 3 years ago

@alpat59 the only thing that I added was the control of the resistance by zwift. I will double check the code

cagnulein commented 3 years ago

@alpat59 i checked the code and i don't see any relevant issue...if the error stills, please 1) send me the logs 2) try to chekout to this commit, rebuild and try. If this commit works, means that the control of the resistance by zwift has some issues.

cagnulein commented 3 years ago

@alpat59 did you have a chance to try the mac build that i post here #31 ?

alpat59 commented 3 years ago

yes I'll try this evening ..

alpat59 commented 3 years ago

@cagnulein i tried again bridge in rpi3. Two days ago I had a Zwift session for 20 min. Today I’m not able to see data flowing from bridge to Zwift. I attachΓ©d three pictures to show you the status both sides : Zwift and bridge. Tks for your support. 9A8E7BEB-252C-4204-BA5C-5B7145D6136B 9023A80D-4915-49BB-9130-29F6FC41009E 89AB7B88-292D-461B-BFA2-9D17308D4BFC

cagnulein commented 3 years ago

@alpat59 ok thanks, I will simulate tonight after some beers :D

cagnulein commented 3 years ago

Screenshot_20201023_234332_com.zwift.zwiftgame.jpg

@alpat59 i saw your error too and, without changing anything in the code and neither restarting the app, the issue disappeared. The only thing that i've done was clicking on the icon power to connect and disconnect the bridge (several times). When it works, than it works forever.

My guess is that Zwift has some cache about bluetooth services: in the past days i added the zwift control resistance and i think zwift it's misaligned. Reclicking on the "Power icon" several times, it causes to zwift to refresh them.

Let me know if you solve it. R.

alpat59 commented 3 years ago

@cagnulein I tried your suggestions without success (I run code at commit -1). There is no way to obtain cadence or something other data related to movement from domyos to bridge. A partial good news is that I tried your bridge also with two other apps (Rouvy and Onelap) and the domyos bridge is seen but again no data movement-related is passed to them.

So I decided to reinstall the full package(prerequisites and last current commit code). Now I see two new problems: 1) warnings during code building (make -j4) 2) errors when the bridge try to connect with domyos e-folder You can see the attached documents.

Thank you in advance for your help

Screen Shot 2020-10-24 at 4 46 27 PM Screen Shot 2020-10-24 at 4 49 02 PM
cagnulein commented 3 years ago

@alpat59 which commit did you compile? (send me the exact link, commit -1 is unclear :) ) warnings are normal the screen you send me is normal too, your efold was off when you started the software, you can see it in the line "DOMYOS-BIKE......RSSI 0". That RSSI 0, means that the BIKE was off.

Anyway todo i will build a test and i will try again, but i would like to wait to @kenands too, in order to understand if you have some strange issue or it's a bug in the software.

alpat59 commented 3 years ago

Thank you. And I agree to wait a feedback by @kenands (sorry for my not precise statement, I compiled the version available before than current one, this is the link : https://github.com/cagnulein/qdomyos-zwift/commit/6d88cef84cf9da51dddce202cdd95d62d8e7c25f) In few hours, I’ll check again why, despite bike was turned on, RSSI was 0 that, of course, explain the error)

alpat59 commented 3 years ago

@cagnulein I tested again resetting everything. I confirm that bridge is connected with domyos (because i see in the log, cadence data and other ones updating in real time) and is connected with zwift because I see "domyos-bridge" device in zwift . There I see that "potenza", "frequenza cardiaca" (showing two options; bridge and apple watch) are connected and "controllabile" are in connected state too. But again "cadence" is still in search mode and no data flows to zwift: so the run doesn't start (cadence, km/h and watt remain zero). Same situations is showed with other two apps (Rouvy and Onelap) both supporting Bluetooth Fitness Machine protocol. I hope my explanation could help you. But don't hesitate to tell where I'm wrong.. Thank you for your patience ...

(I forgot to mention that I'm running bridge on RPi3 (with raspbian) with no-gui option)

cagnulein commented 3 years ago

thanks @alpat59 for your feedback. i'm starting a debug session, i hope to see the same issue here too

cagnulein commented 3 years ago

@alpat59 i guess I solved something. Could you please try my last commit?

Screenshot_20201025_145930_com.zwift.zwiftgame.jpg

alpat59 commented 3 years ago

@cagnulein just I tried. Sorry I have the same behavior. Do you think that it could be something related to my specific device (e-folder) ? How can I help you to debug ?

cagnulein commented 3 years ago

@cagnulein just I tried. Sorry I have the same behavior. Do you think that it could be something related to my specific device (e-folder) ? How can I help you to debug ?

I'm sorry me too, I don't understand what is the issue on your side. Tomorrow I will add some debug log. When I'm ready I will tell you .

Of course will be very important to send me the full file log, not only a screenshot :)

Have a nice evening!

Yusuf-Demiryurek commented 3 years ago

@cagnulein Hi, with my moving, I'm not entirely settled yet. I will do a try this week. I keep you inform.

Have a good day !

alpat59 commented 3 years ago

@cagnulein I saw you did another commit (related to RSSI) .. do you need change something more or can I test this new release ?

cagnulein commented 3 years ago

@cagnulein I saw you did another commit (related to RSSI) .. do you need change something more or can I test this new release ?

i also added new debug prints, but first i would like to test myself. I will tell you when it will all set to do another trial. Thanks

alpat59 commented 3 years ago

perfect ...tks

cagnulein commented 3 years ago

@alpat59 ok, when you want you can try https://github.com/cagnulein/qdomyos-zwift/commit/40336b70c8806e973cf5fd79d9c54578e298dd75 i've only added some logs in order to understand better your issue. So please attach me the full log. Thanks

alpat59 commented 3 years ago

I did it. another different situation here.. The Domyos device seems to be discovered ("Found new device: Domyos-Bike-6011 (E8:5D:86:0A:04:C0)") but no bluetooth connection is opened (I normally saw that happens when the bluetooth icon Domyos console is turned on) and bridge goes in hang after few seconds... I 'm attaching the log. I'm curious to know your opinion about ... Thank you again

alpat59_ log_test_2044_261020.txt

cagnulein commented 3 years ago

It's all about the check of the rssi, you have to wait 30/60 seconds in order to have a rssi valid...I guess I have to remove it. @alpat59

alpat59 commented 3 years ago

New log with last commit... No cadence yet. Log attached

alpat59_ log_test_2304_261020.txt

cagnulein commented 3 years ago

New log with last commit... No cadence yet. Log attached

alpat59_ log_test_2304_261020.txt

Did you see the Domyosbridge? If no, did you try to restart it? In the log i didn't see any attempt of connection to the bridge And are you sure about getting the last commit? I don't see any new debug log in your file.

I have a proposal for you: is it ok for you to having a teamviewer or similar session? I guess it will be faster. If you want you could add me on Facebook Messenger, you can find me as "Roberto Viola".

alpat59 commented 3 years ago

Yes, I saw the bridge but only "potenza" and "controllabile" . No cadence.... Good idea for Messenger session ... (or whatever you prefer) .. sorry for today ... very busy day ... I'll inform you when ready

cagnulein commented 3 years ago

Yes, I saw the bridge but only "potenza" and "controllabile" . No cadence.... Good idea for Messenger session ... (or whatever you prefer) .. sorry for today ... very busy day ... I'll inform you when ready

ok no hurry on my side :) let's add me to facebook and will arrange a debug session πŸ‘“ i prefer on wednesday ( from 9:00 CET ) or direclty this weekend

alpat59 commented 3 years ago

Sorry to miss the proposed debug session in today morning. I’m really busy. Could we replan it? I already contacted you on messenger (I hope I wrote to the right @cagnulein !).