Change Plan of bandwidth depending on the time.

Change Plan of bandwidth depending on the time. (like a cron job)

On the Canopy Network (BAM or Prizm, I do not know), is there any way to increase the speed of customers at night and normalize it from a certain time?

Example
- From 08:00h to 20:59h the speed of the client is 512 Kbps
- From 21:00h to 07:59h the speed of the client is 1 mbps

Thanks.

You can do this via the SOAP API and some database calls if you like. On Moto’s website check out the Prizm SDK. It provides reasonable documentation of all the calls you can do.

Personally, I had a little too much fun trying to pull data with the SOAP API so prefer to use database calls for pretty much everything (lots faster in my setup, too).

Here’s a sample to help get you started. It’s a PHP function that updates the VLAN profile of a radio given the MAC address and the proper name of the VLAN profile: (real programmers please go easy on me, I know it sucks)


// Applies the chosen VLAN profile to a Canopy radio in Prizm

function setCanopyVLANProfile($mot_mac, $mot_vlan_profile){
$el_id_query = “SELECT element_id FROM bam_sm WHERE sm_mac_address = ‘$mot_mac’ limit 1”;
//echo “Query to Prizm DB: <pre>” . $el_id_query . “</pre><br>'n’n”;
$el_id_raw = pg_query($GLOBALS[‘prizm_con’], $el_id_query);
if (!$el_id_raw){
die(“Unable to fetch Canopy ID by MAC: " . pg_last_error($GLOBALS[‘prizm_con’]));
}
$el_id_nice = pg_fetch_array($el_id_raw, NULL, PGSQL_ASSOC);
extract($el_id_nice);

//echo “Returned Element ID: " . $element_id . “<br><br>'n’n”;

$soap_cred = array(‘login’=>’[your username here]’, ‘password’=>’[your password here]’);
$soapy = new SoapClient(“https://[your prizm ip here]:8443/prizm/nbi/NetworkIfService?wsdl”, $soap_cred);

$stuff = $soapy->setElementConfigSetExt(array(”$element_id”), “$mot_vlan_profile”, true, true, “1”);

sleep(2); // Prizm has a delay in processing the command - added this so the next step in our program sees the proper information from Prizm.
}

There is no simple solution ?
Perhaps with two settings on a file config, after a time, on determined hour, the system can change the values!
In others system that is so simple!

Oh, you were asking how to do it in Prizm! I thought you wanted to actually write a cron job :slight_smile:

You should be able to do this with Prizm’s built in Task Scheduler. You would need to make a task that matches SMs with bandwidth profile of X and change it to Y every night at Z, and then every morning at A, change Y back to X.

salad wrote:
Oh, you were asking how to do it in Prizm! I thought you wanted to actually write a cron job :)

You should be able to do this with Prizm's built in Task Scheduler. You would need to make a task that matches SMs with bandwidth profile of X and change it to Y every night at Z, and then every morning at A, change Y back to X.


Thank you. I'll try.
salad wrote:
Oh, you were asking how to do it in Prizm! I thought you wanted to actually write a cron job :)

You should be able to do this with Prizm's built in Task Scheduler. You would need to make a task that matches SMs with bandwidth profile of X and change it to Y every night at Z, and then every morning at A, change Y back to X.


If a license is needed, this license will be put automatically by the Prizm?

If we are using a SM Lite (512) and nocturnal plan is 700 (dn) + 300 (up) + 1500 (burst - up and down).