Dragino LGT-92 parser

Hi community,

I have a paired device, I receive data, but it is not correct, such as GPS position …

As i know there are several firmware versions for the LGT-92 device, and this makes the payload different ( v1.4 vs v1.5 ). http://www.dragino.com/downloads/index.php?dir=LGT_92/

Which version uses the tago IO parser ?

I’m waiting to receive an adapter, to be able to configure and see what version of firmware I have on the physical device.

Cheers,
Jordi.

Hi, @jordi

Our parser is for the firmware v1.5.

Let me know if you need any help.

1 Like

Strange … we have two devices, with firmware

  • v.1.5.3 and v.1.6.1

but the location it decodes is wrong location: 16.4761, -131.0682

Device 1:
AT+VER=v1.5.3 EU868
AT+HWVER=L70-RL

Device 2:
AT+VER=v1.6.1 EU868
AT+HWVER=v1.5.0,L76-L

Hi, @jordi

Can you send the payload parser? With the payload, I can understand why the parser is resulting in the wrong value.

Thank you.

Yes, I attach/link two files (live inspector output)


Hi, @jordi

I checked both payloads.
For the inspector data_trackerA the result is:
{ roll: 39.96, pitch: 253.44, battery: 3.635, alarm: false, location: { value: '16.4761,-786.4282', location: { lat: 16.4761, lng: -786.4282 } } }

For the inspector data_trackerB the result is:
{ roll: 40, pitch: 253.44, battery: 3.907, alarm: false, location: { value: '16.476,629.1494', location: { lat: 16.476, lng: 629.1494 } } }

Let me know if this data is correct.

Hi @gclenz

I have also seen the information in the LiveInspector, and no, this data isn’t correct:

  • location: { lat: 16.4761, lng: -786.4282 }
  • location: { lat: 16.476, lng: 629.1494 }

the correct location would be approximately 42.18XXX, 2.49XXX

To add:

  • the payload comes from EveryNet NS
  • We tested the devices on another platform, and it decodes the payload well, but we are interested in using TagoIO.

Dragino info:
http://www.dragino.com/downloads/index.php?dir=LGT_92/
Decoder: http://www.dragino.com/downloads/index.php?dir=LGT_92/Decoder/

Best Regards,
Jordi

Hi, @jordi

I checked our payload parser again and compared it against the payload parsers on the website.
The payload parser that we have is for the firmware v1.4 instead of v1.5 that I said.

I would like to apologize for the mistake from my side.

Let me know if you need more help.

Hi @gclenz,

Are there a possibility that you can update the parser, or add a new device in the wizard to include the 1.5 firmware?

There’re many improvements on v1.5.

Thanks !

Hi @jordi ,
In the meanwhile as TagoIO don’t officially supports the v1.5 firmware, you can create your own connector.

https://docs.tago.io/en/articles/466-connector-overview
https://docs.tago.io/en/articles/118-building-your-own-parser

Since Dragino does provide a parse for TTN in javascript, it should be easy to just copy their function and use inside Payload Parser.
Right after the line in the example that converts the payload to a buffer, you can send the buffer to the TTN function, and then convert the results to TagoIO format.

Example:

...
if (payload_raw) {
  try {
    // Convert the data from Hex to Javascript Buffer.
    const buffer = Buffer.from(payload_raw.value, 'hex');
    const ttn_result = Decoder(buffer);

    const data = [
      { variable: "roll", value: ttn_result.Roll },
      { variable: 'location', value: "my location", location: { lat: ttn_result.Latitude, lng: ttn_result.Longitude } },
    ];

Hi @vitor

Ok, I will try …

Thanks !

Hi @jordi,
TagoIO just updated the LGT-92 with an option to select the firmware version.

Delete your device and create again and select the correct firwmare for your sensor.

1 Like

Thanks @vitor , right now I was creating the connector and parser.

@vitor I think there’re an error, a swap in the lat, lng values inside the location property …

{
“variable”: “location”,
“value”: “2.494265,42.178356”,
“serie”: 1602172804795,
“location”: {
“lng”: 42.178356, <<<-- lat
“lat”: 2.494265. <<<-- lng
}
}

Yes, you’re right, it’'s swapped.

I just fixed it.

Perfect @vitor , works fine !