# Create a custom button

**URL:** <https://forum.genieacs.com/t/create-a-custom-button/3551>\
**Category:** Uncategorized\
**Created:** [February 15, 2023, 1:09pm UTC](https://forum.genieacs.com/t/create-a-custom-button/3551 "2023-02-15T13:09:58Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Clxxcv](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/clxxcv/32/1013_2.png) [@Clxxcv](https://forum.genieacs.com/u/Clxxcv)\
**Post date:** [February 15, 2023, 1:09pm UTC](https://forum.genieacs.com/t/create-a-custom-button/3551/1 "2023-02-15T13:09:58Z")

</div>

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

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/2X/2/2f7a04b903c3df9044caa63e96d3b0d341289c51.png)

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 !

 ![image](https://canada1.discourse-cdn.com/flex035/uploads/genieacs/original/2X/b/b0a8293ef5fb190960908778785d42ecc0b10d19.png)

autoprovisioning is working and i get …

PROVISION A

```auto

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"){
  declare('InternetGatewayDevice.WiFi.NeighboringWiFiDiagnostic.Result')
  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.

PROVISION B

```auto

declare("Tags.DIAG_End", null, {value: false});
let now = Date.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 …

---

<div class="post-metadata">

**Author:** ![officea-glas](https://avatars.discourse-cdn.com/v4/letter/o/e480ec/32.png) [@officea-glas](https://forum.genieacs.com/u/officea-glas)\
**Post date:** [March 21, 2025, 7:43pm UTC](https://forum.genieacs.com/t/create-a-custom-button/3551/2 "2025-03-21T19:43:18Z")

</div>

Hello  
Du you have a solution found for this?

Thanks
