Try this:
let now = Date.now();
declare("InternetGatewayDevice.*", {value: now});
//declare("InternetGatewayDevice.Services.*", {value: now});
//declare("Device.Services.*", {value: now});
declare("Device.*", {value: now});
Be aware that doing this on a CPE can be incredibly time and resource intensive. There is a reason that GenieACS no longer refreshes the entire device data model. I would only do this when you are trying to discover the options available on a new CPE model.
There may be options you want to refresh on a less frequent interval. For example, I refresh the DSL stats using this script:
//log("Refresh_ATM_Stats");
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.Channel.*.Stats.*.*",
"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",
"VirtualParameters.EstimatedLoopLength"
];
for(let key of paramNames) {
declare(key, {value: dslRefreshInterval});
}
declare("InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.Stats.*.*", {value: statsRefreshInterval});
declare("Device.DSL.Line.*.Stats.*.*", {value: statsRefreshInterval});
declare("Device.DSL.Channel.*.Stats.*.*", {value: statsRefreshInterval});
This script refreshes the stats every 6 hours.