Virtual Parameters - PPPoE

Hey Guys!

I’m trying to add pppoe information in Listen Devices, but I’m having difficulties because different CPEs have different parameters, and I’d like to find a way to add them all, I found some provided on VirtualParameters, but when I tried, the page was blank. Can someone help me and see if there’s something wrong…
Uploading: image.png…

Virtual Paramater
pppUsername
let result = ‘’;

if (declare(“Tags.Bridged”, {value: 1}).value !== undefined) {
log(‘CPE is bridged, setting PPPoE username to null’);
} else if (“value” in args[1]) {
result = args[1].value[0];
} else {
let keys = [
‘InternetGatewayDevice.WANDevice..WANConnectionDevice..WANPPPConnection..Username’,
'Device.PPP.Interface.
.Username’
];

result = getParameterValue(keys);

}

return {writable: true, value: [result, “xsd:string”]};

function getParameterValue(keys) {
for (let key of keys) {
let d = declare(key, {path: Date.now() - (120 * 1000), value: Date.now()});

    for (let item of d) {
        if (item.value && item.value[0]) {
            return item.value[0];
        }
    }
}

return '';

}

Provisons

declare(‘VirtualParameters.pppUsername’, {path: Date.now(), value: Date.now()});

Editing index page

  • label: “‘PPPoE’”
    parameter: VirtualParameters.pppUsername

Uploading: Sem título.png…

Your declare is wrong.

declare('VirtualParameters.pppUsername', {value: Date.now()}, {value: 'the_user_name'});

I tried, but without success too! is there anything else i can do?

And how did you try? You need to include code and logs.