Remove device by API

Malto 4 andr0idmalto4 at gmail.com
Tue Apr 17 14:07:21 EDT 2018


 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20180417/6f061d44/attachment.html>


More information about the Users mailing list