Why can't the ui interface get the parameters

I wrote a script to get the parameters, but I can’t get them, you can see them in the http message.
my script:
log(‘refresh’);
declare(“InternetGatewayDevice.", {path: Date.now(), value: Date.now()});
declare("InternetGatewayDevice.Services.
”,{path: Date.now(), value: Date.now()});
declare(“Device.Services.", {path: Date.now(), value: Date.now()});
declare("Device.
”, {path: Date.now(), value: Date.now()});
log(‘end’);
image


And I can’t use
let version=declare(“Device.DeviceInfo.SoftwareVersion”,{value:1}).value[0];
log(’!!!Softversion:’ + version);
or
let soft=declare(“InternetGatewayDevice.DeviceInfo.SoftwareVersion”,{value:1}).value[0];
log(’!!!InternetGatewayDevice.DeviceInfo.SoftwareVersion:’ + soft);
get the version information, it will display

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.

1 Like

didnt worked any other solution ?

Can you be any less specific about whats not working?

I have more than one vendor . some of them worked and showed the correct ip and the others showed 0.0.0.0
maybe its a vendor issue