You are welcome. VParams do not auto-refresh. And sadly, there is no event code a CPE is required to send when it connects to the interwebs. So you will need to periodically refresh the value. I would create two presets. One that has 0 BOOT
as the event and refreshes the vparam. And another more general purpose preset which periodically refreshes values you need.
Here is a script I wrote which refreshes DSL stats. You are welcome to take the script in whole or in part. This script refreshes DSL info every 18 hours, and interface stats every 6 hours.
let oneDay = 24 * (60 * 60) * 1000;
let dslRefreshInterval = Date.now() - (oneDay * 1.5);
let statsRefreshInterval = Date.now() - (oneDay * 0.25);
let paramNames = [
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.ModulationType",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamCurrRate",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamCurrRate",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamMaxRate",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamMaxRate",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamNoiseMargin",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamNoiseMargin",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamAttenuation",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamAttenuation",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamPower",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamPower",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.LinkEncapsulationUsed",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.LineNumber",
"InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.X_BROADCOM_COM_BondingLineNumber",
"Device.DSL.Channel.*.UpstreamCurrRate",
"Device.DSL.Channel.*.DownstreamCurrRate",
"Device.DSL.Channel.*.UpstreamMaxBitRate",
"Device.DSL.Channel.*.DownstreamMaxBitRate",
"Device.DSL.Channel.*.LinkEncapsulationUsed",
"Device.DSL.Line.*.UpstreamNoiseMargin",
"Device.DSL.Line.*.DownstreamNoiseMargin",
"Device.DSL.Line.*.UpstreamAttenuation",
"Device.DSL.Line.*.DownstreamAttenuation",
"Device.DSL.Line.*.UpstreamPower",
"Device.DSL.Line.*.DownstreamPower",
"Device.DSL.Line.*.LineNumber",
"Device.DSL.Line.*.X_ZYXEL_BondingLineNumber",
"Device.DSL.ChannelNumberOfEntries",
"Device.DSL.LineNumberOfEntries",
];
for(let key of paramNames) {
declare(key, {path: oneDay * 2, value: dslRefreshInterval});
}
declare("InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.Stats.*.*", {path: oneDay * 2, value: statsRefreshInterval});
declare("Device.DSL.Line.*.Stats.*.*", {path: oneDay * 2, value: statsRefreshInterval});
declare("Device.DSL.Channel.*.Stats.*.*", {path: oneDay * 2, value: statsRefreshInterval});