cagnulein / qdomyos-zwift

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

[REQ] Add to qdomyos an API for remote access to treadmill #572

Closed gungun974 closed 2 years ago

gungun974 commented 2 years ago

Is your feature request related to a problem? Please describe. I just bought a Domyos T900C and after quickly testing your program the treadmill control works perfectly. Unless I would actually like to connect my treadmill through your program to another service using a Rest API.

Describe the solution you'd like I would like it to be possible one day to add in this project how was dedicated for Zwift a Rest API to be able to interconnect it with other third-party applications.

Describe alternatives you've considered Of course here I'm talking about HTTP API but what I'm looking for me is just a way to remotely connect to qdomyos for control without human interaction. So more "simple" solutions such as a simple TCP / IP socket that would allow sending commands or receiving data are also viable (even if a TCP / IP socket on its own is less flexible than an integrated HTTP server)

cagnulein commented 2 years ago

@gungun974 it's already there! Check https://github.com/cagnulein/qdomyos-zwift/pull/252 for more detail

p3g4asus commented 2 years ago

Hi! I can confirm this feature is already integrated in QZ! QZ data can be received via TCP server sockets (QZ can create one or more TCP clients that connect to your remote TCP server) or HTTP WEB sockets (QZ can create an HTTP WEB socket server to wich you can connect to receive data or send commands). I recommend checking this folder for reference: https://github.com/cagnulein/qdomyos-zwift/tree/master/src/templates You have to place those files/folders inside

gungun974 commented 2 years ago

@p3g4asus Very interesting what you point there. It is true that I had searched a lot of issues on this project but not at all the pull requests. However, I don't really understand this concept of a template. And then I do not use the IOS version nor the Android version of QZ but the linux version compiled from the sources (on a raspberry pi zero w to be more precise). And as in the guide I run the program with ./qdomyos-zwift -no-gui. So now i have no idea how to add this template (if it's some kind of plugin) or activate the HTTP server for the WEB Sockets you are talking to me about.

Could you explain to me a little more what are the templates and how everything you say interacts on the headless linux version?

cagnulein commented 2 years ago

@gungun974 the server is already available also in the linux version, it should answer at the port 6666. You can try already in your version. Just be sure to build the qhttpserver as described here https://github.com/cagnulein/qdomyos-zwift/pull/252 It's an external dependencies (builtin in the play store and app store version)

After this you will have a full server answering to your request. Check this function in order to understand which commands are avaiable right now https://github.com/cagnulein/qdomyos-zwift/blob/70c94f931f3e8675646e22bd0ac7b04097be7d69/src/templateinfosenderbuilder.cpp#L580

Also you can add new commands in a PR if you need

gungun974 commented 2 years ago

@cagnulein Ok now I understand that I am missing the qhttpserver module. However now when I do clone the repository and then try to compile it (with the two additional files) I run into this error. `` Project ERROR: Unknown module(s) in QT: websockets-private make: *** [Makefile:73: sub-httpserver-make_first] Error 3 `` So I am on a raspberrypi zero W with the latest version of raspbian without an X server and I have searched the official Debian repositories, but I cannot find any "websockets-private" package. Maybe i need to install QTCreator but i am on an headless machine and i don't think try to use SSH X11 forwarding on a so little computer will be a really good idea to try.

Do you know what dependency is missing on my raspberry pi to compile? (Note i of course already install libqt5websockets5-dev)

p3g4asus commented 2 years ago

@cagnulein Ok now I understand that I am missing the qhttpserver module. However now when I do clone the repository and then try to compile it (with the two additional files) I run into this error. ` Project ERROR: Unknown module(s) in QT: websockets-private make: *** [Makefile:73: sub-httpserver-make_first] Error 3 ` So I am on a raspberrypi zero W with the latest version of raspbian without an X server and I have searched the official Debian repositories, but I cannot find any "websockets-private" package. Maybe i need to install QTCreator but i am on an headless machine and i don't think try to use SSH X11 forwarding on a so little computer will be a really good idea to try.

Do you know what dependency is missing on my raspberry pi to compile? (Note i of course already install libqt5websockets5-dev)

I have never compiled qhttpserver in a linux enviroment. Please let me check. I will reply and also add some examples on how to use templates. However under linux template files and folders have to be put inside the main application working directory.

cagnulein commented 2 years ago

@gungun974 did you try installing this

libqt5websockets5-dev

p3g4asus commented 2 years ago

@gungun974 did you try installing this

libqt5websockets5-dev

Yes that is needed indeed.

gungun974 commented 2 years ago

Yes like I said before I tried it first but no difference.

(Note i of course already install libqt5websockets5-dev)

gungun974 commented 2 years ago

I also try to change the module of webscokets-private to webscokets in src/httpserver/httpserver.pro but at another step that crash :eyes:

make[1]: Entering directory '/home/gungun974/qthttpserver/src/httpserver'
perl /usr/lib/arm-linux-gnueabihf/qt5/mkspecs/features/data/unix/findclasslist.pl < QtHttpServer.version.in > QtHttpServer.version
g++ -g -O2 -ffile-prefix-map=/build/qtbase-opensource-src-4EXKBZ/qtbase-opensource-src-5.15.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_HTTPSERVER_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SSLSERVER_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I. -I../3rdparty/http-parser -I../../include -I../../include/QtHttpServer -I../../include/QtHttpServer/5.12.0 -I../../include/QtHttpServer/5.12.0/QtHttpServer -I../../include/QtSslServer -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtWebSockets -I/usr/include/arm-linux-gnueabihf/qt5/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5/QtConcurrent -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I.moc -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -x c++-header -c ../../include/QtHttpServer/QtHttpServerDepends -o .pch/Qt5HttpServer.gch/c++
g++ -c -include .pch/Qt5HttpServer -g -O2 -ffile-prefix-map=/build/qtbase-opensource-src-4EXKBZ/qtbase-opensource-src-5.15.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_HTTPSERVER_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SSLSERVER_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I. -I../3rdparty/http-parser -I../../include -I../../include/QtHttpServer -I../../include/QtHttpServer/5.12.0 -I../../include/QtHttpServer/5.12.0/QtHttpServer -I../../include/QtSslServer -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtWebSockets -I/usr/include/arm-linux-gnueabihf/qt5/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5/QtConcurrent -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I.moc -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o .obj/qabstracthttpserver.o qabstracthttpserver.cpp
In file included from ../../include/QtHttpServer/5.12.0/QtHttpServer/private/qabstracthttpserver_p.h:1,
                 from qabstracthttpserver.cpp:34:
../../include/QtHttpServer/5.12.0/QtHttpServer/private/../../../../../src/httpserver/qabstracthttpserver_p.h:46:10: fatal error: private/qobject_p.h: No such file or directory
   46 | #include <private/qobject_p.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:643: .obj/qabstracthttpserver.o] Error 1
make[1]: Leaving directory '/home/gungun974/qthttpserver/src/httpserver'
make: *** [Makefile:73: sub-httpserver-make_first] Error 2
p3g4asus commented 2 years ago

After you success in compiling QZ with httpserver support please copy this debug folder in your ./qdomyos-zwift folder working directory. Then open QZ and set a port of your choice in Settings/Experimental features/Template settings/user_QZWS Port. Close QZ and open again. Go with your favourite browser to http://linux_host_ip:user_QZWSPort/debug/workout.htm, start a fitness activity and see what you get. To test command sending to QZ you can use any browser extension that can connect to a websocket server and try to send JSON commands after connecting to the qz websocket server. Please give me some more time to investigate your compile problems.

gungun974 commented 2 years ago

I also try to change the module of webscokets-private to webscokets in src/httpserver/httpserver.pro but at another step that crash eyes

make[1]: Entering directory '/home/gungun974/qthttpserver/src/httpserver'
perl /usr/lib/arm-linux-gnueabihf/qt5/mkspecs/features/data/unix/findclasslist.pl < QtHttpServer.version.in > QtHttpServer.version
g++ -g -O2 -ffile-prefix-map=/build/qtbase-opensource-src-4EXKBZ/qtbase-opensource-src-5.15.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_HTTPSERVER_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SSLSERVER_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I. -I../3rdparty/http-parser -I../../include -I../../include/QtHttpServer -I../../include/QtHttpServer/5.12.0 -I../../include/QtHttpServer/5.12.0/QtHttpServer -I../../include/QtSslServer -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtWebSockets -I/usr/include/arm-linux-gnueabihf/qt5/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5/QtConcurrent -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I.moc -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -x c++-header -c ../../include/QtHttpServer/QtHttpServerDepends -o .pch/Qt5HttpServer.gch/c++
g++ -c -include .pch/Qt5HttpServer -g -O2 -ffile-prefix-map=/build/qtbase-opensource-src-4EXKBZ/qtbase-opensource-src-5.15.2+dfsg=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -std=c++1z -fvisibility=hidden -fvisibility-inlines-hidden -fno-exceptions -Wall -Wextra -Wvla -Wdate-time -Wshift-overflow=2 -Wduplicated-cond -Wno-stringop-overflow -Wno-format-overflow -D_REENTRANT -fPIC -DQT_NO_LINKED_LIST -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_BUILD_HTTPSERVER_LIB -DQT_BUILDING_QT -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DQT_USE_QSTRINGBUILDER -DQT_DEPRECATED_WARNINGS -DQT_DISABLE_DEPRECATED_BEFORE=0x050000 -DQT_DEPRECATED_WARNINGS_SINCE=0x060000 -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_NO_DEBUG -DQT_SSLSERVER_LIB -DQT_WEBSOCKETS_LIB -DQT_NETWORK_LIB -DQT_CONCURRENT_LIB -DQT_CORE_LIB -I. -I. -I../3rdparty/http-parser -I../../include -I../../include/QtHttpServer -I../../include/QtHttpServer/5.12.0 -I../../include/QtHttpServer/5.12.0/QtHttpServer -I../../include/QtSslServer -I/usr/include/arm-linux-gnueabihf/qt5 -I/usr/include/arm-linux-gnueabihf/qt5/QtWebSockets -I/usr/include/arm-linux-gnueabihf/qt5/QtNetwork -I/usr/include/arm-linux-gnueabihf/qt5/QtConcurrent -I/usr/include/arm-linux-gnueabihf/qt5/QtCore -I.moc -I/usr/lib/arm-linux-gnueabihf/qt5/mkspecs/linux-g++ -o .obj/qabstracthttpserver.o qabstracthttpserver.cpp
In file included from ../../include/QtHttpServer/5.12.0/QtHttpServer/private/qabstracthttpserver_p.h:1,
                 from qabstracthttpserver.cpp:34:
../../include/QtHttpServer/5.12.0/QtHttpServer/private/../../../../../src/httpserver/qabstracthttpserver_p.h:46:10: fatal error: private/qobject_p.h: No such file or directory
   46 | #include <private/qobject_p.h>
      |          ^~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:643: .obj/qabstracthttpserver.o] Error 1
make[1]: Leaving directory '/home/gungun974/qthttpserver/src/httpserver'
make: *** [Makefile:73: sub-httpserver-make_first] Error 2

Okay I manage in less than 5 minutes to find why this crash and how to fix it. Yes i need to edit the src/httpserver/httpserver.pro and change module name websockets-private to websockets but I must not change core-private to core and so now it's keep building ! (Until that build crash cause this raspberry pi zero W is realllllllllly slow and i don't have the final answer :sweat_smile:) ERATUM: it just ended...

ln -s libQt5HttpServer.so.5.12.0 libQt5HttpServer.so
ln -s libQt5HttpServer.so.5.12.0 libQt5HttpServer.so.5
ln -s libQt5HttpServer.so.5.12.0 libQt5HttpServer.so.5.12
rm -f ../../lib/libQt5HttpServer.so.5.12.0
mv -f libQt5HttpServer.so.5.12.0 ../../lib/libQt5HttpServer.so.5.12.0
rm -f ../../lib/libQt5HttpServer.so
rm -f ../../lib/libQt5HttpServer.so.5
rm -f ../../lib/libQt5HttpServer.so.5.12
mv -f libQt5HttpServer.so ../../lib/libQt5HttpServer.so
mv -f libQt5HttpServer.so.5 ../../lib/libQt5HttpServer.so.5
mv -f libQt5HttpServer.so.5.12 ../../lib/libQt5HttpServer.so.5.12
make[1]: Leaving directory '/home/gungun974/qthttpserver/src/httpserver'
gungun974 commented 2 years ago

After you success in compiling QZ with httpserver support please copy this debug folder in your ./qdomyos-zwift folder working directory. Then open QZ and set a port of your choice in Settings/Experimental features/Template settings/user_QZWS Port. Close QZ and open again. Go with your favourite browser to http://linux_host_ip:user_QZWSPort/debug/workout.htm, start a fitness activity and see what you get. To test command sending to QZ you can use any browser extension that can connect to a websocket server and try to send JSON commands after connecting to the qz websocket server. Please give me some more time to investigate your compile problems.

@p3g4asus Where is Settings/Experimental features/Template settings/user_QZWS Port ? It's in the GUI app ? It's a folder generate by default ? Can you send me an image if this is a GUI button options ???

p3g4asus commented 2 years ago

@gungun974 In this file you can see that qtbase ref 7d7afe1d2b1d85ea5221d1d2883c8bf80aa0e927 is required to compile qthttpserver. Ref 7d7afe1d2b1d85ea5221d1d2883c8bf80aa0e927 corresponds to qt 5.12.8. So version 5.12.0 is not fully compatible and you can run in compile issues you got. I hope that the module you managed to get will work just fine but that is not guaranteed. Settings/Experimental features/Template settings/user_QZWS Port is in the GUI app. immagine

gungun974 commented 2 years ago

Euhh excuse me but in my Linux version i had this UI which is very different than the Android version ? image Did you mean I need to build an Android version to been able to create a config file that i could transfer to my raspberry pi ? (Cause i guess that Android version is the same than the Linux version but run on Android device)

cagnulein commented 2 years ago

@gungun974 if you run qdomyos with -qml argument you will have the GUI of the android/ios but you don't need it. you can access the settings by code simply calling the variables

check this for example https://github.com/cagnulein/qdomyos-zwift/blob/70c94f931f3e8675646e22bd0ac7b04097be7d69/src/main.cpp#L327

EDIT: since you're the first one that it's using outside the android/ios version, maybe this will require to add some new flag/parameters to the nongui version. But it's an easy task and you can do it already in a PR!

gungun974 commented 2 years ago

So I plan to pause and look for this from here until Saturday since there I am a little tired of this story and that I have to make myself a Windows environment to be able to compile an Android version to test and bla bla bla.

Anyways thanks for all your time cause now I discovered that such feature already exist but also I feal I'm near to make it works ^^

cagnulein commented 2 years ago

I don't understand: Why do you need the android version?

Il giorno mer 12 gen 2022 alle 18:35 gungun974 @.***> ha scritto:

So I plan to pause and look for this from here until Saturday since there I am a little tired of this story and that I have to make myself a Windows environment to be able to compile an Android version to test and bla bla bla.

Anyways thanks for all your time cause now I discovered that such feature already exist but also I feal I'm near to make it works ^^

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

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

gungun974 commented 2 years ago

Oh if I want to test the Android version, it's both to discover it but also to get better understanding of what the most of user deal of UI and settings like p3g4asus show.

After, indeed I can try something else later such as doing all my compilations tests on my AMD Ryzen 9 instead of this Raspberry Pi Zero W that I have xD I will go soooo faster but i need to configure on my computer the bluetooth driver that i forget to compile in my kernel xD.

Any way i'm not clear of what i'm saying now but anyway if I find intresting later to say about my case I do so. Or better next time I will write a comment. Maybe it will be to close this Issue cause i found the solution to the web server settings.

gungun974 commented 2 years ago

Well, I obviously managed to get the HTTP module to work on a Gentoo X64 linux. I also managed to figure out that a config file existed in the root directory /root/.config/Roberto Viola / qDomyos-Zwift.conf.

However when I try with the same config file on my Debian 11 raspberry pi, no web server is on the horizon. I therefore suspect as you could tell me that I do not have the version of QT that I need for the HTTP module.

Now I have the choice to install the latest version of QT on this raspberry pi. Or the QT modules are cross compilable and then on a newer x64 version of QT i can compile a module for the raspberry pi. Or in the worst case tried the ARM version of arch linux xD.

But in these three cases the problem depends only on me and no longer on the qdomyos project, that's why I decided to close this issue.

Thank you for all the help encountered.

cagnulein commented 2 years ago

great @gungun974 could i ask you which is your final target of this? i'm courious :)

gungun974 commented 2 years ago

@cagnulein My final goal in this whole story is to be able to remotely retrieve data such as speed or heartbeat from my T900C while being able to control it without using the official application.

In addition, this will be a way for me to be able to collect my own data in order to be able to make motivational graphics and or personalized programs that adapt to my private life tastes (No collect of data and fully control).

(obviously all this will be possible thanks to your project and if I can compile QT 5.12.8 on a raspberry pi)

cagnulein commented 2 years ago

i would like to see them at the end of your work! i'm a data guy too!

p3g4asus commented 2 years ago

(obviously all this will be possible thanks to your project and if I can compile QT 5.12.8 on a raspberry pi)

If you are compiling QT from scratch, I suggest you to try the latest QT 5 version (5.15.2 or later).

gungun974 commented 2 years ago

I have success using a raspberry pi 4 to cross compiled qt5.12.12 for the raspberry pi zero W (armv6l).

I successfully compiled qthttpserver with own QT version on the raspberry pi zero W.

However when I compile qdosmyos-zwift. I have a Segmentation fault on the side of the compiler that I absolutely do not understand why and nor that it could exist xD

So I don't know too much about C/C++ but maybe the error comes that I did a make with qt5.12.12 and it tries there to make the link process with files from both versions of qt which is obviously impossible.

Anyway I'm going there suddenly relaunched this long compilation in a blank project and see what happens but hey if you had an idea on why this Segmentation fault I would be interested to hear them ^^

$ make -j1
g++ -Wl,-O1 -s -pipe -mfloat-abi=hard -mfpu=vfp -mtune=arm1176jzf-s -march=armv6zk -fno-sized-deallocation -O3 -std=gnu++1z -flto -fno-fat-lto-objects -fuse-linker-plugin -Wl,-rpath,/opt/Qt/5.12.12/lib -Wl,-rpath-link,/opt/Qt/5.12.12/lib -fPIC -o qdomyos-zwift webserverinfosender.o activiotreadmill.o bike.o bluetooth.o bluetoothdevice.o bowflextreadmill.o chronobike.o cscbike.o domyoselliptical.o domyosrower.o domyostreadmill.o echelonconnectsport.o echelonrower.o echelonstride.o eliterizer.o elitesterzosmart.o elliptical.o eslinkertreadmill.o fakebike.o fitmetria_fanfit.o fitplusbike.o fitshowtreadmill.o fit.o fit_accumulated_field.o fit_accumulator.o fit_buffer_encode.o fit_buffered_mesg_broadcaster.o fit_buffered_record_mesg_broadcaster.o fit_crc.o fit_date_time.o fit_decode.o fit_developer_field.o fit_developer_field_definition.o fit_developer_field_description.o fit_encode.o fit_factory.o fit_field.o fit_field_base.o fit_field_definition.o fit_mesg.o fit_mesg_broadcaster.o fit_mesg_definition.o fit_mesg_with_event_broadcaster.o fit_profile.o fit_protocol_validator.o fit_unicode.o flywheelbike.o ftmsbike.o ftmsrower.o gpx.o heartratebelt.o homefitnessbuddy.o homeform.o horizongr7bike.o horizontreadmill.o iconceptbike.o inspirebike.o keepawakehelper.o kingsmithr1protreadmill.o kingsmithr2treadmill.o main.o mcfbike.o metric.o nautilustreadmill.o npecablebike.o pafersbike.o paferstreadmill.o peloton.o powerzonepack.o proformbike.o proformtreadmill.o qfit.o renphobike.o rower.o schwinnic4bike.o screencapture.o sessionline.o shuaa5treadmill.o signalhandler.o skandikawiribike.o smartrowrower.o smartspin2k.o emailaddress.o mimeattachment.o mimecontentformatter.o mimefile.o mimehtml.o mimeinlinefile.o mimemessage.o mimemultipart.o mimepart.o mimetext.o quotedprintable.o smtpclient.o snodebike.o soleelliptical.o solef80treadmill.o spirittreadmill.o sportsplusbike.o sportstechbike.o strydrunpowersensor.o tacxneo2.o tcpclientinfosender.o technogymmyruntreadmill.o technogymmyruntreadmillrfcomm.o templateinfosender.o templateinfosenderbuilder.o stagesbike.o toorxtreadmill.o treadmill.o trxappgateusbbike.o virtualrower.o yesoulbike.o trainprogram.o trxappgateusbtreadmill.o virtualbike.o virtualtreadmill.o m3ibike.o domyosbike.o scanrecordresult.o zwiftworkout.o mainwindow.o charts.o qrc_icons.o qrc_qml.o moc_webserverinfosender.o moc_activiotreadmill.o moc_bike.o moc_bluetooth.o moc_bluetoothdevice.o moc_bowflextreadmill.o moc_chronobike.o moc_cscbike.o moc_domyoselliptical.o moc_domyosrower.o moc_domyostreadmill.o moc_echelonconnectsport.o moc_echelonrower.o moc_echelonstride.o moc_eliterizer.o moc_elitesterzosmart.o moc_elliptical.o moc_eslinkertreadmill.o moc_fakebike.o moc_fitmetria_fanfit.o moc_fitplusbike.o moc_ftmsrower.o moc_homefitnessbuddy.o moc_horizongr7bike.o moc_iconceptbike.o moc_kingsmithr1protreadmill.o moc_kingsmithr2treadmill.o moc_m3ibike.o moc_fitshowtreadmill.o moc_flywheelbike.o moc_ftmsbike.o moc_heartratebelt.o moc_homeform.o moc_horizontreadmill.o moc_inspirebike.o moc_material.o moc_mcfbike.o moc_nautilustreadmill.o moc_npecablebike.o moc_pafersbike.o moc_paferstreadmill.o moc_peloton.o moc_powerzonepack.o moc_proformbike.o moc_proformtreadmill.o moc_qfit.o moc_renphobike.o moc_rower.o moc_schwinnic4bike.o moc_screencapture.o moc_shuaa5treadmill.o moc_skandikawiribike.o moc_smartrowrower.o moc_smartspin2k.o moc_emailaddress.o moc_mimeattachment.o moc_mimecontentformatter.o moc_mimefile.o moc_mimehtml.o moc_mimemultipart.o moc_mimepart.o moc_quotedprintable.o moc_smtpclient.o moc_snodebike.o moc_soleelliptical.o moc_solef80treadmill.o moc_spirittreadmill.o moc_sportsplusbike.o moc_sportstechbike.o moc_strydrunpowersensor.o moc_tacxneo2.o moc_tcpclientinfosender.o moc_technogymmyruntreadmill.o moc_technogymmyruntreadmillrfcomm.o moc_templateinfosender.o moc_templateinfosenderbuilder.o moc_stagesbike.o moc_toorxtreadmill.o moc_gpx.o moc_treadmill.o moc_mainwindow.o moc_trainprogram.o moc_trxappgateusbbike.o moc_trxappgateusbtreadmill.o moc_virtualbike.o moc_virtualrower.o moc_virtualtreadmill.o moc_domyosbike.o moc_yesoulbike.o moc_charts.o   -L/opt/vc/lib /opt/Qt/5.12.12/lib/libQt5Charts.so /opt/Qt/5.12.12/lib/libQt5Widgets.so /opt/Qt/5.12.12/lib/libQt5Quick.so /opt/Qt/5.12.12/lib/libQt5Gui.so /opt/Qt/5.12.12/lib/libQt5Bluetooth.so /opt/Qt/5.12.12/lib/libQt5Xml.so /opt/Qt/5.12.12/lib/libQt5Positioning.so /opt/Qt/5.12.12/lib/libQt5Qml.so /opt/Qt/5.12.12/lib/libQt5NetworkAuth.so /opt/Qt/5.12.12/lib/libQt5HttpServer.so /opt/Qt/5.12.12/lib/libQt5WebSockets.so /opt/Qt/5.12.12/lib/libQt5SslServer.so /opt/Qt/5.12.12/lib/libQt5Network.so /opt/Qt/5.12.12/lib/libQt5Concurrent.so /opt/Qt/5.12.12/lib/libQt5Core.so -lbrcmGLESv2 -lbrcmEGL -lpthread
during IPA pass: icf
In member function ‘GetVersionByte’:
lto1: internal compiler error: Segmentation fault
0xb6a5ad9f ???
        ../sysdeps/unix/sysv/linux/arm/sigrestorer.S:64
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <file:///usr/share/doc/gcc-10/README.Bugs> for instructions.
lto-wrapper: fatal error: g++ returned 1 exit status
compilation terminated.
/usr/bin/ld: error: lto-wrapper failed
collect2: error: ld returned 1 exit status
make: *** [Makefile:1144: qdomyos-zwift] Error 1
cagnulein commented 2 years ago

@gungun974 yes i already saw that segmentation fault in the same scenario: i was trying to linking library compiled against different QT version. So yes you have to use the right QT version

gungun974 commented 2 years ago

@cagnulein @p3g4asus. That was long. That was horrible. But I finally make work that Web Server. 🥳

For the problem of the compilation link it was fixed by compile in a clean environment.

Thanks for all your messages. I'm done with QT and I can finally works on my Data Monitoring System.

Here the victory picture !!! Screen Shot 2022-01-15 at 17 42 11

p3g4asus commented 2 years ago

Happy that you finally did it! If you will need further assistance in using JSON commands or you will need additional commands, please feel free to ask. Have a nice weekend.

gungun974 commented 2 years ago

Ok I could see that some command are missings or could be added to better controls in the API so I will open Issues there to be able to treat them separately.

hb9odk commented 2 years ago

@cagnulein @p3g4asus. That was long. That was horrible. But I finally make work that Web Server. 🥳

For the problem of the compilation link it was fixed by compile in a clean environment.

Thanks for all your messages. I'm done with QT and I can finally works on my Data Monitoring System.

Here the victory picture !!! Screen Shot 2022-01-15 at 17 42 11

Hi, is it possible to have the procedure to activate the web part? I have connected the raspberry to my treadmill and I would like to control it with a device on web browser and not with vnc. Thank you very much manuel

cagnulein commented 2 years ago

@gungun974 Maybe you can create a new page in the wiki or maybe even better put all the files here in GitHub?

gungun974 commented 2 years ago

@gungun974 Maybe you can create a new page in the wiki or maybe even better put all the files here in GitHub?

It's a long story for me to tell but when I had some time (Maybe tomorrow or at last this next weekend) I will write my PATH to make this works for me (If I say my path, it's cause I am not sure certain thing like compile a whole another QT version was required xD)

gungun974 commented 2 years ago

Hi, is it possible to have the procedure to activate the web part? I have connected the raspberry to my treadmill and I would like to control it with a device on web browser and not with vnc. Thank you very much manuel

@hb9odk But to try to say the fast as possible. I need to compile QT toolset for version 5.12.12 from a raspberry pi 4 so I follow this two guide :

this one to compile a QT version (with armv6l for my raspberry pi zero) https://www.tal.org/tutorials/building-qt-512-raspberry-pi and this guide for some missing detail in the first guide. https://wiki.logre.eu/index.php/Cross-compilation_Qt_5.12.5_pour_Raspberry_Pi

After I compile httpwebserver module like talk in the PR #252 (with my Custom version of qmake)

After I compile normally qdoymos (again with custom qmake).

And in last step I was need to edit manually /root/.config/Roberto Viola/qDomyos-Zwift.conf to write this settings :

template_inner_QZWS_enabled=true
template_inner_QZWS_folders=:/inner_templates//chartjs
template_inner_QZWS_ips=YOUR_IP
template_inner_QZWS_port=34107
template_inner_QZWS_type=WebServer

AND THE MORE IMPORTANT MISTAKE I MAKE DONT'T MOVE THE qdomyos-zwift TO AN ANOTHER FOLDER I take a huge amount of time to understand why it doesn't load the service. (And like tell in #252 you need to move all files from templates folder and all files in the templates/debug in the source code to properly load).

Sorry for my laziness in my message but since I will make a tutorial.md and english is not my primary language I don't bother to correct my orthography and grammar.