Ttn_payload is no longer available for TTN/TTI

TTN/TTI had been updated to be the same as all other integrations at TagoIO.

That means that the variable “ttn_payload” will not be available in the payload global variable in the parsers anymore.
I do suggest that if you are using this variable, that you change to the proper parser format, as in the snippet “Parse example for LoRaWAN”

If you still need to access the ttn_payload for some reason, it is still available in the global variable “raw_payload” as specified in TagoIO documentation Context & global variables - TagoIO

Here is a code example:

const ttn_payload = raw_payload.find((data) => data.variable === "ttn_payload");

The change that moves ttn_payload, and similar variable name from the payload, to the raw_payload was applied 2 months ago. But only comes to TTN recently.

Ok. Thanks for the prompt reply Vitor. Will adjust ASAP.

Hi Vitor,
I have tried to add a new TTN devices yesterday.
But I only got an error message
{
“variable”: “parse_error”,
“value”: “Function Parse Error: TypeError: Cannot read property ‘value’ of undefined”
}
In the bucket I only get the variable “parse_error” nothing else from TTN
I tried the connector “Custom The Things Network” and “STMicroelectronics”
Is this because of the change you mentioned before?
I also tried the Payload parser for LoRaWAN, but this didn’t help me.

I am also stuck on this issue with my previously-working data transfer from TTN now failing, following the change which appears to have been applied last Friday. I have a device registered with Network = LoRaWAN TTN, and Connector = Custom The Things Network.

My symptoms are similar to Wolfgang’s with a payload parser error reported. From my inexpert review of the Live Inspector log, it seems that the Raw payload contains variable “ttn_payload” with my anticipated data values, but I receive an “Error on [LoRaWAN TTN] payload parser” which resets the payload to variable =“parse_error” before my own custom [device] payload parser is invoked and gets a chance to extract my custom data, or indeed take a copy of ttn_payload as suggested in Vitor’s code example.

Appreciate any guidance on how best to recover from this. Thanks

I have made the change to raw_payload in my TTI (V3.10) LNS and managed to get the integration and payload parser running again. However, the integration to TTN (V2) is still completely screwed.

Every time a packet arrives from TTN, it runs the TTN payload parser which fails. Then it passes an empty set of variables such as payload and raw_payload onto my parser which also fails!

Is there any kind of workaround to enable me to stopped the errored TTN parser from running?

tago|690x244

It seems an issue only happening when TTN doesn’t send the payload_raw in the ttn_payload. Which can also happen if you have the parser on TTN’s side.

This issue had been handled and fixed. I hope this fix all your devices from now on. I’m sorry for any inconvenience.

ah-ha- so the fact that I have a parser in TTN too was causing this issue. Thanks for looking into it.

It works again. No parser error, and I get all the TTN variables in the bucket.
Thanks for the fast support