Hi,  I'm working with genieacs and when I go to provision devices to download 
the config file with the provision script in the github's wiki, the date set 
with Date.now() nmot working, the date always be 1970-01-01T00:00:00.000Z and 
return a fault message like this

FAULTCODE:
9010

FAULTSTRING:
Could not start download


My provision script is the next one:

const now = Date.now();
let model = declare("Device.DeviceInfo.SerialNumber",
  {value: 1}).value[0];
//Map the CPE model to the config file
let cfgs = {'device_sn': 'config-file.xml'};

let lastConfigFile =
  declare("Downloads.3.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.3",
    {path: 1}, {path: 1});
  declare("Downloads.3.FileName",
    {value: 1}, {value: configFile});
  declare("Downloads.3.Download",
    {value: 1}, {value: now});
}

Anyona can help me?
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to