Accessing Configuration Parameters in Parser

@Gary Howell

Hi there,

I assume Configuration Parameters are simply key/value pairs.

I want to store some parameters and user them in the payload parser script.
If this is possible, how do I access them in the parser?

Also, what is the purpose of the Read/Unread toggle?

Thank you

@Guilherme Costa

Hi again mate,

Sure you can, you need to access via device.param

Here an example, you try to find a param with a x as a key

const type = device.params.find(param => param.key === "x");

image

The read/unread toggle is for alert purposes (may have others as well) you set it if you are aware of it.

I want to ask what is the purpose of the Read/Unread toggle too?

And another question: in the future it is possible to change configuration parameters during payload parser?

Hi spulawski,

The read/unread toggle is used depending on the application, It can be used to check weather alerts have been actived or not, for example.

Once it’s activated you’ll know by checking the read/unread property.

At the moment we don’t see the ability of changing the configuration parameters during the payload parser execution coming in the near future.