Virtual Parameter can't get the value from args

Iโ€™m trying to make virtual parameter for Ping diagnostic no matter what value I set in the virtual parameter the value that was set to InternetGatewayDevice.IPPingDiagnostics.Host is always wrong

can some shed some light because for sure iโ€™m missing something obvious :slight_smile:

Happy New Year !!


when I change the code a little bit

from this 
value = args[1].value;

into this 
value = args[1].value[0];

this should work but still the value is different :slight_smile:

sorry this is off the topic but can you share me the parameters you used to get pon power and optical power and temperature and other parameters.

All PON related information there was being pulled in the OLT itself via a shell script being fed to a Virtual Parameter

@akcoder hi dan, I copy a piece of code from you in the virtual parameter, do you have any idea why i donโ€™t get my desired output?

i set the value e.g but in the args[1].value[0] i get a different values instead of thanks in advance


let value;

if ("value" in args[1]) { 
 	value = args[1].value[0];
  	value = [value,'xsd:string'];
} else if ("value" in args[3]) {
  	value = args[3].value;
} else { 
	value = ['','xsd:string'];

return {writable: true, value: value};

After countless retry i finally got it and understand what's wrong :)