Am 01.02.2017 20:57, schrieb Manel Mendoza ( Delinternet ):

    Hi oliver,

It is posible to share the source of cpe_software.js just to get an idea.

How you pass some parameters like device ID for this command ? Could I use
    some variable that could be used inside the preset..

    Thanks for your answer...

    Manel


Hello Manel,

you can use

https://github.com/zaidka/genieacs/blob/v1.0/config/custom_commands/greenpacket_frequencies.js

and

https://github.com/zaidka/genieacs/blob/v1.0/config/custom_commands/seowon_frequencies.js

as a starting point.

Some points to note:

- I'm talking about the v1.0 branch. I don't know the situation in the master branch.

- In your custom command js file you must at least have an init function (see exports.init) which is executed when the device is registered at the ACS.

- If you add additional functions you can execute them with a preset by using a Command age configuration and filling the Execute field in the way i mentioned earlier.

- In your custom command functions you get the device ID as the argument "deviceID". If you add another argument in the Execute field, you can get it in your custom command function as the argument "args".

I hope this helps.

Greetings,
Oliver
_______________________________________________
Users mailing list
[email protected]
http://lists.genieacs.com/mailman/listinfo/users

Reply via email to