Doubts TR-098, TR-181: 1 and TR181: 2

Hello,
Is it possible that my genieacs understand TR-098, TR-181: 1 and TR181: 2 equipments simultaneously? If so, how to do it?

Thanks

Someone ?
I would really like a direction on the subject.

Well, lets review what each spec does.
TR-098: Adds support for more device parameters. Still based on TR-069.
TR-181 - “This Technical Report defines version 2 of the TR-069 [2] Device data model (Device:2)” - Still based on TR-069

So it would appear that both of these specs are based on TR-069. Which GenieACS is a TR-069 server, so it would appear there is no issue.

Now if you are asking how you can support devices that use InternetGatewayDevice and Device as their top level objects, thats a different issue. VirtualParameters can help to abstract away some of the differences.

The rest of this is specific to your implementation.

Thanks for the clarification, I’m still new here, my concern would be just that, is there any documentation for VirtualParameters that you can refer me?

Virtual Parameters

It is hard to follow without more examples than are generally available.

In my case I need access to Uptime so I created a Virtual Parameter called Uptime and populated it like this:

// Unified across Device and InternetGatewayDevice
let v1 = declare("Device.DeviceInfo.UpTime", {value: Date.now()});
let v2 = declare("InternetGatewayDevice.DeviceInfo.UpTime", {value: Date.now()});

if (typeof v1.value !== "undefined") {
  return {writable: false, value: v1.value[0]};
}
return {writable: false, value: v2.value[0]};

Then in the Index page and the Device page I could refer to the virtual parameter instead of the model-specific parameter like this:

- label: "'Uptime'"
  parameter: VirtualParameters.UpTime

Note that in the Device page I believe you have to include VirtualParameters under parameters - components - parameters, like this:

- parameters:
    - components:
        - type: "'parameter'"
        - chart: "'online'"
          type: "'overview-dot'"
        - parameters:
                 - VirtualParameters
1 Like

Here is the VParam I use for uptime. I actually use this same basic script, except swapping out the array params for a lot of different vparams. This script has the slight advantage in that it stops at the first found key. So in our environment because almost all of our devices are using data model v1, I put the IGD entry at the top.

let value = 'UNKNOWN';
let keys = [
  'InternetGatewayDevice.DeviceInfo.UpTime',
  'Device.DeviceInfo.UpTime'
];

for (let key of keys) {
    let d = declare(key, {value: Date.now()});
    if (d.size) {
        value = d.value[0];
        break;
    }
}

let result = {writable: false, value: [value, 'xsd:int']};

return result;
1 Like