# SetParameterAttributes for ValueChangeNotification

**URL:** <https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268>\
**Category:** Uncategorized\
**Created:** [December 3, 2020, 2:21pm UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268 "2020-12-03T14:21:20Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![l.parzinger](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/l.parzinger/32/413_2.png) [@l.parzinger](https://forum.genieacs.com/u/l.parzinger)\
**Post date:** [December 3, 2020, 2:21pm UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268/1 "2020-12-03T14:21:20Z")

</div>

Hi,

I’m currently trying to configure a FritzBox to send a “4 VALUE CHANGE” notification to my GenieACS Server.

I found this discussion in your forum:

> [@Support for Get/SetParameterAttributes RPCs](https://forum.genieacs.com/t/support-for-get-setparameterattributes-rpcs/29):
>
> I’d love to see the GetParameterAttributes and SetParameterAttributes RPCs supported, which would allow us to set passive and active notification on attributes that we wish to be notified of changes to. This was discussed previously on the mailing list and I believe this was planned for the next major release. The proposed task structure: [https://www.mail-archive.com/users@lists.genieacs.com/msg01595.html](https://www.mail-archive.com/users@lists.genieacs.com/msg01595.html)

But I’m lost on the exact syntax I have to use in my provision. Do I have to pass a special value in the “timestamp” field of my declare function?

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![jameswmcnab](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/jameswmcnab/32/17_2.png) [@jameswmcnab](https://forum.genieacs.com/u/jameswmcnab)\
**Post date:** [December 3, 2020, 4:28pm UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268/2 "2020-12-03T16:28:28Z")

</div>

I haven’t tried this yet and I think it is still not documented, but here is the example given by @zaidka

> [@Support for Get/SetParameterAttributes RPCs](https://forum.genieacs.com/t/support-for-get-setparameterattributes-rpcs/29/11):
>
> It’s released but unfortunately not yet documented. But here’s how to set the notification attribute of a parameter: declare("InternetGatewayDevice.SomeParameter", {notification: timestamp}, {value: 1});

---

<div class="post-metadata">

**Author:** ![l.parzinger](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/l.parzinger/32/413_2.png) [@l.parzinger](https://forum.genieacs.com/u/l.parzinger)\
**Post date:** [December 10, 2020, 9:50am UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268/3 "2020-12-10T09:50:36Z")

</div>

Yeah, I tried that but unfortunately the genieacs-cwmp returns this:

```
2020-12-03T14:25:57.071Z [WARN] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Channel has faulted; channel="inform" retries=0 faultCode="script.ReferenceError" faultMessage="timestamp is not defined"
2020-12-03T14:25:57.072Z [WARN] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Channel has faulted; channel="default" retries=0 faultCode="script.ReferenceError" faultMessage="timestamp is not defined"
2020-12-03T14:25:57.104Z [WARN] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Channel has faulted; channel="default" retries=1 faultCode="script.ReferenceError" faultMessage="timestamp is not defined"
2020-12-03T14:31:41.717Z [INFO] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Inform; cpeRequestId="121" informEvent="6 CONNECTION REQUEST" informRetryCount=0
2020-12-03T14:31:42.225Z [INFO] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: ACS request; acsRequestId="176290412ff0000" acsRequestName="SetParameterValues"
2020-12-03T14:31:42.710Z [WARN] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Channel has faulted; channel="inform" retries=0 faultCode="script.ReferenceError" faultMessage="timestamp is not defined"
2020-12-03T14:31:42.719Z [WARN] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Channel has faulted; channel="default" retries=0 faultCode="script.ReferenceError" faultMessage="timestamp is not defined"
2020-12-03T14:31:42.759Z [WARN] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Channel has faulted; channel="default" retries=1 faultCode="script.ReferenceError" faultMessage="timestamp is not defined"
2020-12-03T14:34:11.670Z [INFO] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Inform; cpeRequestId="122" informEvent="2 PERIODIC" informRetryCount=0
2020-12-03T14:38:31.500Z [INFO] X.X.X.X 00040E-FRITZ%21Box-38XXXXXXXX88: Inform; cpeRequestId="123" informEvent="6 CONNECTION REQUEST" informRetryCount=0
```

---

<div class="post-metadata">

**Author:** ![lavira](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@lavira](https://forum.genieacs.com/u/lavira)\
**Post date:** [December 10, 2020, 4:14pm UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268/4 "2020-12-10T16:14:59Z")

</div>

“timestamp is not defined” is self explanatory. You should define it before the declare statement with something like:  
`let timestamp=Date.now()`

---

<div class="post-metadata">

**Author:** ![l.parzinger](https://yyz1.discourse-cdn.com/flex035/user_avatar/forum.genieacs.com/l.parzinger/32/413_2.png) [@l.parzinger](https://forum.genieacs.com/u/l.parzinger)\
**Post date:** [December 11, 2020, 9:20am UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268/5 "2020-12-11T09:20:17Z")

</div>

I already tried that:

```
let timestamp = Date.now();
declare("InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID", {notification: timestamp}, {value: 1});
declare("Tags.ChangeNotificationSet", null, {value: true});

```

This just sets the value of this Parameter to “1”.

Am I missing something or am I just dumb?  
Is it only possible to set active/passive changeNotifications on Parameters which contain other Parameters (in my case “InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.”)?  
I quite lost, tbh.

---

<div class="post-metadata">

**Author:** ![lavira](https://avatars.discourse-cdn.com/v4/letter/l/87869e/32.png) [@lavira](https://forum.genieacs.com/u/lavira)\
**Post date:** [December 11, 2020, 9:53am UTC](https://forum.genieacs.com/t/setparameterattributes-for-valuechangenotification/1268/6 "2020-12-11T09:53:52Z")

</div>

uh, you mentioned just the timestamp error. Please try with:

> declare(“InternetGatewayDevice.LANDevice.1.WLANConfiguration.1.SSID”, {notification: timestamp}, {notification: 1});
