# Provision Based on OUI / Device Vendor

**URL:** <https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565>\
**Category:** Uncategorized\
**Created:** [October 4, 2023, 11:03am UTC](https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565 "2023-10-04T11:03:36Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![GeneiACS](https://avatars.discourse-cdn.com/v4/letter/g/e68b1a/32.png) [@GeneiACS](https://forum.genieacs.com/u/GeneiACS)\
**Post date:** [October 4, 2023, 11:03am UTC](https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565/1 "2023-10-04T11:03:36Z")

</div>

Hello,

In Default Provision can i edit it so it declare values (update values) based on the device OUI / Vendor ?  
Is the below provision is right ?

// set 5 minutes refresh parameter  
const min = Date.now(30000)  
const now = Date.now()  
const OUI = declare(“DeviceID.OUI”, {path:min, value:min});

if (OUI.value == “000271” || “40f21c”){  
declare(“InternetGatewayDevice”, {path:min, value:min});  
}  
else if (OUI.value == “00259E”){  
declare(“InternetGatewayDevice.DeviceInfo”, {path:min, value:min});  
}  
else  
{  
declare(“Device”, {path:min, value:min});  
}

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [October 4, 2023, 7:56pm UTC](https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565/2 "2023-10-04T19:56:59Z")

</div>

Why are you trying to refresh the entire object model for all of your devices? This is wildly inefficient and will slow down the provisioning process.

---

<div class="post-metadata">

**Author:** ![GeneiACS](https://avatars.discourse-cdn.com/v4/letter/g/e68b1a/32.png) [@GeneiACS](https://forum.genieacs.com/u/GeneiACS)\
**Post date:** [October 5, 2023, 6:17am UTC](https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565/3 "2023-10-05T06:17:51Z")

</div>

This is as an example, i dont want to refresh the full model, i want to refresh specific parameters.  
But is that right provision script ? since it does not work .

---

<div class="post-metadata">

**Author:** ![akcoder](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/akcoder/32/11_2.png) [@akcoder](https://forum.genieacs.com/u/akcoder)\
**Post date:** [October 5, 2023, 6:33pm UTC](https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565/4 "2023-10-05T18:33:51Z")

</div>

You can put it in any provision script. What I typically do is have multiple provision scripts. I have one just for refreshing DSL stats. Another that is kicked off by `8 DIAGNOSTICS COMPLETE`, another for WAN and LAN data.

Here is one for refreshing DSL information every two days:

```auto
/* global declare:false */
//log('Refresh_ATM_Stats');
const oneDay = 60 * 60 * 24 * 1000; // 60 secs / minute, 60 mins / hour, 24 hrs / day
const dslRefreshInterval = Date.now() - (oneDay * 1.5);
const statsRefreshInterval = Date.now() - (oneDay * 0.25);
const twoDaysAgo = Date.now() - (oneDay * 2);

const paramNames = [
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.ModulationType',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamCurrRate',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamCurrRate',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamMaxRate',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamMaxRate',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamNoiseMargin',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamNoiseMargin',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamAttenuation',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamAttenuation',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.UpstreamPower',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.DownstreamPower',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.LinkEncapsulationUsed',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.LineNumber',
    'InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.X_BROADCOM_COM_BondingLineNumber',
    'Device.DSL.Channel.*.UpstreamCurrRate',
    'Device.DSL.Channel.*.DownstreamCurrRate',
    'Device.DSL.Channel.*.LinkEncapsulationUsed',
    'Device.DSL.Channel.*.Stats.*.*',
    'Device.DSL.Line.*.UpstreamMaxBitRate',
    'Device.DSL.Line.*.DownstreamMaxBitRate',
    'Device.DSL.Line.*.UpstreamNoiseMargin',
    'Device.DSL.Line.*.DownstreamNoiseMargin',
    'Device.DSL.Line.*.UpstreamAttenuation',
    'Device.DSL.Line.*.DownstreamAttenuation',
    'Device.DSL.Line.*.UpstreamPower',
    'Device.DSL.Line.*.DownstreamPower',
    'Device.DSL.Line.*.LineNumber',
    'Device.DSL.Line.*.X_ZYXEL_BondingLineNumber'
];

for(let key of paramNames) {
    //log('Refreshing ATM key', {key: key});
    declare(key, {path: twoDaysAgo, value: dslRefreshInterval});
}

// Refresh stats every 4 hours
declare('InternetGatewayDevice.WANDevice.*.WANDSLInterfaceConfig.Stats.*.*', {path: twoDaysAgo, value: statsRefreshInterval});
declare('Device.DSL.Line.*.Stats.*.*', {path: twoDaysAgo, value: statsRefreshInterval});
declare('Device.DSL.Channel.*.Stats.*.*', {path: twoDaysAgo, value: statsRefreshInterval});

```

---

<div class="post-metadata">

**Author:** ![GeneiACS](https://avatars.discourse-cdn.com/v4/letter/g/e68b1a/32.png) [@GeneiACS](https://forum.genieacs.com/u/GeneiACS)\
**Post date:** [October 6, 2023, 5:10pm UTC](https://forum.genieacs.com/t/provision-based-on-oui-device-vendor/4565/5 "2023-10-06T17:10:00Z")

</div>

Thank You for Help, Will check and get back to you if there are any issue.
