Are you running v1 or v1.1 of Genie? Provisions were added to v1.1 -dan
On Tue, Apr 17, 2018 at 1:28 PM, Malto 4 <[email protected]> wrote: > Thank you Dan, > > 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 Provisions > <https://github.com/genieacs/genieacs/wiki/Provisions> and it has a lot > of helpful information on how to configure them, but I can't find them :3 > > Thanks again > > On 17 April 2018 at 22:15, Dan Morphis <[email protected]> wrote: > >> 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. >> >> 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: >> >> let now = Date.now(); >> >> declare("Tags.IsProvisioning", null, {value: false}); >> declare("Tags.Provisioned", null, {value: false}); >> commit(); >> >> //Clear out the data for the CPE since its been reset >> clear("InternetGatewayDevice", now); >> clear("VirtualParameters", now); >> >> >> -dan >> >> On Tue, Apr 17, 2018 at 10:07 AM, Malto 4 <[email protected]> >> wrote: >> >>> Hello everyone, >>> >>> I had quite a noobish question about GenieACS API. >>> 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. >>> >>> 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. >>> >>> 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. >>> >>> 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. >>> >>> Very sorry if this is poorly thought out or expressed but I am having >>> trouble properly understanding. >>> >>> Thank you in advance >>> >>> >>> _______________________________________________ >>> Users mailing list >>> [email protected] >>> http://lists.genieacs.com/mailman/listinfo/users >>> >>> >> >> _______________________________________________ >> Users mailing list >> [email protected] >> http://lists.genieacs.com/mailman/listinfo/users >> >> > > _______________________________________________ > Users mailing list > [email protected] > http://lists.genieacs.com/mailman/listinfo/users > >
_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
