Use of device parsers (Oyster)

I’m using the Oyster GPS sensor from DigitalMatter, it comes with the Oyster Tago device selection. This works great, however looking in the bucket what gets stored, I miss some basic information, like timestamp, rssi, etc.

In a dashboard, I would like to show the position, speed etc related to the timestamp. The device parser is pretty complex, so I’m not a big fan of creating my own, even using their datasheet. So my question, how can I add missing variables without the need of creating manual a parser?

1 Like

Hi @vincent.raaijmakers

all variables that comes in the same payload is stored with the same serie number, if you need the timestamp, you can make a custom payload parser in your device that will run after the connector’s. There you can use something like this to add time:

if (payload) {
  const vars_to_tago = [];
  const serie = payload[0].serie;
  for (let i = 0; i < payload.length; i++ ) {
    vars_to_tago.push({ ...payload[i], time: new Date(serie) });
  }
  payload = vars_to_tago;
}

I made a little adjustment in the connector’s parser so the data that comes with the payload is stored too as it should be. Hope this helps.

1 Like

Thanks Daniel, that makes sense and will try it. But how about adding RSSI, SNR etc.?

1 Like

Never mind, I have it up and running now with all variables I need.
Thank you so much for you help!

Vincent

2 Likes