Device Configuration Parameters issue

Hi,

I have noticed that if I do console.log(device) in a parser, the parameter list shows the parameters more than once in the params array. I have also seen the parameter grow for each payload processed. My understanding is that the device.params list should only have one entry per parameter (param1 and param2 in this case).

Any ideas?

14:22:30:
Log from [device] payload parser:
{ “id”: “60dc6ee68b5ef6001103e80c”, “profile”: “602a6465735ccb00199e01e6”, “bucket”: “60dc6ee68b5ef6001103e80d”, “tags”: [], “params”: [ { “key”: “param2”, “value”: “Goodbye”, “sent”: false }, { “key”: “param1”, “value”: “Hello, world!”, “sent”: false }, { “key”: “param1”, “value”: “Hello, world!”, “sent”: false }, { “key”: “param1”, “value”: “Hello, world!”, “sent”: false } ] }
{
“id”: “60dc6ee68b5ef6001103e80c”,
“profile”: “602a6465735ccb00199e01e6”,
“bucket”: “60dc6ee68b5ef6001103e80d”,
“tags”: [],
“params”: [
{
“key”: “param2”,
“value”: “Goodbye”,
“sent”: false
},
{
“key”: “param1”,
“value”: “Hello, world!”,
“sent”: false
},
{
“key”: “param1”,
“value”: “Hello, world!”,
“sent”: false
},
{
“key”: “param1”,
“value”: “Hello, world!”,
“sent”: false
}
]
}

It can have more than one of the same parameter. Is just that the admin, for some reason, is not showing repetead parameters.

Are you editing the configuration parameters of your device by Analysis? In order to update a parameter, you must send the parameter id.

Hi @vitor - how are you?

OK, I figured out what’s happening - there is some issue with configuration param UI (probably a cached value). See video - config bug - YouTube

I can work around this by adding a parameter, save, then refresh the browser, but it was confusing because when saving my debug parser script, the config params kept getting longer.

This was because the Save button on the parser screen was also resaving the parameter again and again.

Hello @tago

Thanks for reporting this issue. It’s now on our roadmap and will be fixed in the next releases. You can check our changelog here

Sorry for the inconvenience,
Best regards.