forward.url is receiving the data. But the device attributes is an empty object

Manu Subramanian5 years ago

Hi There
We have setup the Tracaar with a forward.url
We are getting the data in that URL.
But in the device we have added some extra attributes. We are not getting any attributes information in the forwarded url.
Is there a way to get the attributes forwarded?

Thanks in advance
Manu

Anton Tananaev5 years ago

Device attributes? No. Forwarding only works for positions.

Manu Subramanian5 years ago

The data received is as below

{
  "position": {
    "id": 0,
    "attributes": {
      "event": 99,
      "sat": 12,
      "battery": 0,
      "distance": 0.46,
      "totalDistance": 16708665.24,
      "motion": false
    },
    "deviceId": 18,
    "type": null,
    "protocol": "telic",
    "serverTime": "2020-04-29T10:53:36.944+0000",
    "deviceTime": "2020-04-29T10:53:35.000+0000",
    "fixTime": "2020-04-29T10:53:35.000+0000",
    "outdated": false,
    "valid": true,
    "latitude": 55.66011,
    "longitude": 12.422766,
    "altitude": 0,
    "speed": 0,
    "course": 0,
    "address": null,
    "accuracy": 0,
    "network": null
  },
  "device": {
    "id": 18,
    "attributes": {},
    "groupId": 0,
    "name": "MyDevice",
    "uniqueId": "354679111111000",
    "status": "online",
    "lastUpdate": "2020-04-29T10:53:36.944+0000",
    "positionId": 817116,
    "geofenceIds": [],
    "phone": "",
    "model": "",
    "contact": "",
    "category": null,
    "disabled": false
  }
}

It will be really helpful if the device.attributes contains those attributes set for the device.
Is there any config variable to enable forwarding those attributes?

Anton Tananaev5 years ago

It should contain those attributes.

Manu Subramanian5 years ago

As you see above, it is coming as a empty object

"attributes": {},

Any clue on why it is coming empty?
Where can we check to debug the issue?

Anton Tananaev5 years ago

If it's empty, it probably means that you haven't added any attributes.

Manu Subramanian5 years ago

Sorry about that.
Yes. Initially I had not added attributes.
But latter when I added attributes, it was not coming initially.
Now I can see those are coming.
May be I was seeing another device's data.

Again sorry for your time and thanks a lot for the clarification.