<div dir="ltr">My bad, I'm on v1.0 <div>I will upgrade and check the documentation.</div><div><br></div><div>Thanks for helping me out Dan</div></div><div class="gmail_extra"><br><div class="gmail_quote">On 17 April 2018 at 23:34, Dan Morphis <span dir="ltr"><<a href="mailto:dan@milkcarton.com" target="_blank">dan@milkcarton.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Are you running v1 or v1.1 of Genie? Provisions were added to v1.1<span class="HOEnZb"><font color="#888888"><div><br></div><div>-dan</div></font></span></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Apr 17, 2018 at 1:28 PM, Malto 4 <span dir="ltr"><<a href="mailto:andr0idmalto4@gmail.com" target="_blank">andr0idmalto4@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Thank you Dan,<div><br></div><div>I can't seem to find where to define Presets outside of the GUI (sorry for all of this by the way). I have been looking at <a href="https://github.com/genieacs/genieacs/wiki/Provisions" target="_blank">Provisions</a> and it has a lot of helpful information on how to configure them, but I can't find them :3</div><div><br></div><div>Thanks again</div></div><div class="m_2380395855223678210HOEnZb"><div class="m_2380395855223678210h5"><div class="gmail_extra"><br><div class="gmail_quote">On 17 April 2018 at 22:15, Dan Morphis <span dir="ltr"><<a href="mailto:dan@milkcarton.com" target="_blank">dan@milkcarton.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">You're making this to complicated :) Create a preset for the '0 BOOTSTRAP' event. Thats the event the CPEs send on first boot and factory default.<div><br></div><div>Create a provision script which removes the necessary tags from the device when its bootstrapped. For example, in our env, I set the tag "Provisioned" when a CPE is done being provisioned. In my bootstrap provision script (which is kicked off by the 0 BOOTSTRAP event) I do the following:</div><div><br></div><div><div><font face="monospace, monospace">let now = Date.now();</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">declare("Tags.IsProvisioning", null, {value: false});</font></div><div><font face="monospace, monospace">declare("Tags.Provisioned", null, {value: false});</font></div><div><font face="monospace, monospace">commit();</font></div><div><font face="monospace, monospace"><br></font></div><div><font face="monospace, monospace">//Clear out the data for the CPE since its been reset</font></div><div><font face="monospace, monospace">clear("InternetGatewayDevice", now);</font></div><div><span style="font-family:monospace,monospace">clear("VirtualParameters", now);</span><br></div></div><div><br></div><div><br></div><div>-dan</div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="m_2380395855223678210m_-4353475563408526823h5">On Tue, Apr 17, 2018 at 10:07 AM, Malto 4 <span dir="ltr"><<a href="mailto:andr0idmalto4@gmail.com" target="_blank">andr0idmalto4@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="m_2380395855223678210m_-4353475563408526823h5"><div dir="ltr">

<span style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Hello everyone,</span><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">I had quite a noobish question about GenieACS API. </div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">At the moment I have 4 Presets that my devices go through just fine, in the first one I add connecion username and password. The second I use for General Configuration, the third I add a PPP object and the fourth is activation and last tweeks to the devices.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">My problem starts when a device fails (factory reset) but it is still in MongoDB. I understand that it can't connect to GenieACS because of connection Details, but even if I do insert the connection details it has problems going through the Presets again.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">The solution I had was to delete the device from MongoDB if the device's last inform was 5 minutes ago, in that case it would cause the device to start the whole process again properly. The only thing is that I don't know how to remove the device after 5 minutes without inform.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">I have seen API reference in the Wiki but its a set time, not "5 minutes ago". I would love to implement this with Cron, checking the devices every 5 minutes or so and if their last inform was 5 minutes ago then delete that device from MongoDB.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Very sorry if this is poorly thought out or expressed but I am having trouble properly understanding.</div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial"><br></div><div style="color:rgb(34,34,34);font-family:arial,sans-serif;font-size:12.8px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:400;letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial">Thank you in advance</div>

<br></div>
<br></div></div>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
<br></blockquote></div><br></div>
<br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<wbr>_________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.genieacs.com" target="_blank">Users@lists.genieacs.com</a><br>
<a href="http://lists.genieacs.com/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.genieacs.com/mail<wbr>man/listinfo/users</a><br>
<br></blockquote></div><br></div>
</div></div><br>______________________________<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>
<br></blockquote></div><br></div>