Connection Refused, Invalid Payload (MQTT)

Connection Refused, Invalid Payload (MQTT)

Hey!

So I have a LoraWAN device connected with TagoIO through Everynet, I'm using MQTT.
So I've been trying to work with the payload parser so that I can, later, create a dashboard based on the variables.

What I did was, after I connected the Everynet with TagoIO, I created an action with "/lora/luminosity" as the topic ( my device sends room luminosity). After the action was created I went to the payload parser so that I can work with just the value that interests me, luminosity. So on the Payload Parser I created this code based on the MQTT example code given.

const ignore_vars = ['qos', 'isHex', 'messageId', 'bucket', 'type', 'meta', 'network', 'packet_hash', 'application', 'device_addr', 'time', 'device', 'packet_id', 'gateway', 'lora', 'header', 'mac_commands', 'header', 'class_b', 'confirmed', 'adr', 'ack', 'adr_ack_req', 'version', 'type', 'rx_time', 'port', 'duplicate', 'counter_up', 'radio', 'gps_time', 'delay', 'datarate', 'time', 'freq', 'size', 'modulation', 'banwidth', 'type', 'spreading', 'coderate', 'hardware', 'status', 'chain', 'tmst', 'snr', 'rssi', 'channel', 'gps', 'lat', 'lng', 'alt']
// Remove unwanted variables.
payload = payload.filter(x => !ignore_vars.includes(x.variable));

if (payload.hasOwnProperty("params") && payload.params.hasOwnProperty("payload")) {
const payloadData = payload.params.payload;
const decodedPayload = atob(payloadData);
const data = [
{ variable: 'lumus', value: decodedPayload, unit: 'lux' }
];
const group = String(new Date().getTime());
payload = {...payload, ...{data: data.map(x => ({ ...x, group }))}}
}

I want to work with the luminosity value on the dashboard. But I'm getting this response from the Live Inspector:

Result of [device] payload parser:
{
"params": {
"rx_time": 1680697880.1878982,
"port": 1,
"duplicate": false,
"radio": {
"gps_time": 1364733098146,
"delay": 0.06812071800231934,
"datarate": 0,
"modulation": {
"bandwidth": 125000,
"type": "LORA",
"spreading": 12,
"coderate": "4/5"
},
"hardware": {
"status": 1,
"chain": 0,
"tmst": 1942673684,
"snr": -11.8,
"rssi": -117,
"channel": 2,
"gps": {
"lat": -7.223820209503174,
"lng": -34.83852005004883,
"alt": 83
}
},
"time": 1680697880.1878982,
"freq": 915.6,
"size": 19
},
"counter_up": 1,
"lora": {
"header": {
"class_b": false,
"confirmed": false,
"adr": false,
"ack": false,
"adr_ack_req": false,
"version": 0,
"type": 2
},
"mac_commands": []
},
"payload": "MTE1LjAw",
"encrypted_payload": "FU1V2Qdr"
},
"meta": {
"network": "358b679dd88d47948f6e108677b4b79a",
"packet_hash": "a76eff102394e9e500aed6d791a39af6",
"application": "d80d7c935d9f28f8",
"device_addr": "1686b534",
"time": 1680697880.265,
"packet_id": "6787d347b1e1ac1aa28657b76836134a",
"gateway": "b0fd0b7005260000"
},
"type": "uplink",
"metadata": {
"mqtt_topic": "/lora/luminosity"
}
}

Connection Refused, Invalid Payload:
{
"zodError": {
"variable": [
{
"message": "Required",
"path": [
"variable"
]
}
]
}
}

I don't know what I need to do from here. What does this message mean? How can I fix it?

I attached the LiveInspector file.