Hello community,
Could someone please help me to create correct script.
I need to know ‘X’ for InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{X}
by checking its InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.{X}.Name
This is specifics of my CPE - after each reboot it increases its WANIPConnection index by 1.
So after factory reset I have WANIPConnection.1 after reboot this index will change to .2 and so on.
However connection parameters remains unchanged. Which is why I am searching for some correct provisioning flow.
What I’am trying to do now it to track this changes write it to some variable. Actually I have already found how to get it
let index = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.*", {path: now}).path.split(".").pop();
In this case index = ‘3’ in case of first normal reboot after initial factory reset…