Create a custom button

Hello fellows. Could anyone help to create a custom button ?

Maybe some of you guys had the similar idea…
Here is the plan:

  1. I need change Parameter InternetGatewayDevice.WIFI.NeighboringWiFiDiagnostic.DiagnosticsState to Request
  2. Pull every WLAN !

autoprovisioning is working and i get …


function hasTag(name) {
    const result = declare(`Tags.${name}`, {value: 1});
    return result.value !== undefined;

//declare("Tags.EVEnT", null, {value: true});

let serial_number=declare("DeviceID.SerialNumber",{value:1}).value[0];
let speed_test=declare("InternetGatewayDevice.DownloadDiagnostics.DiagnosticsState",{value:1}).value[0];

if (hasTag('SNR-CPE')) {
  let wlan_diagnose=declare("InternetGatewayDevice.WIFI.NeighboringWiFiDiagnostic.DiagnosticsState",{value:1}).value[0];
  if (wlan_diagnose == "Requested"|"Complete"){
  log('Wifi Diagnostic ...' + serial_number);
  declare("Tags.WLAN_Diag", null, {value: true});
  1. After I need to create also button to clear THAT. I can just add the Tag and Push Summon Button (to refresh some parameters)
    For that tag, provision script is starting to remove parameters for me.


declare("Tags.DIAG_End", null, {value: false});
let now =;
declare("InternetGatewayDevice.WiFi.NeighboringWiFiDiagnostic.Result.*", null,{value: 0});
declare("InternetGatewayDevice.WiFi.NeighboringWiFiDiagnostic.Result",{path: now},{value: 1});
declare("InternetGatewayDevice.WIFI.NeighboringWiFiDiagnostic.ResultNumberOfEntries",{path: now},{value: 1});

Maybe i can just create a Button which could put Tag on device, and automatically Declare some parameters or Just Summon button.
P.S. Sometimes after 10x pushing the “Summon button” PROVISION B script is tired and dont give a …