It's ok, but Why the ACS executes the "refresh2 script" twice? I see that for every preset with script provision which has GetParameterValues or SetParamereterValues executes twice.
2017-05-05 17:15 GMT+02:00 Dan Morphis <[email protected]>: > See below > > -dan > > > On May 5, 2017, at 3:22 AM, Miguel Ángel Sánchez Moragues < > [email protected]> wrote: > > > > Sorry, I don't understand the behavior. > > > > Another example with the following script which is execute every "2 > PERIODIC" event: > > > > > > let now = Date.now(); > > let serialNumber = declare("DeviceID.SerialNumber", {value: 1}); > > > > log('start refresh3 script SN=' + serialNumber.value[0]); > > > > /* > > let credentials = ext('gateway', 'getPPPoE', serialNumber.value[0]); > > > > if (credentials) { > > log('username = ' + credentials.username + ' , password = ' + > credentials.password); > > } > > */ > > > > declare("InternetGatewayDevice.ManagementServer.PeriodicInformInterval", > {value: now}, {value: 60}); > > declare("InternetGatewayDevice.ManagementServer.PeriodicInformEnable", > {value: now}, {value: true}); > > declare("InternetGatewayDevice.ManagementServer.ConnectionRequestUsername", > {value: now}, {value: "cpe"}); > > > > > > The acs sends a GetParameterValues but doesn't send a SetParameterValues > because the values are the same that in local bbdd. What is the change in > this case? > > The change is "{value: now}, {value: 60}", that's telling genie to verify > the value for that parameter is 60 if the timestamp is older than now > (which will always be the case). If you change it to value:1, then the > parameter will be set only one time (because one one time will the > timestamp be older than 1). > _______________________________________________ > Users mailing list > [email protected] > http://lists.genieacs.com/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
