Problem with Provisions massive upgrades

Alexander Morillo apps at networkbroadcast.net
Wed Aug 22 10:08:01 EDT 2018


Hi, everone.

I'm trying to do an automated firmware upgrade using a Provisions'
script. I found the script here, i followed the instructions but it
does not work.
I changed a few parameters to match with my genieacs configuration:

- - -  BEGIN - - -

const TAG_UPGRADE = "Tags.upgrade";
const TAG_UPGRADING = "Tags.upgrading";

const REQ_VERSION = "eng.nanbin.20180802.163904";

if (declare(TAG_UPGRADE, {value: 1}).value !== undefined) {
  // remove upgrade tag
  declare(TAG_UPGRADE, null, {value: false});
  commit();
  // retrieve CPE software version
  let REP_VERSION =
declare("Device.DeviceInfo.SoftwareVersion", {value:
Date.now()}).value[0];
  // make sure versions do not match
  if (REP_VERSION !== REQ_VERSION) {
    // append upgrading tag (will be removed in firmware-upgrade-complete)
      declare(TAG_UPGRADING, null, {value: true});
      commit();
      // request upgrade
      declare("Downloads.[FileType:1 Firmware Upgrade Image]", {path:
1}, {path: 1});
      declare("Downloads.[FileType:1 Firmware Upgrade Image].FileName",
{value: 1}, {value: REQ_VERSION + ".web"});
      declare("Downloads.[FileType:1 Firmware Upgrade Image].Download",
{value: 1}, {value: Date.now()});
  }
}

- - - - END - - - -


*Provision firmware-upgrade-complete:*

-- BEGIN --

const TAG_UPGRADING = "Tags.upgrading";
declare(TAG_UPGRADING, null, {value: false});

-- END --

*Preset firmware-upgrade:*

Events: 1 BOOT, -7 TRANSFER COMPLETE
Precondition: Tag = upgrade
Configurations: Provision name: firmware-upgrade

Preset firmware-upgrade-complete:

Events: 7 TRANSFER COMPLETE
Precondition: Tag = upgrading
Configurations: Provision name: firmware-upgrade-complete



Then, i uploaded a new firmware but the upgrade it doesn't happened (

Version new firmware:

eng.nanbin.20180802.163904

Version devices firmware:

eng.nanbin.20180402.173237

Thnks!











--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20180822/64d85534/attachment.html>


More information about the Users mailing list