LMU-Socket – Telemetrie-Plugin für Le Mans Ultimate

Ein Plugin für Le Mans Ultimate, das Telemetrie und Scoring des Spiels als JSON per UDP verschickt – einfach zu lesen aus jeder Sprache und jedem Tool. Es ist die Datenquelle von PitPipe.
Das Prinzip
Nur senden
Sobald das Spiel Daten liefert, gehen sie raus – ohne Verbindung, ohne Handshake, ohne Rückkanal. Standardmäßig an ein Programm auf demselben Rechner; mit broadcast=1 hören beliebig viele Programme und Rechner im Netz zu.
LMU 1:1
Alle Felder der LMU-Schnittstelle kommen unverändert an: gleiche Namen, gleiche Werte, gleiche Einheiten. Nichts wird weggelassen oder umgerechnet.
Einfach zu lesen
Ein JSON-Objekt pro Datagramm, das Feld Type sagt, was drinsteht. Ein paar Zeilen Python, Go oder Node reichen zum Mitlesen.
Das Datenformat ab Version 0.2.0
Seit 0.2.0 ist das Scoring aufgeteilt: Auf ein Session-Paket folgen die Fahrzeuge in Teilen zu höchstens 20 Autos. Alle Pakete eines Updates tragen dieselbe Sequenznummer mScoringSeq; der Empfänger setzt sie wieder zusammen und erhält genau die Scoring-Struktur des Spiels. Fehlt ein Teil, gilt das nächste Update. Außerdem kommt die Karkassentemperatur jetzt unter ihrem richtigen Namen mTireCarcassTemperature an.
TelemInfoV01
~100 pro SekundeEin Fahrzeug pro Paket: Bewegung, Antrieb, Eingaben, Aero, Schaden, Hybrid und Virtual Energy, die LMU-Felder für TC, ABS und Motor-Map und vier Räder mit Temperaturen, Druck, Verschleiß und Karkasse.
ScoringInfoV01
~5 pro SekundeDas Session-Paket: Strecke, Session, Zeiten, Flaggen und Startampel, Wetter und Streckenzustand, Track Limits, Multiplayer. Es nennt die Sequenznummer und wie viele Fahrzeug-Teile folgen.
ScoringVehicles
je Update 1 bis 4 TeileDie Fahrzeuge des Feldes, höchstens 20 pro Paket: Position, Runden, Sektor- und Rundenzeiten, Abstände, Boxenstatus und Flaggen. Ein volles Feld passt nicht in ein UDP-Datagramm – deshalb die Teile.
System
bei EreignissenLoad, Unload, Start Session, End Session, Enter Realtime, Exit Realtime.
{"Type":"ScoringInfoV01", "mTrackName":"Le Mans", …, "mScoringSeq":58, "mVehicleChunks":2}
{"Type":"ScoringVehicles", "mScoringSeq":58, "mChunk":0, "mChunks":2, "mVehicles":[ …20 Autos… ]}
{"Type":"ScoringVehicles", "mScoringSeq":58, "mChunk":1, "mChunks":2, "mVehicles":[ …3 Autos… ]} Einheiten wie im Spiel: Reifentemperaturen in Kelvin, Geschwindigkeiten in m/s, Zeiten in Sekunden. Telemetrie und Scoring gehören über mID zusammen.
Beispielpakete
Echte Pakete aus einem Mitschnitt: Training auf dem Circuit de la Sarthe, 23 GT3-Fahrzeuge, das eigene Auto steht in der Box. Namen, Server-IP und -Port sind unkenntlich gemacht. Auf dem Draht steht jedes Paket in einer Zeile, hier ist es zum Lesen eingerückt.
TelemInfoV01Telemetrie eines Fahrzeugs, ~6,2 KB
{
"Type": "TelemInfoV01",
"mABS": 0,
"mABSActive": false,
"mABSMax": 0,
"mAntiStallActivated": 0,
"mBatteryChargeFraction": 0,
"mClutchRPM": 0,
"mCurrentSector": -2147483648,
"mDeltaBest": 0,
"mDeltaTime": 0.009999999776482582,
"mDentSeverity": [0, 0, 0, 0, 0, 0, 0, 0],
"mDetached": false,
"mDrag": 0,
"mElapsedTime": 3211.9,
"mElectricBoostMotorRPM": 0,
"mElectricBoostMotorState": 0,
"mElectricBoostMotorTemperature": 0,
"mElectricBoostMotorTorque": 0,
"mElectricBoostWaterTemperature": 0,
"mEngineMaxRPM": 8500,
"mEngineOilTemp": 0,
"mEngineRPM": 0,
"mEngineTorque": 0,
"mEngineWaterTemp": 0,
"mExpansion": [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"mFilteredBrake": 1,
"mFilteredClutch": 0,
"mFilteredSteering": 0,
"mFilteredThrottle": 0,
"mFront3rdDeflection": 0,
"mFrontAntiSway": 0,
"mFrontAntiSwayMax": 0,
"mFrontDownforce": 0,
"mFrontFlapActivated": 0,
"mFrontRideHeight": 0,
"mFrontTireCompoundIndex": 1,
"mFrontTireCompoundName": "Wet",
"mFrontWingHeight": 0,
"mFuel": 1,
"mFuelCapacity": 120,
"mGear": 0,
"mHeadlights": false,
"mID": 46,
"mIgnitionStarter": 0,
"mInPitLane": true,
"mLapInvalidated": false,
"mLapNumber": 0,
"mLapStartET": -1,
"mLastImpactET": 0,
"mLastImpactMagnitude": 0,
"mLastImpactPos": {
"x": 0,
"y": 0,
"z": 0
},
"mLiftAndCoastProgress": 0,
"mLocalAccel": {
"x": -0.002757896203547716,
"y": -0.00009683912503533065,
"z": -0.0000934320196392946
},
"mLocalRot": {
"x": -1.9263165995653253e-7,
"y": -0.00004024316149298102,
"z": -0.000026290372261428274
},
"mLocalRotAccel": {
"x": -0.0000313961754727643,
"y": 0.002747799502685666,
"z": -0.0009900364093482494
},
"mLocalVel": {
"x": 0.01507694460451603,
"y": 0.00031357124680653214,
"z": 0.00047630540211685
},
"mMaxGears": 6,
"mMigration": 0,
"mMigrationMax": 0,
"mMotorMap": 0,
"mMotorMapMax": 0,
"mOri": [
[-0.05120772495865822, -0.002288860036060214, 0.9986854195594788],
[-0.013209408149123192, 0.9999114274978638, 0.0016143558314070106],
[-0.9986006617546082, -0.013109375722706318, -0.05123342201113701]
],
"mOverheating": false,
"mPhysicalSteeringWheelRange": 0,
"mPhysicsToGraphicsOffset": [-1.7881393432617188e-7, -0.36399999260902405, -0.20128268003463745],
"mPos": {
"x": -139.23611450195312,
"y": 8.273003578186035,
"z": 1201.8170166015625
},
"mRear3rdDeflection": 0,
"mRearAntiSway": 0,
"mRearAntiSwayMax": 0,
"mRearBrakeBias": 0.47999998927116394,
"mRearDownforce": 0,
"mRearFlapActivated": 0,
"mRearFlapLegalStatus": 0,
"mRearRideHeight": 0,
"mRearTireCompoundIndex": 1,
"mRearTireCompoundName": "Wet",
"mRegen": 0,
"mScheduledStops": 255,
"mSectorIndex": 0,
"mSoC": 0,
"mSpeedLimiter": 0,
"mSpeedLimiterActive": false,
"mSpeedLimiterAvailable": 1,
"mSteeringShaftTorque": 0,
"mTC": 0,
"mTCActive": false,
"mTCCut": 0,
"mTCCutMax": 0,
"mTCMax": 0,
"mTCSlip": 0,
"mTCSlipMax": 0,
"mTimeGapCarAhead": 0,
"mTimeGapCarBehind": 0,
"mTimeGapPlaceAhead": 0,
"mTimeGapPlaceBehind": 0,
"mTrackLimitsSteps": 0,
"mTrackName": "Circuit de la Sarthe",
"mTurboBoostPressure": 101325,
"mUnfilteredBrake": 1,
"mUnfilteredClutch": 0,
"mUnfilteredSteering": 0,
"mUnfilteredThrottle": 0,
"mVehicleChampionship": 1,
"mVehicleClass": 6,
"mVehicleModel": "Lamborghini Huracan LMGT3 Evo",
"mVehicleName": "Huracan Custom Team 2024 #397",
"mVirtualEnergy": 1,
"mVisualSteeringWheelRange": 719,
"mWheel": [
{
"mBrakePressure": 0,
"mBrakeTemp": 292.1739196777344,
"mCamber": 0,
"mCompoundIndex": 1,
"mCompoundType": 3,
"mDetached": false,
"mFlat": false,
"mGripFract": 0,
"mLateralForce": 0,
"mLateralGroundVel": 0,
"mLateralPatchVel": 0,
"mLongitudinalForce": 0,
"mLongitudinalGroundVel": 0,
"mLongitudinalPatchVel": 0,
"mOptimalTemp": 50,
"mPressure": 0,
"mRideHeight": 0.051552534103393555,
"mRotation": 0,
"mStaticUndeflectedRadius": 34,
"mSurfaceType": 0,
"mSuspForce": 3104.911376953125,
"mSuspensionDeflection": 0.028082966804504395,
"mTemperature": [0, 0, 0],
"mTerrainName": "RDRACEOLD,ROAD,",
"mTireCarcassTemperature": 0,
"mTireInnerLayerTemperature": [0, 0, 0],
"mTireLoad": 0,
"mToe": 0,
"mVerticalTireDeflection": 0.012191656045615673,
"mWear": 1,
"mWheelYLocation": -0.06960894167423248
},
{
"mBrakePressure": 0,
"mBrakeTemp": 292.1739196777344,
"mCamber": 0,
"mCompoundIndex": 1,
"mCompoundType": 3,
"mDetached": false,
"mFlat": false,
"mGripFract": 0,
"mLateralForce": 0,
"mLateralGroundVel": 0,
"mLateralPatchVel": 0,
"mLongitudinalForce": 0,
"mLongitudinalGroundVel": 0,
"mLongitudinalPatchVel": 0,
"mOptimalTemp": 50,
"mPressure": 0,
"mRideHeight": 0.051906198263168335,
"mRotation": 0,
"mStaticUndeflectedRadius": 34,
"mSurfaceType": 0,
"mSuspForce": 3062.88623046875,
"mSuspensionDeflection": 0.027729302644729614,
"mTemperature": [0, 0, 0],
"mTerrainName": "RDRACEOLD,ROAD,",
"mTireCarcassTemperature": 0,
"mTireInnerLayerTemperature": [0, 0, 0],
"mTireLoad": 0,
"mToe": 0,
"mVerticalTireDeflection": 0.012026641517877579,
"mWear": 1,
"mWheelYLocation": -0.06982630491256714
},
{
"mBrakePressure": 0,
"mBrakeTemp": 291.9939270019531,
"mCamber": 0,
"mCompoundIndex": 1,
"mCompoundType": 3,
"mDetached": false,
"mFlat": false,
"mGripFract": 0,
"mLateralForce": 0,
"mLateralGroundVel": 0,
"mLateralPatchVel": 0,
"mLongitudinalForce": 0,
"mLongitudinalGroundVel": 0,
"mLongitudinalPatchVel": 0,
"mOptimalTemp": 50,
"mPressure": 0,
"mRideHeight": 0.05446422100067139,
"mRotation": 0,
"mStaticUndeflectedRadius": 35,
"mSurfaceType": 0,
"mSuspForce": 4112.49169921875,
"mSuspensionDeflection": 0.03913724422454834,
"mTemperature": [0, 0, 0],
"mTerrainName": "RDRACEOLD,ROAD,",
"mTireCarcassTemperature": 0,
"mTireInnerLayerTemperature": [0, 0, 0],
"mTireLoad": 0,
"mToe": 0,
"mVerticalTireDeflection": 0.01568494737148285,
"mWear": 1,
"mWheelYLocation": -0.06385624408721924
},
{
"mBrakePressure": 0,
"mBrakeTemp": 291.9939270019531,
"mCamber": 0,
"mCompoundIndex": 1,
"mCompoundType": 3,
"mDetached": false,
"mFlat": false,
"mGripFract": 0,
"mLateralForce": 0,
"mLateralGroundVel": 0,
"mLateralPatchVel": 0,
"mLongitudinalForce": 0,
"mLongitudinalGroundVel": 0,
"mLongitudinalPatchVel": 0,
"mOptimalTemp": 50,
"mPressure": 0,
"mRideHeight": 0.05480736494064331,
"mRotation": 0,
"mStaticUndeflectedRadius": 35,
"mSurfaceType": 0,
"mSuspForce": 4062.850830078125,
"mSuspensionDeflection": 0.038794100284576416,
"mTemperature": [0, 0, 0],
"mTerrainName": "RDRACEOLD,ROAD,",
"mTireCarcassTemperature": 0,
"mTireInnerLayerTemperature": [0, 0, 0],
"mTireLoad": 0,
"mToe": 0,
"mVerticalTireDeflection": 0.015495618805289268,
"mWear": 1,
"mWheelYLocation": -0.06407742202281952
}
],
"mWiperState": 1
}ScoringInfoV01Session-Paket, ~0,9 KB
{
"Type": "ScoringInfoV01",
"mAmbientTemp": 16.016177908113434,
"mAvgPathWetness": 0,
"mCloudCoverage": 2,
"mCurrentET": 3208.6,
"mDarkCloud": 0,
"mEndET": 7230,
"mGameMode": 2,
"mGamePhase": 5,
"mInRealtime": false,
"mIsFixedSetup": false,
"mIsPasswordProtected": false,
"mLapDist": 13623.9677734375,
"mMaxLaps": 2147483647,
"mMaxPathWetness": 0,
"mMaxPlayers": 34,
"mMinPathWetness": 0,
"mNumRedLights": 5,
"mNumVehicles": 23,
"mPlayerName": "Player One",
"mPlrFileName": "Settings",
"mRaining": 0,
"mResultsStream": "",
"mScoringSeq": 58,
"mSectorFlag": [11, 11, 11],
"mServerName": "",
"mServerPort": 0,
"mServerPublicIP": 0,
"mSession": 1,
"mSessionTimeRemaining": 4021.39990234375,
"mStartET": 19800,
"mStartLight": 0,
"mTimeOfDay": 23008.59765625,
"mTrackGripLevel": 0,
"mTrackLimitsStepsPerPenalty": 16,
"mTrackLimitsStepsPerPoint": 4,
"mTrackName": "Circuit de la Sarthe",
"mTrackTemp": 8.999993896493777,
"mVehicleChunks": 2,
"mWind": {
"x": 0,
"y": 0,
"z": 0
},
"mYellowFlagState": 0
}ScoringVehiclesTeil 2 von 2 mit 3 Fahrzeugen, ~4,6 KB
{
"Type": "ScoringVehicles",
"mChunk": 1,
"mChunks": 2,
"mScoringSeq": 58,
"mVehicles": [
{
"mAttackMode": 0,
"mBestLapSector1": -1,
"mBestLapSector2": -1,
"mBestLapTime": -1,
"mBestSector1": -1,
"mBestSector2": -1,
"mControl": 2,
"mCountLapFlag": 1,
"mCurSector1": -1,
"mCurSector2": -1,
"mDRSState": false,
"mDriverName": "Driver Two",
"mEstimatedLapTime": 249.46827697753906,
"mFinishStatus": 0,
"mFlag": 0,
"mFuelFraction": 0,
"mHeadlights": 1,
"mID": 41,
"mInGarageStall": false,
"mInPits": true,
"mIndividualPhase": 5,
"mIsPlayer": false,
"mLapDist": 228.093505859375,
"mLapStartET": 0,
"mLapsBehindLeader": 2,
"mLapsBehindNext": 0,
"mLastLapTime": 0,
"mLastSector1": 0,
"mLastSector2": 0,
"mLocalAccel": [-0.0018068104982376099, 0.0002593429817352444, 0.03119664452970028],
"mLocalRot": [0, 0, 0],
"mLocalRotAccel": [0, 0, 0],
"mLocalVel": [-0.03886294364929199, 0.06204007565975189, -16.624895095825195],
"mNumPenalties": 0,
"mNumPitstops": 0,
"mOri": [
[-0.9983271360397339, -0.00024189289251808077, -0.05781792476773262],
[0.00023834970488678664, 0.9999655485153198, -0.008299078792333603],
[0.057817939668893814, -0.008298976346850395, -0.9982926249504089]
],
"mPathLateral": -0.09183786809444427,
"mPitGroup": "Group99",
"mPitLapDist": 132.5522003173828,
"mPitState": 5,
"mPlace": 18,
"mPos": [-150.2521514892578, 9.2705078125, 1289.1875],
"mQualification": 23,
"mSector": 1,
"mServerScored": 1,
"mSteamID": "0",
"mTimeBehindLeader": 0,
"mTimeBehindNext": 4.237590789794922,
"mTimeIntoLap": 4.289837837219238,
"mTotalLaps": 0,
"mTrackEdge": -2.5399999618530273,
"mUnderYellow": false,
"mUpgradePack": [132, 144, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"mVehFilename": "397_25_Z06GT3R",
"mVehicleClass": "GT3",
"mVehicleName": "Z06GT3R Custom Team 2025 #397"
},
{
"mAttackMode": 0,
"mBestLapSector1": -1,
"mBestLapSector2": -1,
"mBestLapTime": -1,
"mBestSector1": -1,
"mBestSector2": -1,
"mControl": 2,
"mCountLapFlag": 1,
"mCurSector1": -1,
"mCurSector2": -1,
"mDRSState": false,
"mDriverName": "Driver Three",
"mEstimatedLapTime": 249.46827697753906,
"mFinishStatus": 0,
"mFlag": 0,
"mFuelFraction": 0,
"mHeadlights": 1,
"mID": 42,
"mInGarageStall": false,
"mInPits": false,
"mIndividualPhase": 5,
"mIsPlayer": false,
"mLapDist": 704.3502807617188,
"mLapStartET": 0,
"mLapsBehindLeader": 2,
"mLapsBehindNext": 0,
"mLastLapTime": 0,
"mLastSector1": 0,
"mLastSector2": 0,
"mLocalAccel": [-5.643587112426758, 0.027620919048786163, -2.145747184753418],
"mLocalRot": [0.046875, 0.09375, -0.015625],
"mLocalRotAccel": [0, 0, 0],
"mLocalVel": [0.2404460906982422, -0.07999837398529053, -43.9194450378418],
"mNumPenalties": 0,
"mNumPitstops": 0,
"mOri": [
[-0.49492132663726807, -0.024330653250217438, -0.8685970902442932],
[0.01982409879565239, 0.9990316033363342, -0.039279960095882416],
[0.8687115907669067, -0.036659643054008484, -0.4939596951007843]
],
"mPathLateral": 0.13780559599399567,
"mPitGroup": "Group99",
"mPitLapDist": 137.5244903564453,
"mPitState": 5,
"mPlace": 16,
"mPos": [-7.867379665374756, 23.98267364501953, 1722.2138671875],
"mQualification": 24,
"mSector": 1,
"mServerScored": 1,
"mSteamID": "0",
"mTimeBehindLeader": 0,
"mTimeBehindNext": 20.729751586914062,
"mTimeIntoLap": 12.03793716430664,
"mTotalLaps": 0,
"mTrackEdge": 2.9749999046325684,
"mUnderYellow": false,
"mUpgradePack": [132, 144, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"mVehFilename": "397_25_BMW",
"mVehicleClass": "GT3",
"mVehicleName": "BMW GT3 Custom Team 2025 #397"
},
{
"mAttackMode": 0,
"mBestLapSector1": -1,
"mBestLapSector2": -1,
"mBestLapTime": -1,
"mBestSector1": -1,
"mBestSector2": -1,
"mControl": 1,
"mCountLapFlag": 1,
"mCurSector1": -1,
"mCurSector2": -1,
"mDRSState": false,
"mDriverName": "Player One",
"mEstimatedLapTime": 249.46827697753906,
"mFinishStatus": 0,
"mFlag": 0,
"mFuelFraction": 0,
"mHeadlights": 0,
"mID": 46,
"mInGarageStall": true,
"mInPits": true,
"mIndividualPhase": 5,
"mIsPlayer": true,
"mLapDist": 141.2034912109375,
"mLapStartET": -1,
"mLapsBehindLeader": 2,
"mLapsBehindNext": 0,
"mLastLapTime": 0,
"mLastSector1": 0,
"mLastSector2": 0,
"mLocalAccel": [-0.0015417730901390314, -0.000026046385755762458, -0.00005606860213447362],
"mLocalRot": [5.617727083517821e-7, 0.00006905988266225904, -0.000013126799785823096],
"mLocalRotAccel": [0.00003610560088418424, 0.001203659805469215, 0.0001675446255831048],
"mLocalVel": [0.014954273588955402, 0.00031037419103085995, 0.0004719753051176667],
"mNumPenalties": 0,
"mNumPitstops": 0,
"mOri": [
[-0.051208820194005966, -0.002288967836648226, 0.998685359954834],
[-0.01321069709956646, 0.9999114274978638, 0.0016143831890076399],
[-0.9986006021499634, -0.013110658153891563, -0.05123452469706535]
],
"mPathLateral": 16.80126190185547,
"mPitGroup": "Group99",
"mPitLapDist": 142.6239013671875,
"mPitState": 5,
"mPlace": 21,
"mPos": [-139.23611450195312, 8.273003578186035, 1201.8170166015625],
"mQualification": 23,
"mSector": 1,
"mServerScored": 1,
"mSteamID": "0",
"mTimeBehindLeader": 0,
"mTimeBehindNext": 0.07265281677246094,
"mTimeIntoLap": 2.7567567825317383,
"mTotalLaps": 0,
"mTrackEdge": 12.36299991607666,
"mUnderYellow": false,
"mUpgradePack": [8, 33, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0],
"mVehFilename": "397_24_HURACAN",
"mVehicleClass": "GT3",
"mVehicleName": "Huracan Custom Team 2024 #397"
}
]
}SystemMeldungen beim Laden und beim Start der Session
[
{
"Message": "Load",
"Type": "System"
},
{
"Message": "Start Session",
"Type": "System"
}
]Einrichtung
- 1
LeMansUltimateTelemetryPlugin.dllin den OrdnerPluginsim Installationsverzeichnis von Le Mans Ultimate kopieren. - 2
In
UserData/player/CustomPluginVariables.JSONden Abschnitt des Plugins eintragen. Ohne diesen Eintrag sendet das Plugin nichts. - 3
Spiel starten – die Daten kommen per UDP auf Port 5000 an.
{
"LeMansUltimateTelemetryPlugin.dll": {
" Enabled": 1,
"telemetry": 1,
"scoring": 1,
"debug": 0,
"broadcast": 0
}
}| Variable | Werte |
|---|---|
| telemetry | 0 = aus, 1 = nur das eigene Auto, 2 = alle Fahrzeuge |
| scoring | 0 = aus, 1 = an |
| debug | 1 = jedes gesendete Paket ins Log des Spiels schreiben |
| broadcast | 0 = nur an 127.0.0.1, 1 = Broadcast ins Netz (Empfänger auf einem anderen Rechner) |
Für PitPipe: telemetry 1 und scoring 1.
Download
LeMansUltimateTelemetryPlugin.dllImmer die neueste Version – alle Versionen und Änderungen
Quellcode auf GitLab