Presets not executing

Dan Morphis dan at milkcarton.com
Fri Jun 8 12:51:46 EDT 2018


You should switch to provisioning scripts. It will be much more robust. A
SPV from a preset requires that full chain to exist in GenieACS's cache of
the device object model. I.e., if you are trying to set
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANIPConnection.1.Enable
to true, but GenieACS only has
InternetGatewayDevice.WANDevice.1.WANConnectionDevice
in its cache of the model, then nothing will happen for that CPE for that
preset.

With a provision script, you do:
declare("
InternetGatewayDevice.WANDevice.1.WANConnectionDevice.*.WANIPConnection.*.Enable",
{value: 1}, {value: true});

When the preset runs the provisioning script, genie will then refresh the
tree (if it hasn't been refreshed since 1 microsecond after epoch, thats
what the 1 is - a timestamp in epoch format) and set the state. If instead
of {value: 1} for the second parameter, you do {value: Date.now()}, then
everytime that declare statement is executed, GenieACS will refresh the
parameter value to see if it needs to be set. This is usually *not* what
you want to do.

Provision scripts take a bit to understand, but think of them like this,
you are declaring the state you want the CPE to be in.

The wiki
<https://github.com/genieacs/genieacs/wiki/Example-of-a-Provisioning-Flow>
has some good examples on there.

On Fri, Jun 8, 2018 at 8:28 AM, Grímur Daníelsson <grimurd at snerpa.is> wrote:

> I'm using v1.1.2 as stated in the original email.
>
> The parameters exist in the object model of the CPEs. They are however
> custom for these CPEs, they aren't part of the TR069 data model.
>
> In case it makes a difference, the whole object isn't pulled when doing a
> refresh of the device. It appears in the list but I have to refresh it
> manually to see its child parameters. Do I perhaps have to refresh the
> object before attempting to set a value inside it?
>
> Regards, Grimur
>
> On Fri, 2018-06-08 at 08:17 -0800, Dan Morphis wrote:
>
> For the CPEs that the preset isn't working on, does the parameter you're
> trying to set exist in their object model? You also don't indicate what
> version of GenieACS you are using...
>
> -dan
>
> On Fri, Jun 8, 2018 at 7:58 AM, Grímur Daníelsson <grimurd at snerpa.is>
> wrote:
>
> Hi
>
> I've set up presets(one per type of device) to change some parameters on a
> few different types of CPEs. The problem is that they only trigger for
> around 30% of those cpes.
>
> I've got ~330 devices and it has only triggered for around a ~130. These
> devices are of different types and with different firmwares. Many of the
> devices that wont work are of the same type with the same firmware and
> configuration as those that do work. Theres nothing obviously different
> between those that work and those that don't.
>
> There are no errors in the cwmp error log though I do get the occational
> "Preset hash mismatch" error but they don't seem to correlate with when the
> devices inform and there's too few of them to be triggered by informs.
>
> When an inform comes from a device that should trigger the preset there
> are no GetParameterValues or SetParameterValues and retry count is always
> 0.
>
> It's like the presets don't trigger at all.
>
> I've got GenieACS 1.1.2 and the latest commit from GenieacsGUI
>
> *Preset example:*
> Name: Test Preset
> Weight: 0
> Channel: Empty
> Schedule: Empty
> Events: 2 PERIODIC
> Precondition:
> - Product Class = VMG8924-B10D
> - Tag != TestParameterSet
> Config:
> - Set SomeParameter to SomeValue
> - Add tag: TestParameterSet
>
> Any idea what could be wrong?
>
> Regards, Grímur
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
> _______________________________________________
>
> Users mailing list
>
> Users at lists.genieacs.com
>
> http://lists.genieacs.com/mailman/listinfo/users
>
>
>
> _______________________________________________
> Users mailing list
> Users at lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.genieacs.com/pipermail/users/attachments/20180608/8808dedf/attachment.html>


More information about the Users mailing list