Hello everyone,
I’m trying to write a provision script that opens a remote session on ONTs, but I want the session to automatically close after 10 minutes. Here’s the script I’m currently using:
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Enable", t, {value: true});
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Protocol", t, {value: "HTTP"});
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Port", t, {value: 80});
declare("InternetGatewayDevice.User.1.Password", null, {value: 123456789});
I initially tried using setTimeout
within the provision script to disable the remote access after 10 minutes, but it didn’t work as expected.
Next, I attempted to use an extension to await the script, as shown below:
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Enable", t, {value: true});
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Protocol", t, {value: "HTTP"});
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Port", t, {value: 80});
declare("InternetGatewayDevice.User.1.Password", null, {value: 123456789});
// this just waits 10 minutes and then calls the callback
const res = ext("remove-remote", "removeRemote", "a");
declare("InternetGatewayDevice.UserInterface.RemoteAccess.Enable", t, {value: false});
Unfortunately, this introduced a configuration loop, and I suspect it’s related to this issue mentioned in the GenieACS documentation.
I’m looking for advice on how to properly implement an automatic closure of the remote session without causing a configuration loop. Any guidance or alternative approaches would be greatly appreciated!
Thanks in advance!