How to view Fault Codes (DTC) coming from OBD device

Cameron5 years ago

Hello

I have and OBD device (Ulbotech T381-E) Hooked up to an OBD Simulator which is supposedly reporting a fault code. The OBD device should be picking up this fault code and sending it to Traccar, but I cannot for the life of me find where it would be going. Assuming there is nothing wrong with the Simulator or OBD Device, How would I got about accessing any reported fault codes for a given device via the API? I had though it would be an Attribute on the device under the Positions endpoint but all I am getting is this:

{
        "id": xxx,
        "attributes": {
            "ignition": true,
            "status": 576,
            "odometer": 4116760,
            "power": 12.63916015625,
            "temp1": 40.9326171875,
            "battery": 3.93798828125,
            "geofenceIn": 0,
            "geofenceAlarm": 0,
            "coolantTemp": 4,
            "rpm": 40,
            "obdSpeed": 130,
            "fuel": 0,
            "clearedDistance": 0,
            "fuelConsumption": 27.625,
            "event": 1,
            "distance": 0,
            "totalDistance": 15841367.31,
            "motion": false,
            "hours": 3142000
        },
        "deviceId": xxx,
        "type": null,
        "protocol": "ulbotech",
        "serverTime": "2019-04-03T08:06:30.170+0000",
        "deviceTime": "2019-04-02T22:05:34.000+0000",
        "fixTime": "2019-03-21T21:41:16.000+0000",
        "outdated": true,
        "valid": true,
        "latitude": "xxx",
        "longitude": "xxx",
        "altitude": 0,
        "speed": 0,
        "course": 0,
        "address": null,
        "accuracy": 0
    }

Any help is appreciated!

Anton Tananaev5 years ago

It should be in attributes, but I don't see it.

Willem5 years ago

As Anton mentioned. I have a device where I have DTC1 and DTC2 attributes, but you don not have anything to that effect in your attributes (it could be called something else, which is in any case not in the attribute list).

Rafael Miquelino5 years ago

Hi,

I have pretty much the same issue. Is there something I need to do to have the DTC available im my attributes?

I use a VT200. Follow bellow the returning message of the \positions endpoint:

{ 
   "id":198125,
   "attributes":{ 
      "sat":0,
      "rssi":0,
      "odometer":4685000,
      "status":2097408,
      "raw":"504113d8158b268b430000107a930f2700000f004ba0b829",
      "distance":53.38,
      "totalDistance":2.0027218598E8,
      "motion":true
   },
   "deviceId":2,
   "type":null,
   "protocol":"vt200",
   "serverTime":"2019-09-15T17:01:02.000+0000",
   "deviceTime":"2019-09-15T16:59:56.000+0000",
   "fixTime":"2019-09-15T16:59:56.000+0000",
   "outdated":false,
   "valid":false,
   "latitude":-23.011065,
   "longitude":-45.54338,
   "altitude":0.0,
   "speed":7.01944,
   "course":78.0,
   "address":null,
   "accuracy":0.0,
   "network":null
}
Cameron5 years ago

So for me, the issue ended up being that while the simulator I was using was correctly reporting DTCs to my ELM327, the Ulbotech device I had actually read the fault codes in a slightly different way. I got an Ulbotech simulator, and then the device started reporting DTCs correctly, so it was never a Traccar issue.

Are you using the device with a simulator or an actual car?

Rafael Miquelino5 years ago

Hi,

It’s an actual vehicle. Do you know what would be the behavior if no DTC are detected?

Thanks

Cameron5 years ago

For my devices, when there are no DTCs it doesn't report the attribute at all. My test car was not throwing error codes, which is why i had to get the simulator in the first place.

Rafael Miquelino5 years ago

Ok. Goof to know. Will double check if there are active DTCs on the test vehicle. I thought it would report the attribute anyway but with a null value.