Unable to query or read multiple parameters at once


I’m trying to read the names of multiple WanIPConnections via the provisioning scripts but it doesn’t seem to be working correctly. I can get the value of one of the paramters names, but not the others.

I have 3 connections, ie: InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1-3

I am trying to query with this: InternetGatewayDevice.WANDevice.1.WANConnectionDevice...*.Name
to get this:

and I get the name of the first connection, but I cannot iterate through it to see multiple. I have tried a number of things but just can’t seem to get it to work. Such as changing the path to 5 for multiple entries.

let wanConnectionNames = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*.*.*.Name", {path: Date.now(), value: Date.now()});

for (var key of Object.keys(wanConnectionNames)) {
       log(key + " -> " + wanConnectionNames[key])

here is the log output for that code:
Script: 1_TR069_INTERNET_R_VID_,xsd:string
Script: {}

Thank you!

1 Like


Have you tried as:

let wanConnectionNames = declare(
  { path: Date.now(), value: Date.now() }
for (const a of wanConnectionNames) {
  log(`${JSON.stringify(a.value)} ${JSON.stringify(a.path)}`);
1 Like

That did it! Thank you!