Hi Zaid, Thanks for your help.
I was able to export the set function, and I can see the value of the custom command on mongdb for the specific deviceId. Now the question is, how can I set that Value to the CPE? Should I do it on the Preset Set command? What would be the syntax? Thanks again, Regards, Ivo Abreu On Sat, Apr 2, 2016 at 9:42 AM, Zaid Abdulla <[email protected]> wrote: > On Fri, 2016-04-01 at 15:06 -0800, Dan Morphis wrote: > > I'm running a customCommand to set those values and I can see them on > > MongoDB, but I cannot find a way to set them on a Preset. How can I > > do this? > > I agree with Dan. I'd wait for the next release in a couple of weeks. > Custom commands will be reimplemented in a more elegant way. > > Regardless, you can do that by exporting a set function in your script > and calling that from a preset using the "Command value" configuration. > The set function of your script will be called if the value given > doesn't match the existing value of the custom command. That is, the > value given in "Command value" configuration not matching the return > value of "get" function in your script when it was last called. Make > sure you have custom command name followed by the function name (e.g. > "mycustomcommand set [any optional args]") in your preset. > > > Additionally, is there a way to execute a customCommand on every > > Inform Event? > > Use "Command age" configuraiton and specify a number of seconds that's > smaller than your inform interval (e.g. 1). > > Zaid > _______________________________________________ > Users mailing list > [email protected] > http://lists.genieacs.com/mailman/listinfo/users >
_______________________________________________ Users mailing list [email protected] http://lists.genieacs.com/mailman/listinfo/users
