my virtualparameter definition:
virutalparameter name Identity
const now = Date.now();
let productClass = declare(“DeviceID.ProductClass”, {value: 1}).value[0];
let client = “”;
switch(productClass) {
case “HL-1GE”:
client = declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Username”, {value: now}).value[0];
break;
case “RB912UAG-5HPnD”:
client = declare(“Device.DeviceInfo.X_MIKROTIK_SystemIdentity”, {value: now}).value[0];
break;
case “EG8245H”:
client = declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANPPPConnection.1.Username”, {value: now}).value[0];
break;
default:
client = “not supported”;
}
return {writable: false, value: [client, “xsd:string”]};
my config/Edit index page:
- label: “‘identity’”
parameter: VirtualParameters.Identity
it doesn’t work where is the error?