<div dir="ltr">It's ok, but Why the ACS executes the "refresh2 script" twice? <div><br></div><div>I see that for every preset with script provision which has GetParameterValues or SetParamereterValues executes twice.<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-05-05 17:15 GMT+02:00 Dan Morphis <span dir="ltr"><<a href="mailto:dan@milkcarton.com" target="_blank">dan@milkcarton.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">See below<br>
<br>
-dan<br>
<span class=""><br>
> On May 5, 2017, at 3:22 AM, Miguel Ángel Sánchez Moragues <<a href="mailto:sanchez.moragues@gmail.com">sanchez.moragues@gmail.com</a>> wrote:<br>
><br>
> Sorry, I don't understand the behavior.<br>
><br>
> Another example with the following script which is execute every "2 PERIODIC" event:<br>
><br>
><br>
> let now = Date.now();<br>
> let serialNumber = declare("DeviceID.<wbr>SerialNumber", {value: 1});<br>
><br>
> log('start refresh3 script SN=' + serialNumber.value[0]);<br>
><br>
> /*<br>
> let credentials = ext('gateway', 'getPPPoE', serialNumber.value[0]);<br>
><br>
> if (credentials) {<br>
>       log('username = ' + credentials.username + ' , password = ' + credentials.password);<br>
> }<br>
> */<br>
><br>
> declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.<wbr>PeriodicInformInterval", {value: now}, {value: 60});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.<wbr>PeriodicInformEnable", {value: now}, {value: true});<br>
> declare("<wbr>InternetGatewayDevice.<wbr>ManagementServer.<wbr>ConnectionRequestUsername", {value: now}, {value: "cpe"});<br>
><br>
><br>
</span><span class="">> 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?<br>
<br>
</span>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).<br>
<div class="HOEnZb"><div class="h5">______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/<wbr>mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>