What is the format of UDP webhook response?

We are using a doc to deploy a docker container which forwards to trigger a webhook. It is hosted on an AWS server with the UDP port exposed within my org. The thing is I don’t know much about the payload structure for the request and response but one request payload that always works via Packet Sender is:

{
  "type":"Buffer",
  "data":[131,5,70,116,3,48,137,1,1,1,2,0,1,90,179,197,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,44,0,0,0,0,0,0,31,8,7,2,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
}

it responds with: \83\05Ft\030\89\01\01\02\01\01\02\00\00\00\00\00 .

Now I think from looking at the request payload structure, it is a buffer converted to json and sent to trigger the webhook. However, I can’t seem to comprehend the response payload format ie., ASCII, Octal, Binary, Buffer, etc.

Furthermore, here is an excerpt from the docker logs:

FORWARDING port 9000 to https://triggers.losant.com/webhooks/l0f8O1fJ1FkxXrdlAkWKTOGIPxBjiK4E4pbJRqPA
9000 INBOUND (49.36.129.204:53589) 7b2274797065223a22427566666572222c2264617461223a5b3133312c352c37302c3131362c332c34382c3133372c312c312c312c322c302c312c39302c3137392c3139372c39372c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c34342c302c302c302c302c302c302c33312c382c372c322c31342c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c302c305d7d
9000 RESP (49.36.129.204:53589) 200
9000 OUTBOUND (49.36.129.204:53589) 830546740330890101020101020000000000

Now, it is self-explanatory what’s happening here however I don’t really understand what the initial buffer JSON has become now and what kind of data the webhook responds with.

Now, I have checked the docs but the payload structure described there is VERY different from what is going on here and this thing is a bit urgent to fix as subsequent payloads are being rejected even with authentication present within the docker config.

It would a big help for me.

Thanks.
Sambhav.

Hello Sambhav.

The UDP to Webhook service is passing the data in the same format that the UDP message was sent in to the Webhook. The CONTENT_TYPE environment variable used in the Docker Run command is the content type the Webhook is expecting. As the instructions show, the CONTENT_TYPE default is application/octet-stream since that is the format the LMU-330 Asset Tracker uses to send it’s data over UDP. The example Application Workflow that was sent to parse the LMU-330 is expecting the data in that form as well.

I would also recommend copying that Docker Image from my personal Docker Hub repository to your own repository as my repository could change at any point. The service provided in the Docker Image is not supported by Losant but something I created to hopefully help you get started.

I hope this helps.
Kevin