Filtering Out Variables with Parser Code

Filtering Out Variables with Parser Code

When your device sends data from a sensor to TagoIO, a parser code may be added to your device (located in the 'Payload Parser' tab) to extract and create the variables in the Device's data storage using TagoIO format. 

If you want to save space in your register storage, you can ignore the variables you don't want to be added to the data device by editing the parser.

By default, some fields and metadata sent by providers like LoRaWAN and Sigfox are already ignored to avoid unnecessary storage.

For example, if your device is sending data from TTN as shown in the image below, most variables will be created in the device's data storage, including the payload.

A variable called location is automatically created by combining the fields 'latitude' and 'longitude'. Use location when plotting maps.

To ignore the variables so that they will not be added to your Device, go to Devices at your Admin panel, find your device, and click on the 'Payload Parser' tab. Then, enter the names you want the parser to ignore on the ignore_vars. See the image below for reference. 

As a reference, the image above shows that no variable would be ignored, meaning that all fields and metadata would be posted to the device each time the sensor sends data.  

We offer this flexibility to allow you to optimize your storage by avoiding the creation of unnecessary variables.



    • Related Articles

    • Payload Parser Troubleshooting

      When using the Payload Parser on TagoIO, you might run into some common problems that stop the parser from decoding your device data correctly. This means the data won't be saved on TagoIO. These problems are usually related to mistakes in how the ...
    • Payload Parser - Context & global variables

      If you are going to create your own parser, you need to understand how context works. When you start writing your own Payload Parser, you can use certain globals variables in your code. Think of these global variables as variables that you can access ...
    • Payload Parser

      The Payload Parser handles the raw payload sent by the devices in order to extract the measured variables. For example, it can be used to transform an HEX payload sent by a device into temperature and battery levels. You can also use it to handle the ...
    • Parser vs. Analysis Comparison

      The Payload Parser was created to handle raw payload sent by the devices in order to extract the measured variables or execute simple operations. Analysis is much more powerful, including access to Devices and external services. Also, there is a cost ...
    • Building your own parser

      In this tutorial, you will learn how to convert (parse) a raw payload sent by a device into actual measurable variables.  Data flow structure You can create parses for devices that weren't found in our list of Devices, so that you had to use a ...