Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workout / Interval messages #27

Open
johnpoole opened this issue Nov 18, 2019 · 4 comments
Open

Workout / Interval messages #27

johnpoole opened this issue Nov 18, 2019 · 4 comments

Comments

@johnpoole
Copy link

Is there anything representing workouts in the api? It seems like there are a few undefined messages in zwiftMessages.proto. If the power/time/cadence of each interval was in there it would allow for some integration with the workouts and music, lights, etc.

Is there a way to log the entire buffer while doing a workout to track down whether that info is there?

@wiedmann
Copy link
Contributor

The easiest way to do this is to use Wireshark or an equivalent packet sniffer. Wireshark has the ability to save out the data stream and there is a plugin that handles protobuf decoding. You can use the .proto file from this project as a starting point.

Having said that, I think it's unlikely that interval data would be sent back to the server. I don't see any reason why they would do that since it's not shared with anyone else. Zwift does most of the heavy lifting on the client side. The server is mostly just routing traffic to make riders visible to each other.

@johnpoole
Copy link
Author

Thanks. I did set up wireshark and was looking for data being sent from the Zwift client to the companion app. Are the messages only between the server and the client apps?

@wiedmann
Copy link
Contributor

Oh I see. The companion app messages are sent over a separate TCP connection that’s initiated from the game to the app. You should be able to find those as well, but they’re encoded slightly differently since they’re transmitted in a stream. Look for the length-prefixed protobuf dissector for Wireshark.

You’re right that there are many messages between app and game that have not yet been reverse engineered so you may find what you’re looking for there.

@johnpoole
Copy link
Author

Thanks for the info. I'll post anything useful I find.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants