How to decrypt payload FRMPayload on app-server

I installed the server, app-server and so on and subscribed to MQTT with I can see all fields but “data” field is encrypted, like this:


I cant decrypt this on side.
On app-server i found this setting “Payload codec”.
and it gives me some choices: Caayenne LPP - didnt work and gives me same encrypted data, and Custom JavaScript codec functions:

but i dont know what i must change on this function. Should i paste here my fPort number? If yes what about bytes, where i must get it?

Basically i want to recieve in something like this (data with object):

“fCnt”: 10, // frame-counter
“fPort”: 5, // FPort
“data”: “…”, // base64 encoded payload (decrypted)
“object”: { // decoded object (when application coded has been configured)
“temperatureSensor”: {“1”: 25},
“humiditySensor”: {“1”: 32}
as mentioned here -
Also i saw this - but i dont know what to do exactley, should i just paste code from this link to Custom JavaScript codec functions in app-server or what?
Can @brocaar please guide me how to do this and if possible with some examples
Thanks alot

3 posts were merged into an existing topic: Receiving device data / FRMPayload