Error in ChirpStack integration with Tago Core

Hi,

I’ve been tinkering around with Tago Core (running v. 0.3.1 at the moment). However, I can’t get it working with our existing ChirpStack framework.

For testing purposes I made a new VM with a blank TagoCore and ChirpStack installation (both in the same machine), then set-up the ports and whatnot form the TagoCore’s end, and the HTTP integration from the ChirpStack’s side. After that, I create a new device in both platforms and link them with their EUI. Also, I put the parser that I normally use on our normal Tago IO application for this type of sensor.

So far, it should work, right?

But whenever the sensor sends data, I got this error in the log from TagoCore:

[10:02:54.380]: Error inserting data
[10:02:54.380]: ZodError: [ { "code": "invalid_type", "expected": "string", "received": "undefined", "path": [ 0, "variable" ], "message": "Required" } ] at new ZodError (/snapshot/tcore/packages/tcore-api/node_modules/zod/lib/ZodError.js:80:28) at handleResult (/snapshot/tcore/packages/tcore-api/node_modules/zod/lib/types.js:115:21) at ZodArray.<anonymous> (/snapshot/tcore/packages/tcore-api/node_modules/zod/lib/types.js:231:47) at step (/snapshot/tcore/packages/tcore-api/node_modules/zod/lib/types.js:59:23) at Object.next (/snapshot/tcore/packages/tcore-api/node_modules/zod/lib/types.js:40:53) at fulfilled (/snapshot/tcore/packages/tcore-api/node_modules/zod/lib/types.js:31:58)

I’m not entirely sure of how to proceed from here or if I messed up something. I think at least I should get the raw payload from ChirpStack as TagoIO does, do I?

I understand that Core is still in development, so if it’s something it will be addressed later it’s ok. But if someone has managed to integrate both platforms correctly, I will appreciate any insight.

This error means that data is not being parsed correctly.

Did you select the Encoder when you created the device ? You should see the option to select the Chirpstack encoder in the device.

Hi Vitor,

Yes, I have selected the encoder stack for ChirpStack in the device.

I have additionally used the same JS parser from the TagoIO in the other prompt from the screenshot.

Let us check on that and I’ll get back to you soon.

Since I do have access to your parser, I’ll be able to reproduce the same scenario here.

I identified that the error is related to payload parser running before the Chirpstack encoder.

You will need to wait until next TagoCore version, to be released next week, to fix that issue.

Ok sure, we will wait for the new version.

Thank you for your good work as always, Vitor.

The new version released yesterday should have this issue fixed, with improved experience for the plugin as well.