Hi,
First of all, the project looks awesome and supports a lot already, has quite nice and easy setup and configuration of input/output.
In order to be able to support more games, maybe it would be possible to have some way of exposing API. I believe it could benefit games where a mod could do the telemetry exchange and lower the load for you as the dev of simhub.
I would like to see KSP to support few of the functions. I know there are some mods already to convert info to serial and send to arduino, they are unfortunately lacking functionality like multiple arduinos, refresh speed issues and such. I see that if there is API, then some modder could plug into Simhub and the game and make the middle mod for communication.
API could benefit some other games or even export modules. from some of the videos it seemed that in order to get telemetry, games send udp packets to specific port on localhost, so it kind of listens for the traffic. Most likely it might be possible to send data into it in correct format and it would even work, sending data back to game is more complicated and other topic. Then users who have made some addons for simhub could share them with others. It may help everyone and the whole project to grow even more and faster.
I have not looked into structure, but I guess one way for addon system to work would be to have some kind of "definition" files that could be added into the Simhub folder. Those definitions then can be loaded and describe the parameters that could be used from specific game and how they are sent or how they communicate with the game or game mod. Same system could work for output, even if using some custom firmware then the definition file could in a way to describe the way how data is sent to the device, it will most likely be more difficult to set up if it is not serial interface based device, but I believe then it could also send messages over the network to different computer to use it as "screen" if someone wants to develop an interface like that. Also it could then communicate via sockets or HTTP requests to local network or even same machine in order to maybe speak with some other closed source API that redirects to some specific controller. I guess it could open up so many possibilities and users able to extend.
I have not started to use it yet, but when I will, I am sure to give my contribution to the project.
So for the dev of the Simhub, maybe food for thought here.
Ok edit:
Checked and it seems to support quite a lot already for output devices and also has udp forwarding, which probably means that it is quite easy to write listener for UDP and do the forwarding to where-ever needed and not supported by SimHub already. Though TCP packets, web requests or other network based messaging support out of the box could be nice. Maybe even to support some message queue like RabbitMQ.
Hi ! Currently "output plugins" are possible using the provided SDK, but indeed game readers (as I call it) API exists but is not public. I need to think about it, because I've integrated lot of common features at the game reader level (launcher, udp forward, replays, game volume control ..) and it makes the API a bit complex to make all the features work as intended . Another complexity is that this API still evolves regularly (really regularly) and would force any third party readers to be updated regularly too to keep compatibility with simhub updates. This last aspect retained me to release this game reader API for now but it may be worth reconsidering this 😉
Hey,
This is something I'd also be really interested in.
I've been looking into GT7 telementry hoping to be able to integrate it into simhub but it looks like that isn't possible.
As an alternative to providing a game readers API in the SDK would you consider adding a "Generic" game reader which accepts UDP packets in a format that you define? Something similar to the functionality used in Sim Racing Studio ( https://gitlab.com/simracingstudio/srsapi/-/blob/master/api/Unity3D/SimRacingStudio.cs). This would make it relatively simple for developers to send data to SimHub.
Here's a pretty basic example using the SRS UDP API where someone receives the GT7 telemetry data, transforms it into the generic format that SRS can understand and sends it on to SRS. https://github.com/gt7coder/grandturismo-srs-proxy
Thanks,
Kolin