I try to download config throw GenieACS I use recomended script
let now = Date.now();
let model = declare(“InternetGatewayDevice.DeviceInfo.ModelName”,
{value: 1}).value[0];
//Map the CPE model to the config file
let cfgs = {
‘EG8245H’: ‘myconfigname.xml’
};let lastConfigFile =
declare(“Downloads.[FileType:3 Vendor Configuration File].FileName”,
{value: Date.now()})let configFile = cfgs[model];
if (!configFile) {
//log(‘No config for CPE’, {model: model, cfgs: cfgs});
return;
}if (lastConfigFile !== undefined && lastConfigFile.value !== undefined) {
lastConfigFile = lastConfigFile.value[0];
} else {
lastConfigFile = null;
}if (lastConfigFile !== configFile) {
log(‘Upgrading config’, {model: model, configFile: configFile});
declare(“Downloads.[FileType:3 Vendor Configuration File]”,
{path: 1}, {path: 1});
declare(“Downloads.[FileType:3 Vendor Configuration File].FileName”,
{value: 1}, {value: configFile});
declare(“Downloads.[FileType:3 Vendor Configuration File].Download”,
{value: 1}, {value: now});
}
In log I saw that it downloaded but nothing change.
Where I make mistake?
Thank you in advance.