LiveTiming - Live web stats for iRacing - iRacing Motorsport Simulations - DrivingItalia.NET simulatori di guida Jump to content

Recommended Posts

Posted
Update: new version (1.1) released!

New in 1.1:

1) Completely rewritten and load tested build in webserver, which now should be working better

2) Introduced PHP mode, where LT Server send data to a PHP script that then broadcast to all clients

3) Revised and much better interface

4) Implemented multithreading for telemetry, webserver and PHP broadcasts

5) Port number now can be specified

6) LT Server now saves your configurations

7) Now LTS keeps a realtime connection with sim telemetry

For the last couple of days I've been working in this little software called LiveTiming. It basically broadcast information about a live session (practice/qualify/race) to a webpage, so people can see the the standings almost in real time.

Here it what it looks like from a browser window:

livetiming_example.png

For this to work, you have to upload the webpage template to a host of your choice, so other can access it. Then you need to join a session (as a player or spec) and run LiveTiming server so it can grab the data from the sim and send to everyone who access the web site. The server is pretty simple and support the iWrap API:

lt_12.png

The new version now has two mode of operating: using the built in webserver (better than the one from the old version) or using PHP to broadcast information.

Here's is the readme, with detailed instructions on how to set it up:

LiveTiming - Live website statistics for iRacing.com events Developed by: Fernando Birck - www.fergonez.net ############################ 1) Instalation instructions: LiveTiming now offers two broadcasting methods: using a remote PHP file that is stored in a webhost of your choice, or using the internal LiveTiming webserver. Depending on which mode you decide to go with, you'll have to modify some files. The first one is the JS. Open 'script.js' from the folder 'website\files' into a text editor like Notepad. You'll see these lines: var url = "http://yourip:5050/"; var autorefresh = 30000; //var mode = "webserver"; var mode = "php"; ##LT Webserver mode If you want to use the internal webserver, uncomment "mode = webserver" and comment (//) "mode = php". You'll also need to setup the "url", pointing it to your IP address. Port 5050 is the default one, but now you can choose the which port you will use inside the software. Be careful if you chose port 80 or 8080 (standard HTTP server ports), as most residential ISPs block outgoing connections from it. ##PHP mode If you choose the PHP mode, you only need to make sure you have the line "mode = php" uncomment inside this file. You can leave the rest as it is. As the PHP mode creates a file in the host folder, make sure that folder have writing permissions (chmod). In this mode, you will also need to edit "config.php". Open it up. You'll see these lines: $endsession = true; $endtime = 120; $authkey = "mypassword"; $endsession, if set to true, will stop displaying the race stats after certain time without updates from LT server. This time is specified by $endtime variable, in seconds. $authkey is the authentication key that LT server will use to broadcast the data, which should be the same password used in LT server. This is needed to avoid people from messing up with the statistics. Then you just have to upload everything from the website folder. ############################ 2) Usage After setting up the javascript files and uploading the website to a host, you need to setup the server, which is pretty straightforward. LiveTiming supports iWrap, so you can use it along other iRacing plugins. Join an iRacing session (spectator recommended, but not necessary) and then run LiveTiming and connect to the API. Race statistics should be displayed very soon. Then you can start broadcasting that. #LT Webserver mode Choose the port (which needs to be the same one configured in the javascript file) and click "Broadcast" #PHP mode Choose the interval between updates where the data is sent to the PHP file Setup your authkey, which should be the same from "config.php" Point to the "data.php" on your webhost. ############################ 3) Troubleshooting 3.1) LiveTiming crashes when connecting to the API Make sure the iWrapClient.dll is in the same folder. If the problem persists, run LT as Administrador 3.2) LiveTiming is running but nothing appears at the website Give LT some time until it gets all the needed information from iRacing. When the session info appears in LT, it usually means that everything is ok. Also make sure you don't have a firewall blocking incoming connections to LT and that port is open in you router (if applies). 3.3) I can't see stats from PHP mode Check if there's a file "lasttiming" in your host. If not, then there's probably a permission problem. Make sure you run chmod in that folder and give writing permission

And here is the download link:

http://www.fergonez.net/files/livetiming_11.rar

You need .NET Framework 4 for the application to work. It was my first time seriously dealing with .NET programming, so it probably has some bugs that I didn't tracked. Please report any issues 3b63d1616c5dfcf29f8a7a031aaa7cad.gif

Regards,

Fernando.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.