GT7 is compatible with motion rig ?

  • Thread starter poumpoum
  • 686 comments
  • 188,097 views
project cars 2 didn't work for me with simhub. I have tried all the ways, although support is stated 🤷🏻
Have you enabled the telemetry from pc2 settings? Are you on console or pc when running the games? As far as I remember, I can simhub with pc2 using ps4. But that was long time a go. Since I do not have pc2 anymore, I couldn't confirm it.
In the link the dev @wotever mentioned that the lack of lap times, track ids etc from the game. But for some of us, we do care for cars orientation, as well as speed and accelerations informations. Why don't just let it be open and let the users do whatever they know/wants to interact with the data.
They are aiming for too much perfections, all that I can say. Lol
 
Have you enabled the telemetry from pc2 settings? Are you on console or pc when running the games? As far as I remember, I can simhub with pc2 using ps4. But that was long time a go. Since I do not have pc2 anymore, I couldn't confirm it.
In the link the dev @wotever mentioned that the lack of lap times, track ids etc from the game. But for some of us, we do care for cars orientation, as well as speed and accelerations informations. Why don't just let it be open and let the users do whatever they know/wants to interact with the data.
They are aiming for too much perfections, all that I can say. Lol
I have a ps4. Yes, in the udp settings. on the computer, the firewall turned off completely and tried to forward ports, also changed wi-fi to ethernet. Simhab writes that the game is disabled

28BEFB5D-02C1-4EF3-9BC3-85E1F7B9DDF1.jpeg
 
Normally port forwarding is not required a
I have a ps4. Yes, in the udp settings. on the computer, the firewall turned off completely and tried to forward ports, also changed wi-fi to ethernet. Simhab writes that the game is disabled
Normally port forwarding does not required afaik. Do you remember to enable it from the game itself?
 
I was looking for just connecting arduino nano(without ethernet capabilities) to usb port on my computers and read the telemetry data provided by the exe files.
what you're describing ins't impossible, but it'll also require a great deal of coding expertise to pull it off. Essentially what you're trying to do is create a streaming protocol between your computer and arduino via USB (which isn't standard). Also, the .exe file you're working with isn't built to integrate other programs with, so getting the output would be quite difficult.

I think your best bet option would be to get a wifi module for your nano and run your app directly on that. I know they make wifi modules for raspberry pi that plug straight into the USB port, they might have something similar for arduino
 
what you're describing ins't impossible, but it'll also require a great deal of coding expertise to pull it off. Essentially what you're trying to do is create a streaming protocol between your computer and arduino via USB (which isn't standard). Also, the .exe file you're working with isn't built to integrate other programs with, so getting the output would be quite difficult.

I think your best bet option would be to get a wifi module for your nano and run your app directly on that. I know they make wifi modules for raspberry pi that plug straight into the USB port, they might have something similar for arduino
@Lukejuryous ,thank you for your explanation. I didn't know that running an ethernet/wifi version of an arduino could be able to run an exe files since I'm very newbie in those MC.
Then, I might try to look for some python integration with a normal arduino first, because some user @gt7coders has publish a python code on his github. Yeah, I believe that's not an easy programming level to intergrate to, but I've seen some possibilities by using the pyfirmata, which I've been working into these few days.
For now, I'm only able to move the dc motor (however continuously, not as intended) by using simple if else statement in the python code regarding the speed/rpm from gtsports from ps4.
Since I am very new to python as well, I've dug into a great trouble by just inserting the if else logic inside an already defined function in python. Even to lit up the built-in led from my nano reflecting a certain rpms also lead me to no luck. LOL. Anyway, I found this very interesting and would love to hear if anyone here has a great success integrating those data into an arduino board.
My connection is, running python from win7 laptop, plugged in arduino board to laptop's usb, and read the data from ps4 using WiFi or ethernet.
 
@Lukejuryous ,thank you for your explanation. I didn't know that running an ethernet/wifi version of an arduino could be able to run an exe files since I'm very newbie in those MC.
Then, I might try to look for some python integration with a normal arduino first, because some user @gt7coders has publish a python code on his github. Yeah, I believe that's not an easy programming level to intergrate to, but I've seen some possibilities by using the pyfirmata, which I've been working into these few days.
For now, I'm only able to move the dc motor (however continuously, not as intended) by using simple if else statement in the python code regarding the speed/rpm from gtsports from ps4.
Since I am very new to python as well, I've dug into a great trouble by just inserting the if else logic inside an already defined function in python. Even to lit up the built-in led from my nano reflecting a certain rpms also lead me to no luck. LOL. Anyway, I found this very interesting and would love to hear if anyone here has a great success integrating those data into an arduino board.
My connection is, running python from win7 laptop, plugged in arduino board to laptop's usb, and read the data from ps4 using WiFi or ethernet.
just a shameless plug, but you could also use the python package i published https://pypi.org/project/granturismo/. same concept as @Nenkai's .exe, but built for python and with some improvements.

Arduinos are just small IoT computers, so you can run anything you want as long as it's compiled for the processor. Some languages like Python and Javascript dont need to be compiled into an exe, but run slower cuz they've gotta convert to machine code on the fly. For this purpose tho, python is more than fast enough.
 
just a shameless plug, but you could also use the python package i published https://pypi.org/project/granturismo/. same concept as @Nenkai's .exe, but built for python and with some improvements.

Arduinos are just small IoT computers, so you can run anything you want as long as it's compiled for the processor. Some languages like Python and Javascript dont need to be compiled into an exe, but run slower cuz they've gotta convert to machine code on the fly. For this purpose tho, python is more than fast enough.
I've bumped into that too, yesterday tbh. I found myself stuck on how to run it at the first place. Already have the package installed by pip, but not sure which part of the code I've should enter my ps4 ip address. The documentations are very great, just I' m being not a person that understands so much about the usage. LOL.
It's an honour to talk with the dev of that project.
Thanks again for helping out.
 
I've bumped into that too, yesterday tbh. I found myself stuck on how to run it at the first place. Already have the package installed by pip, but not sure which part of the code I've should enter my ps4 ip address. The documentations are very great, just I' m being not a person that understands so much about the usage. LOL.
It's an honour to talk with the dev of that project.
Thanks again for helping out.
You don't enter the IP in the code, you supply it on the command line:
Python:
python name-of-the-script-here.py 192.168.0.123
(depending on your OS and setup, you may need to replace "python" with "python3")

PLEASE NOTE: The above is an example! The name of the script depends on what you saved it as, and the IP of your Playstation is most likely something different than the above.

On @Lukejuryous link to https://pypi.org/project/granturismo/ you will find two examples. The second one "Streaming data example" is a good start. Copy and paste that code into a text file and name it for example "gttest.py" or something short to type. Run it like the above command line, and it should start dumping packets from the game to the terminal/command line.

For example, you could do something like this (untested, but should work), based on the example mentioned above:
Python:
if not packet.flags.loading_or_processing and not packet.flags.paused:
    stdscr.addstr(4, 0, f'Current speed:\t{packet.car_speed * 3.6:6.1f} km/h')
    report_suspension(packet.wheels)
Observe the new line of code inserted after the if-statement. That should print the car's current speed until the script is halted.

I would suggest though that you start small and get some experience with Python, it can be a bit finicky sometimes. Learn step by step, learn by doing, and Google is your friend for understanding the basic Python stuff. 👍
 
You don't enter the IP in the code, you supply it on the command line:
Hey @Bornhall ,thanks for clearing for the first part. I thought there should be an option to type like : --ps_ip 1xx.xxx.xxx.x in the cli.

The second one "Streaming data example" is a good start.
I will give this a try later on.
Observe the new line of code inserted after the if-statement. That should print the car's current speed until the script is halted.
I believe the codes will check if the game is not loading, processing or paused and will give the result as intended.
I would suggest though that you start small and get some experience with Python, it can be a bit finicky sometimes. Learn step by step, learn by doing, and Google is your friend for understanding the basic Python stuff. 👍
And for this reason it's a really great kick start and not an excuse to not learning python. Great stuff. Thank you for your great explaination.
 
I thought there should be an option to type like : --ps_ip 1xx.xxx.xxx.x in the cli.

I will give this a try later on.

I believe the codes will check if the game is not loading, processing or paused and will give the result as intended.
How the program accepts command line arguments varies. Another one in this thread had the IP in an environment variable, but I am specifically referring to the example script on lukejuryous pypi page.

And yes, that is what the if-statement does. But if you want to experiment with other data, that’s what my ADDED line of code was for.

Keep at it, you’ll get there 👍🏻
 
How the program accepts command line arguments varies. Another one in this thread had the IP in an environment variable, but I am specifically referring to the example script on lukejuryous pypi page.

And yes, that is what the if-statement does. But if you want to experiment with other data, that’s what my ADDED line of code was for.

Keep at it, you’ll get there 👍🏻
While trying to run pip install granturismo on the cli, I got the error regarding the salsa20. I'm on win7, with python 3.8. I can use other python program but that program I'm using salsa by running the - r requirements.txt files provided together with the program. Inside the requirements.txt files it uses pure_salsa20pyinstaller.
I've tried to change some code to use pure_salsa20pyinstaller and execute the pip install granturismo program from the cli, but it seems like the installer are still reading a cached/record version of the previous installation - my guess.
 
While trying to run pip install granturismo on the cli, I got the error regarding the salsa20. I'm on win7, with python 3.8. I can use other python program but that program I'm using salsa by running the - r requirements.txt files provided together with the program. Inside the requirements.txt files it uses pure_salsa20pyinstaller.
I've tried to change some code to use pure_salsa20pyinstaller and execute the pip install granturismo program from the cli, but it seems like the installer are still reading a cached/record version of the previous installation - my guess.
I think you’re mixing two things up here. Luke’s granturismo package is not (I believe) used by the other script you are using, so that’s why I pointed you to use Luke’s second example instead.
 
I think you’re mixing two things up here. Luke’s granturismo package is not (I believe) used by the other script you are using, so that’s why I pointed you to use Luke’s second example instead.
Nope. I'm on his script and the first step is to run pip install granturismo, which I was failed to due to the salsa20 building error.
 

Attachments

  • Screenshot_20221027_005504_com.android.chrome.jpg
    Screenshot_20221027_005504_com.android.chrome.jpg
    120 KB · Views: 19
While trying to run pip install granturismo on the cli, I got the error regarding the salsa20. I'm on win7, with python 3.8. I can use other python program but that program I'm using salsa by running the - r requirements.txt files provided together with the program. Inside the requirements.txt files it uses pure_salsa20pyinstaller.
I've tried to change some code to use pure_salsa20pyinstaller and execute the pip install granturismo program from the cli, but it seems like the installer are still reading a cached/record version of the previous installation - my guess.
If I'm not mistaken (which I may well be), when you do a:
Code:
pip install granturismo
...it will fetch the code from the internet, likely overwriting any alterations to the code you make.

What error message, if any, do you get if you do a simple:
Code:
pip install salsa20

It is for sure possible to change the code in Luke's granturismo package, but I wouldn't recommend it unless you know what you're doing.

If anything, there MAY be something messed up with your Python installation, but salvaging that is a whole other ballgame.
 
What error message, if any, do you get if you do a simple:
Code:
pip install salsa20
It's the same error when I was running the "pip install granturismo" command. Here's the screenshot. Might have to do with cached salsa20 or else, the MS Visual Studio C++ things.
 
Is there any application for ipad, I have Race Dash but it is very poor and no possibility to have the display on tv like the appli for android
 
I've bumped into that too, yesterday tbh. I found myself stuck on how to run it at the first place. Already have the package installed by pip, but not sure which part of the code I've should enter my ps4 ip address. The documentations are very great, just I' m being not a person that understands so much about the usage. LOL.
It's an honour to talk with the dev of that project.
Thanks again for helping out.
i suppose i could make the examples more clear. I've been doing python for so long it's hard to really tell what's enough information or not sometimes. @Bornhall answered your questions about the ip address well tho. Like they said, in my example the IP would be assed in as a parameter to the script.

if you'd like something more simple, you could try this (untested)

Code:
from granturismo.intake import Listener

# this if-statement says we should only run this code if the program is the main class.
# aka, not imported by another module (like how we import Listener). It's not needed here, but good practice. 
if __name__ == '__main__': 

    ip_addr = "REPLACE WITH YOUR PS IP ADDRESS"

    # This is what's known as a auto-closing block. when we call `with` that means python will
    # automatically close out the class Listener when the block (indented portion) ends. We need to
    # make sure Listener cleans up it's resources, and i feel `with` blocks are the most pythonic way
    # of doing that. 
    with Listener(ip_addr) as listener:

        # now we'll get the next available packet from the PS, or it'll wait indefinitely until one is sent.
        packet = listener.get()

        # now just print out the car's speed that the packet reported
        print(packet.car_speed)

Also, i recommend using pycharm to do your code edit and running in. it's my editor of choice for python. The community edition is free and all i ever use (or need) https://www.jetbrains.com/products/compare/?product=pycharm&product=pycharm-ce

Sorry. Here is the error.
The error says "Microsoft C++14 or greater is required". It says you need to use the Microsoft Build Tools then provides you a link.
 
I've been lurking this forum for a while now, and this thread made me create an account just to thank everyone's work and effort to get this up and running. I'm absolutely amazed that we went from not having telemetry to being able to set it up in 5 minutes using a laptop and docker over wifi (no physical setup required).

IMG_2798.jpg

(using Snipem's gt7dashboard)

Looking forward for future developments and hope to contribute somehow. Thanks again everyone!
 
I've been lurking this forum for a while now, and this thread made me create an account just to thank everyone's work and effort to get this up and running. I'm absolutely amazed that we went from not having telemetry to being able to set it up in 5 minutes using a laptop and docker over wifi (no physical setup required).

View attachment 1205804
(using Snipem's gt7dashboard)

Looking forward for future developments and hope to contribute somehow. Thanks again everyone!
Hi, I have little knowledge with GitHub, could you briefly explain how to get this program running? Thank you!
 
i suppose i could make the examples more clear. I've been doing python for so long it's hard to really tell what's enough information or not sometimes. @Bornhall answered your questions about the ip address well tho. Like they said, in my example the IP would be assed in as a parameter to the script.

if you'd like something more simple, you could try this (untested)

Code:
from granturismo.intake import Listener

# this if-statement says we should only run this code if the program is the main class.
# aka, not imported by another module (like how we import Listener). It's not needed here, but good practice.
if __name__ == '__main__':

    ip_addr = "REPLACE WITH YOUR PS IP ADDRESS"

    # This is what's known as a auto-closing block. when we call `with` that means python will
    # automatically close out the class Listener when the block (indented portion) ends. We need to
    # make sure Listener cleans up it's resources, and i feel `with` blocks are the most pythonic way
    # of doing that.
    with Listener(ip_addr) as listener:

        # now we'll get the next available packet from the PS, or it'll wait indefinitely until one is sent.
        packet = listener.get()

        # now just print out the car's speed that the packet reported
        print(packet.car_speed)

Also, i recommend using pycharm to do your code edit and running in. it's my editor of choice for python. The community edition is free and all i ever use (or need) https://www.jetbrains.com/products/compare/?product=pycharm&product=pycharm-ce


The error says "Microsoft C++14 or greater is required". It says you need to use the Microsoft Build Tools then provides you a link.
@Lukejuryous thanks for the clue. I've try to install the required c++, the error has gone but yet, still cant manage to have salsa20 installed on my system. It could be I cant run it on my win 7 pc. I will try on win10 when I have one.
Thanks for the suggestions on the pycharm, has been gone through it's tutorial once on youtube before, but I didn't go deeper yet on it.
 
Hi, I have little knowledge with GitHub, could you briefly explain how to get this program running? Thank you!
Sure thing. It depends a little on operating system and personal preference but I'll describe what I've done on Windows 11.

1. Take note of your PlayStation IP Address. You can find it in Settings > Network > Status.

2. Download the source code from github either from clicking Code >Download or this direct link.
Captura de tela_20221105_113707.png


3. Unzip and place it wherever you like, but take note of the PATH to the folder. On Windows 11, if you click the navigation bar it gives you in text.
Captura de tela_20221105_114539.png


Now, to run the code you can either install Python and its dependencies or use Docker to keep everything inside a container. I prefer Docker to make sure I won't break any old programs when installing a new one. But either is fine.

4. Download and install Docker. It will take a few clicks and reboots but it should go without problems. They have good documentation.

5. Create a text file inside the folder with the following contents (excluding the first line "Code:"):
Code:
version: '2'

services:

    gt7dashboard:
        build:
            context: <YOUR-PATH>
        restart: unless-stopped
        container_name: gt7dashboard
        #user: "1002"
        ports:
            - "5006:5006/tcp"
            - "33740:33740/udp"
        volumes:
            - <YOUR-PATH>\gt7data:/usr/src/app/data
        environment:
            - BOKEH_ALLOW_WS_ORIGIN=localhost:5006
            - GT7_PLAYSTATION_IP=<PLAYSTATION-IP>
            - TZ=Europe/Berlin

Replace <YOUR-PATH> and <PLAYSTATION-IP> accordingly.
Save it as docker-compose.yml

6. Open Windows PowerShell as an Administrator:
Captura de tela_20221105_122335.png


7. Type cd <YOUR-PATH> then docker-compose up.
Captura de tela_20221105_123950.png


When prompted, you should allow network permission for all networks.

Then, if everything goes right, you should be able to access the URL http://localhost:5006/app.

Let me know if this works for you. If not, we try something else.

Ideally in the near future we should have a .exe file that gets rid of all this setup.
 

Attachments

  • 1667662392923.png
    1667662392923.png
    6.9 KB · Views: 27
  • 1667661833005.png
    1667661833005.png
    73 KB · Views: 24
  • 1667659572909.png
    1667659572909.png
    10.2 KB · Views: 25
  • Captura de tela_20221105_113707.png
    Captura de tela_20221105_113707.png
    25.2 KB · Views: 35
Does this work with GTSport? I know Nenkai added support for Sport but just wanted to check its in your wrapper?
It doesn't. There's some slight differences with how GT Sport and GT6 data is formatted. I dont have either, so i never added them since i cant test it.

if you'd like. you can capture one or two packets that GT Sport sends you and share them with me. I'd able to use that data to spoof my PS's stream for testing. ofc, it'd still be cool to get your help testing on an actual game stream too
 
Back