Hello,
I have created a bunch of provisioning scripts which are working well, and I am now just going through the final process of optimizing them.
In the access log I see this:
2022-03-16T02:54:11.613Z [INFO] ::ffff:46.102.196.2 9c65ee-H660GM-DSNW2692fc78: ACS request; acsRequestId="17f90a49db1010a" acsRequestName="SetParameterValues"
2022-03-16T02:54:11.992Z [INFO] ::ffff:46.102.196.2 9c65ee-H660GM-DSNW2692fc78: ACS request; acsRequestId="17f90a49db1010b" acsRequestName="SetParameterValues"
2022-03-16T02:54:12.704Z [INFO] ::ffff:46.102.196.2 9c65ee-H660GM-DSNW2692fc78: ACS request; acsRequestId="17f90a49db1010c" acsRequestName="SetParameterValues"
2022-03-16T02:54:13.082Z [INFO] ::ffff:46.102.196.2 9c65ee-H660GM-DSNW2692fc78: ACS request; acsRequestId="17f90a49db1010d" acsRequestName="SetParameterValues"
2022-03-16T02:54:13.483Z [INFO] ::ffff:46.102.196.2 9c65ee-H660GM-DSNW2692fc78: ACS request; acsRequestId="17f90a49db1010e" acsRequestName="SetParameterValues"
…which is caused by this part of the script:
// Configure the WAN1 IP connection
const values = {
Add: true,
Enable: true,
NATEnabled: true,
Name: "INTERNET_VOIP",
AddressingType: "DHCP",
ConnectionType: "IP_Dynamic"
};
for (let key of Object.keys(values))
{
let valuePath = "InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1." + key;
declare(valuePath, null, {value: values[key]});
}
Why is this using multiple requests to set the values one at a time rather than batching them up into a single request?
I have also tried setting the 2nd param of the declare call to both of these:
{value: Date.now()}
{value: 1}
I have also tried prereading the parameters on the object before setting them:
declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.1.*", {path: Date.now(), value: Date.now()});
Thanks!