due to different CPE brands, (TP-Link, Mikrotik and Zyxel) I want to have a couple of details on the Devices tab, like PPPoE Username, IP, SSIDs, but those value are on a different interfaces. I tried to use * sign, but isn’t working, is there a way to sort this out?
I don’t know if it will work for you, but I use coalesce when I have different parameters on different devices that I want in the same label, for example:
Yes you can.
Follow the code that akcoder provided and substitute the parameters with those for the PPPoE IP.
Here is another example:
let ip = "0.0.0.0";
let d = declare("Device.PPP.Interface.1.IPCP.LocalIPAddress", {value: Date.now()});
let igip = declare ("InternetGatewayDevice.WANDevice.*.WANConnectionDevice.*.WANIPConnection.*.ExternalIPAddress", {value: Date.now()});
let igd = declare("InternetGatewayDevice.WANDevice.*.WANConnectionDevice.*.WANPPPConnection.*.ExternalIPAddress", {value: Date.now()});
if (d.size) {
for (let p of d) {
if (p.value[0]) {
ip = p.value[0];
break;
}
}
}
else if (igd.size) {
for (let p of igd) {
if (p.value[0]) {
ip = p.value[0];
break;
}
}
}
else if (igip.size) {
for (let p of igip) {
if (p.value[0]) {
ip = p.value[0];
break;
}
}
}
return {writable: false, value: [ip, "xsd:string"]};