Wiki source code of positions/get_fms_data.php

Last modified by YellowFox_RD on 2025/11/27 08:21

Show last authors
1 {{toc/}}
2
3 Returns the FMS values of a vehicle or vehicle group.
4
5 If no given date range, the most recent data per vehicle will be returned.
6
7 = Description =
8
9 (% class="green mark" %)**GET**(%%)** ** positions/get_fms_data.php?company**=//COMPANY_RTIKEY//**&vehicle**=//VEHICLE_RTIKEY//**&start**=//YYYY-MM-DDTHH:MM:SS+HH:mm//**//&end//**=//YYYY-MM-DDTHH:MM:SS+HH:mm//**
10
11 = Parameter =
12
13 |=Parameter|=Description|=Type|=Hint|=Mandatory
14 |company|RTI company key|string| |yes
15 |vehicle|RTI vehicle key|string|(% colspan="1" rowspan="3" %)You need to set one of vehicle, group or import.|(yes)
16 |group|RTI group key|string|(yes)
17 |import|RTI import key|string|(yes)
18 |start|Start of query date range|datestring|Format: ISO 8601 (//YYYY-MM-DDTHH:MM:SS+HH:mm//)|no
19 |end|End of query date range|datestring|Format: ISO 8601 (//YYYY-MM-DDTHH:MM:SS+HH:mm//)|no
20 |query_date|(((
21 Date of dataset
22 )))|datestring|Format: ISO 8601 (//YYYY-MM-DDTHH:MM:SS+HH:mm//)|no
23 |offset|This query will return 5000 entries at max. Use an offset to get the next block.|int| |no
24
25 {{info}}
26 **Note on date restrictions**
27 You can use 3 different modes:
28 a) You specify start and end and receive all positions within this time period (these two times may be no more than 24 hours apart)
29 b) You only specify query_date and receive the most recent report for each vehicle at that time
30 c) You do not specify a date parameter and receive the most recent position for each vehicle
31
32 We recommend keeping the number of vehicles as low as possible in order to shorten the execution time, especially when querying historical data.
33 {{/info}}
34
35 = Return value =
36
37 A **string** will be returned. On error "**ERROR:Description**" will be returned.
38
39 == Field description ==
40
41 This functions result builds dynamically. It will only return fms values which are available for at least one of your requested vehicles. This means you might not get all documented result keys. Which FMS values are available, depends on your vehicle, the type of installed telematic box and the booked tariff. If you are missing a value, please contact our support.
42
43 FMS values are transmitted cyclically by the vehicle in a collected message.
44
45 You can use this function to query these messages. Some values may not be present in every message. If you query historical data (i.e., you have entered a specific date), data records may therefore also contain NULL values. If you query without a date, you will receive the current status of the vehicles. Here you will receive the latest known value for each FMS value. However, the individual values may be of different ages. Therefore, the return value of this function contains a separate timestamp for each individual FMS value.
46
47 === Header ===
48
49 |=Field|=Description
50 |_date|set date restriction
51 |_links|(((
52 If the query result exceeds the data limit, this is the link to next part of result.
53 )))
54 |has_more|Flag if there is more data
55
56 === Items ===
57
58 ==== Static values ====
59
60 These field are always available.
61
62
63 (% style="background-color:#ffffff" %)
64 |=Field|=Description
65 |unit|Fahrzeug mit Kennzeichen und RTI Ident
66
67 ==== FMS values ====
68
69 FMS values are always an object of value and gpsDate. They both might be NULL if the vehicle does not support or send a value. Values are raw data according to officiall FMS interface. It might be necessary to interpret or format values after request.
70
71 |=Field|=Description
72 |(((
73 acceleratorPedalPosition
74 )))|accelerator pedal positions in percent
75 |(((
76 adblueLevel
77 )))|AdBlue level in percent
78 |(((
79 ambientAirTemperature
80 )))|ambient air temperature in °C
81 |(((
82 atLeastOnePtoActive
83 )))|Is at least one auxiliary drive active?
84 |(((
85 axleWeight
86 )))|axle weight
87 |(((
88 brakeSwitch
89 )))|Brake applied since last report
90 |(((
91 clutchSwitch
92 )))|Clutch applied since last report
93 |(((
94 cruiseControlActive
95 )))|Is cruise control active?
96 |(((
97 directionIndicator
98 )))|direction of vehicle
99 |(((
100 engineCoolantTemp
101 )))|engine temperature in °C
102 |(((
103 enginePercentLoad
104 )))|engine torque in percent
105 |(((
106 enginePercentTorque
107 )))|engine torque
108 |(((
109 engineSpeed
110 )))|engine speed
111 |(((
112 fuelLevel1
113 )))|fuel level 1 in percent
114 |(((
115 fuelLevel2
116 )))|fuel level 2 in percent
117 |(((
118 fuelLiter
119 )))|(((
120 fuel level in liter
121 )))
122 |(((
123 fuelRate
124 )))|fuel consumption per hour
125 |(((
126 instantaneousFuelEconomy
127 )))|fuel consumption in kilometres per liter
128 |(((
129 overspeed
130 )))|overspeed warning
131 |(((
132 ptoState
133 )))|Status of auxiliary drive
134 |(((
135 serviceBrakeAirPressure1
136 )))|air pressure service brake 1
137 |(((
138 serviceBrakeAirPressure2
139 )))|air pressure service brake 2
140 |(((
141 serviceDistanceKm
142 )))|kilometres till next service
143 |(((
144 serviceIntervalDays
145 )))|days till next service
146 |(((
147 serviceIntervalKm
148 )))|kilometre interval service
149 |(((
150 tachoUnitSpeed
151 )))|speed
152 |(((
153 totalEngineHours
154 )))|total engine hours
155 |(((
156 totalFuelUsed
157 )))|total used fuel in liter
158 |(((
159 totalGasUsed
160 )))|total used gas
161 |(((
162 vehicleDistance
163 )))|total milage
164 |(((
165 vehicleMotionDetect
166 )))|(((
167 Is the vehicle moving?
168 )))
169 |(((
170 ignitionStatus
171 )))|Is ignition on?
172 |(((
173 batteryVoltage
174 )))|(((
175 battery voltage in Volt
176 )))
177 |(((
178 batteryWarning
179 )))|Is there a battery warning?
180 |(((
181 batteryStatus
182 )))|battery status
183 |(((
184 drivingEcoScoreFreewheel
185 )))|Eco-Score freewheel in percent
186 |(((
187 drivingEcoScoreConstancy
188 )))|Eco-Score constancy in percent
189 |(((
190 drivingEcoScoreBonusRange
191 )))|Eco-Score bonus range in percent
192 |(((
193 drivingEcoScoreAcceleration
194 )))|Eco-Score acceleration in percent
195 |(((
196 drivingConsumptionElectricalSinceReset
197 )))|E-consumption since reset in kWh/100km
198 |(((
199 drivingConsumptionElectricalSinceStart
200 )))|E-consumption since start in kWh/100km
201 |(((
202 drivingConsumptionFuelSinceReset
203 )))|fuel usage since reset in l/100km
204 |(((
205 drivingRangeElectrical
206 )))|E-driving range in km
207 |(((
208 drivingRangeElectricalMax
209 )))|max E-driving range in km
210 |(((
211 drivingRangeFuel
212 )))|fuel drinving range in km
213 |(((
214 fuelLevelWarning
215 )))|Is there a fuel warning?
216 |(((
217 drivingRangeAdblue
218 )))|AdBlue driving range in km
219 |(((
220 drivingConsumptionFuelSinceStart
221 )))|fuel consumption since start in l/100km
222 |(((
223 drivingRangeFuelWarning
224 )))|Is there a warning about fuel?
225 |(((
226 brakeFluidWarning
227 )))|Is there a warning about brake fluid?
228 |(((
229 washWaterLevelWarning
230 )))|Is there a warning about washing water?
231 |(((
232 brakePadsWarning
233 )))|Is there a warning about brake pads?
234 |(((
235 engineCoolantWarning
236 )))|Is there a warning about engine coolant?
237 |(((
238 brakePadsPrewarning
239 )))|Is there a prewarning about brake pads?
240 |(((
241 engineLimpModeActive
242 )))|Is there a warning about engine?
243 |(((
244 engineOilLevel
245 )))|engine iol level in percent
246 |(((
247 engineOilLevelWarning
248 )))|Is there a warning about engine oil?
249 |(((
250 drivingDistanceZeroEmissionsSinceReset
251 )))|(((
252 driven distance since reset without emissions
253 )))
254 |(((
255 drivingDistanceZeroEmissionsSinceStart
256 )))|driven distance since start without emissions
257 |(((
258 drivingTimeSinceStart
259 )))|driving time since start in minutes
260 |(((
261 drivingDistanceElectricalSinceReset
262 )))|driven kilometers by electrical power since reset
263 |(((
264 drivingDistanceElectricalSinceStart
265 )))|driven kilometers by electrical power since start
266 |(((
267 drivingDistanceFuelSinceReset
268 )))|driven kilometers by fuel since reset
269 |(((
270 drivingDistanceFuelSinceStart
271 )))|(((
272 driven kilometers by fuel since start
273 )))
274 |(((
275 parkingBrakeIsEngaged
276 )))|Is parking brake active?
277 |(((
278 lightsInteriorFrontOn
279 )))|Is front interior light on?
280 |(((
281 lightsInteriorReadingLampFrontLeftOn
282 )))|Is front left interior light on?
283 |(((
284 lightsInteriorReadingLampFrontRightOn
285 )))|Is front right interior light on?
286 |(((
287 lightsInteriorRearOn
288 )))|(((
289 Is rear interior light on?
290 )))
291 |(((
292 lightsLightSwitchStatus
293 )))|light mode
294 |(((
295 electricalDriveChargingActive
296 )))|Is electrival charging active?
297 |(((
298 electricalDriveChargingPower
299 )))|E-charging power in kW
300 |(((
301 electricalDriveChargingStatus
302 )))|E-chartging status
303 |(((
304 highVoltageBatteryStateOfCharge
305 )))|E-charge level in percent
306 |(((
307 drivingStateOfChargeDeparture
308 )))|E-charge level at departure in percent
309 |(((
310 electricalDriveChargingEndOfChargingTime
311 )))|E-charging time in minutes
312 |(((
313 chargingEndOfChargingTimeWeekday
314 )))|E-charging till
315 |(((
316 chargingSmartChargingStatus
317 )))|state Smart-Charging
318 |(((
319 batteryChargeLevel
320 )))|battery charage level in percent
321 |(((
322 drivingElectrical
323 )))|Is the vehicle currently driving electrical?
324 |(((
325 batteryPowerConsumptionTotal
326 )))|total E-consumption in kWh
327 |(((
328 batteryPowerRecupTotal
329 )))|E-Power by recup in kWh
330 |(((
331 batteryPowerUsed
332 )))|battery consumption in kW
333 |(((
334 tyrePressureIso
335 )))|(((
336 tyre pressure as described in ISO 11992
337
338 This norm displays tyres asa coordinate system. The key of the result object is the coordinate of the tyre.
339
340 Example:
341
342 {
343
344 "17": { "gpsDate": [...], "value": 4.3},
345
346 "29": { "gpsDate": [...], "value": 4.2},
347
348 [...]
349
350 }
351 )))
352 |mainPowerVoltage|main power voltage in Volt
353
354 ==== Windows and doors ====
355
356 |=Feld|=Beschreibung
357 |(((
358 windowsFrontLeftOpen
359 )))|Is front left window opened?
360 |(((
361 windowsFrontRightOpen
362 )))|Is front right window opened?
363 |(((
364 windowsRearLeftOpen
365 )))|Is rear left window opened?
366 |(((
367 windowsRearRightOpen
368 )))|Is rear right window opened?
369 |(((
370 doorsFrontLeftLocked
371 )))|Is front left door locked?
372 |(((
373 doorsFrontLeftOpen
374 )))|Is front left door opened?
375 |(((
376 doorsFrontRightLocked
377 )))|Is front right door locked?
378 |(((
379 doorsFrontRightOpen
380 )))|Is front right door opened?
381 |(((
382 doorsRearLeftLocked
383 )))|Is rear left door locked?
384 |(((
385 doorsRearLeftOpen
386 )))|​​​​​​​Is rear left door opened?
387 |(((
388 doorsRearRightLocked
389 )))|Is rear right door locked?
390 |(((
391 doorsRearRightOpen
392 )))|​​​​​​​Is rear right door opened?
393 |(((
394 doorsTrunkLocked
395 )))|Is trunk locked?
396 |(((
397 doorsTrunkOpen
398 )))|Is trunk opened?
399 |(((
400 doorsSunroofStatus
401 )))|state sunroof
402 |(((
403 doorsTankCapOpen
404 )))|Is tank cap opened?
405 |(((
406 doorsVehicleLocked
407 )))|Are all doors locked?
408
409 ==== Values EBS ====
410
411 |=(((
412 Feld
413 )))|=(((
414 Beschreibung
415 )))
416 |(((
417 ebsAxleLoadSum
418 )))|sum axle load in kg
419 |(((
420 ebsLoaded
421 )))|Is the truck loaded?
422 |(((
423 ebsRedWarningSignal
424 )))|Is there a red warning signal?
425 |(((
426 ebsAmberSignal
427 )))|Is there a yellow warning signal?
428 |(((
429 ebsOverload
430 )))|Is the truck overloaded?
431
432 ==== Values ECT pumps ====
433
434 |=Field|=Description
435 |(((
436 ectAvgCellTemperature
437 )))|average cell temperature
438 |(((
439 ectAvgCellVoltage
440 )))|average cell voltage
441 |(((
442 ectBatteryManagementAmperage
443 )))|Current consumption/output of the BMS
444 |(((
445 ectErrorCodeCount
446 )))|number of errors
447 |(((
448 ectGeneratorActiveDuration
449 )))|duration active state of generator
450 |(((
451 ectGeneratorControllerTemperature
452 )))|temperature generator controller
453 |(((
454 ectGeneratorRuntime
455 )))|runtime generator
456 |(((
457 ectGeneratorTemperature
458 )))|temperature generator
459 |(((
460 ectHighPressurePumpControllerTemperature
461 )))|(((
462 temperature high pressure pump controller
463 )))
464 |(((
465 ectHighPressurePumpDuration
466 )))|(((
467 duration active state of high pressure pump
468 )))
469 |(((
470 ectHighPressurePumpEngineTemperature
471 )))|(((
472 temperature high pressure pump engine
473 )))
474 |(((
475 ectHighPressurePumpRuntime
476 )))|runtime high pressure pump
477 |(((
478 ectHighestCellTemperature
479 )))|highest cell temperature
480 |(((
481 ectHighestCellVoltage
482 )))|highest cell voltage
483 |(((
484 ectLastErrorCode
485 )))|last error code
486 |(((
487 ectLowestCellTemperature
488 )))|lowest cell temperature
489 |(((
490 ectLowestCellVoltage
491 )))|lowest cell voltage
492 |(((
493 ectPumpSystemReadyDuration
494 )))|(((
495 duration ready state of pump system
496 )))
497 |(((
498 ectStateOfCharge
499 )))|state of charge
500 |(((
501 ectTotalBatteryVoltage
502 )))|total battery voltage
503 |(((
504 ectVacuumPumpControllerTemperature
505 )))|temperature vacuum pump controller
506 |(((
507 ectVacuumPumpDuration
508 )))|(((
509 duration active state of vacuum pump
510 )))
511 |(((
512 ectVacuumPumpEngineTemperature
513 )))|temperature vacuum pump engine
514 |(((
515 ectVacuumPumpRuntime
516 )))|vacuum pump runtime
517
518 == JSON ==
519
520 {{code language="json"}}
521 {
522 "_date": {
523 "query_date": "2025-11-07T13:07:23+01:00"
524 },
525 "_links": {
526 "next": {
527 "href": null
528 }
529 },
530 "has_more": false,
531 "items": [
532 {
533 "unit": {
534 "licensePlate": "FTL YF 123",
535 "rtiIdent": null
536 },
537 "engineCoolantTemp": {
538 "gpsDate": "2025-11-07T11:55:40+01:00",
539 "value": 79
540 },
541 "totalFuelUsed": {
542 "gpsDate": "2025-11-07T11:55:40+01:00",
543 "value": 44105
544 },
545 "tachoUnitSpeed": {
546 "gpsDate": "2025-11-07T11:55:40+01:00",
547 "value": 0
548 },
549 "cruiseControlActive": {
550 "gpsDate": "2025-11-07T11:55:40+01:00",
551 "value": 0
552 },
553 "vehicleDistance": {
554 "gpsDate": "2025-11-07T11:55:40+01:00",
555 "value": 158169
556 },
557 "fuelLevel1": {
558 "gpsDate": "2025-11-07T11:55:40+01:00",
559 "value": 46
560 },
561 "engineSpeed": {
562 "gpsDate": "2025-11-07T11:55:40+01:00",
563 "value": 598
564 },
565 "ptoState": {
566 "gpsDate": null,
567 "value": null
568 },
569 "vehicleMotionDetect": {
570 "gpsDate": "2025-11-07T11:55:40+01:00",
571 "value": 0
572 },
573 "acceleratorPedalPosition": {
574 "gpsDate": "2025-11-07T11:55:40+01:00",
575 "value": 0
576 },
577 "totalEngineHours": {
578 "gpsDate": "2025-11-07T11:55:40+01:00",
579 "value": 2674
580 },
581 "overspeed": {
582 "gpsDate": "2025-11-07T11:55:40+01:00",
583 "value": 0
584 },
585 "axleWeight": {
586 "gpsDate": "2025-11-07T11:45:33+01:00",
587 "value": 14680
588 },
589 "serviceDistanceKm": {
590 "gpsDate": "2025-11-07T11:55:40+01:00",
591 "value": 136490
592 },
593 "directionIndicator": {
594 "gpsDate": "2025-11-07T11:55:40+01:00",
595 "value": 1
596 },
597 "fuelLevel2": {
598 "gpsDate": null,
599 "value": null
600 },
601 "enginePercentTorque": {
602 "gpsDate": "2025-11-07T11:55:40+01:00",
603 "value": 11
604 }
605 }
606 ]}
607 {{/code}}
608
609 = Example cals =
610
611 **Date range for a group**
612 {{code language="java"}}https://map.yellowfox.de/rti/positions/get_fms_data.php?company=COMPANY_RTIKEY&group=GROUP_RTIKEY&start=2022-09-22T13:23:00%2B00:00:00&end=2022-09-22T14:23:00%2B00:00:00{{/code}}
613
614 **Query date for vehicle**
615 {{code language="java"}}https://map.yellowfox.de/rti/positions/get_fms_data.php?company=COMPANY_RTIKEY&vehicle=VEHICLE_RTIKEY&query_date=2022-09-22T13:23:00%2B00:00:00{{/code}}
616
617 **Latest data for vehicle by RTI Ident**
618 {{code language="java"}}https://map.yellowfox.de/rti/positions/get_fms_data.php?company=COMPANY_RTIKEY&vehicle={"type":"car_ident","groupKey":"GROUP_RTIKEY","ident":"VEHICLE_IDENT"}{{/code}}