efla83 Posted January 5, 2023 Share Posted January 5, 2023 hello friends, how to export speed or information to arduino? In order to make a secondary simulation screen 1 Link to comment Share on other sites More sharing options...
Gazz292 Posted January 6, 2023 Share Posted January 6, 2023 i'd wait at least until the whole simulator is released, a lot of stuff is turned off for the playtests, also, not sure why you would use an arduino to display things on a 'screen' on a real speedometer with a moving needle, yes you need the software to hardware interface that an arduino provides, but to take a software source (the trains speed data' from the sim) and display it on a software based screen (2nd monitor, android tablet, phone etc) you want to keep it all in software, so write a bit of code that grabs the speed and other data from the train, and sends it to another program running on your computer or the android tablet, then write the software that reads that data and displays it on the screen, Same way they did with https://www.ts-mfd.de/ for railworks/train simulator classic, where 2 pieces of software were used, one to extract the data from the train in the game, and send it to the software on the tablet / screen, where it's rendered into a replica of the MFD or EBuLa in German trains. 1 Link to comment Share on other sites More sharing options...
efla83 Posted January 6, 2023 Author Share Posted January 6, 2023 thank you, where is the file with the speed data and other information ont the pc ? I failed to find Link to comment Share on other sites More sharing options...
Gazz292 Posted January 7, 2023 Share Posted January 7, 2023 I'm not sure you can read from the local files on the playtest version of SimRail, When the full simulator releases in 6 days, it will include more stuff than we have at the moment, but the SDK's will be releasing a little later than the main simulator, and it's those that you'd usually use to help write the code to pull the data out of your train as you are driving it. When driving in multiplayer, it's possible to get the data from the servers, https://panel.simrail.eu/main/map.html does this to show your position and speed on the live map, but i find the live map always lags behind where i actually am by a few hundered meters, so other drivers pass me in the sim about 10+ seconds before they are shown passing me on the map. Hopefully when the full version of the sim is released for sale, we will be able to access the local data needed. Link to comment Share on other sites More sharing options...
DeadlyKungFu.Ninja Posted January 7, 2023 Share Posted January 7, 2023 (edited) The speed given by the HTTP API (and therefore shown by the panel's map) has a cache in front of it, that makes it refresh every 12seconds. That won't be accurate enough for a display on the desktop. Even if you could have a faster refresh rate, the API was not designed for realtime constant access and it would be bad for multiplayer stability for everyone. (plus you will, of course, have network lag). That data should be available somewhere tho, for sure, it is altleast available on your RAM and fetchable by quite complicated ways, or the devs might expose it somewhere available that we don't know yet. I think full release will bring more light on such topics, and if not, a few months after full release I think devs will have more time to answers such questions we have 🙂 There are various tools that would allow you to scan your RAM in the game to find the values you want, but I won't enter such details because it is not clear if it will ever be allowed as such tools can wreak havoc in a multiplayer game, and may give you a ban in case of malicious usage. Edited January 7, 2023 by DeadlyKungFu.Ninja 1 Link to comment Share on other sites More sharing options...
Gazz292 Posted January 7, 2023 Share Posted January 7, 2023 ahh yes, i was thinking it would not be a good idea to get infor from the servers for things other than the map, there can only be so many connections / calls for data before things slow down or bad things happen. i'm hoping the SDK's that will be released later on will give us the ability to pull data from our train, like was possible with Omsi, and railworks / train simulator classic, 1 Link to comment Share on other sites More sharing options...
DeadlyKungFu.Ninja Posted January 7, 2023 Share Posted January 7, 2023 23 minutes ago, Gazz292 said: ahh yes, i was thinking it would not be a good idea to get infor from the servers for things other than the map, there can only be so many connections / calls for data before things slow down or bad things happen. i'm hoping the SDK's that will be released later on will give us the ability to pull data from our train, like was possible with Omsi, and railworks / train simulator classic, Well you can use the data for many stuff like this I did 😄 Or the "replay" project we are running in the FR community that will allow us to keep a constant history to check for trolls etc. But nothing that needs realtime updates 🙂 ! Link to comment Share on other sites More sharing options...
efla83 Posted January 10, 2023 Author Share Posted January 10, 2023 @inomushis ? @ Link to comment Share on other sites More sharing options...
debiantippse Posted January 10, 2023 Share Posted January 10, 2023 If i remember correctly the Playtest should have the option to enable Dev/Com Ports who could be used to get data from the Trains. 1 Link to comment Share on other sites More sharing options...
efla83 Posted January 16, 2023 Author Share Posted January 16, 2023 I hope that we will soon have info on an API or other means of retrieving information from the live game. door status, pantograph, next signal, train number…. in gray all that is displayed on the screen. this is something that once programmed on arduino improves the simulation 🙂 1 Link to comment Share on other sites More sharing options...
GeeForge Posted January 16, 2023 Share Posted January 16, 2023 On 1/10/2023 at 11:08 PM, debiantippse said: If i remember correctly the Playtest should have the option to enable Dev/Com Ports who could be used to get data from the Trains. Yes. You can receive something on the TCP tcp://127.0.0.1:51528 Link to comment Share on other sites More sharing options...
efla83 Posted January 27, 2023 Author Share Posted January 27, 2023 @GeeForge how to receive data with the adresse 127.0.0.1:51528 ? I can't find how to do it Link to comment Share on other sites More sharing options...
efla83 Posted January 30, 2023 Author Share Posted January 30, 2023 @GeeForge Could you tell me more about this? With TCP Port 51528 Thank 🙂 Link to comment Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now