<div dir="ltr">Hi Zaid,<div><br></div><div>Thanks for your help. </div><div><br></div><div>I was able to export the set function, and I can see the value of the custom command on mongdb for the specific deviceId.</div><div><br></div><div>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?</div><div><br></div><div>Thanks again,</div><div>Regards,</div><div>Ivo Abreu</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Apr 2, 2016 at 9:42 AM, Zaid Abdulla <span dir="ltr"><<a href="mailto:zaid@genieacs.com" target="_blank">zaid@genieacs.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, 2016-04-01 at 15:06 -0800, Dan Morphis wrote:<br>
> I'm running a customCommand to set those values and I can see them on<br>
> MongoDB, but I cannot find a way to set them on a Preset. How can I<br>
> do this?<br>
<br>
</span>I agree with Dan. I'd wait for the next release in a couple of weeks.<br>
Custom commands will be reimplemented in a more elegant way.<br>
<br>
Regardless, you can do that by exporting a set function in your script<br>
and calling that from a preset using the "Command value" configuration.<br>
The set function of your script will be called if the value given<br>
doesn't match the existing value of the custom command. That is, the<br>
value given in "Command value" configuration not matching the return<br>
value of "get" function in your script when it was last called. Make<br>
sure you have custom command name followed by the function name (e.g.<br>
"mycustomcommand set [any optional args]") in your preset.<br>
<span class=""><br>
> Additionally, is there a way to execute a customCommand on every<br>
> Inform Event?<br>
<br>
</span>Use "Command age" configuraiton and specify a number of seconds that's<br>
smaller than your inform interval (e.g. 1).<br>
<span class="HOEnZb"><font color="#888888"><br>
Zaid<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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/mailman/listinfo/users</a><br>
</div></div></blockquote></div><br></div>