Re: Notifications / Events

2017-08-09 Thread James McNab

> On 9 Aug 2017, at 07:50, Zaid Abdulla  wrote:
> 
> How about create a provision script triggered on "4 VALUE CHANGE" and
> calls an extension script which handlings sending you a notification

Hi Zaid,

That would work in terms of sending a notification but the provisioning script 
does not have access to details of the Inform that triggered it to run does it? 
(Event codes, parameter list included in the Inform etc). I need to know what 
parameters were included in the 4 VALUE CHANGE Inform so I know what has 
changed (not just that ‘something’ has changed).

If the cpeRequest object was passed into the provision when it is run in the 
sandbox then I could pass this to an external script to do the notification.

It would also be useful to have notifications when a task is completed or 
faults, otherwise we have to poll the ACS to work out if the task has completed 
or not. Perhaps something worth considering if you are looking at adding 
pub/sub events to the next version of the API. This is something I might look 
at adding to my fork.

I believe this notification/event mechanism is actually specified in the NBI 
spec TR-131 6.7 Events.
___
Users mailing list
Users@lists.genieacs.com
http://lists.genieacs.com/mailman/listinfo/users


Re: Notifications / Events

2017-08-08 Thread Zaid Abdulla
On Fri, 2017-08-04 at 08:58 +0100, James McNab wrote:
> I need so I can be informed when something changes on the device, the
> alternative is I have to poll the GenieACS API and compare a stored
> copy of the data model to the new copy, which seems extremely
> inefficient.

How about create a provision script triggered on "4 VALUE CHANGE" and
calls an extension script which handlings sending you a notification?

> I think it might be worth re-evaluating that PR if the new API is not
> going to be released in the near future.

I'm afraid I have too much on my plate. Feel free to maintain a fork
with that feature though.

-- 
Zaid Abdulla 
___
Users mailing list
Users@lists.genieacs.com
http://lists.genieacs.com/mailman/listinfo/users


Re: Notifications / Events

2017-08-04 Thread James McNab
Hi  Zaid,

Thanks for getting back to me.

Unfortunately I don’t think provisions and extensions are going to work for me, 
as in provision you don’t have visibility of data that was received in the 
Inform message i.e. what type of event trigger the inform and also what 
parameters were included (most useful for a 4 VALUE CHANGE). I need so I can be 
informed when something changes on the device, the alternative is I have to 
poll the GenieACS API and compare a stored copy of the data model to the new 
copy, which seems extremely inefficient.

I’m going to look at akcoder’s branch that implements this 
(https://github.com/zaidka/genieacs/pull/45 
) and see if I can rebase it to 
your master, but I think it might be worth re-evaluating that PR if the new API 
is not going to be released in the near future. I’d rather not be using a fork 
if possible!

Cheers,
James

> On 2 Aug 2017, at 01:13, Zaid Abdulla  wrote:
> 
> On Mon, 2017-07-24 at 16:22 +0100, James McNab wrote:
>> Are there still plans to implement some sort of pub/sub event system
>> as stated in the second issue there, or could we implement this
>> feature using a provision + extension?
> 
> That's something we're working on as part of a completely new API. It
> still has a long way to go though. For implementing device provisioning
> and such, provisions and extensions should be everything you need.
> 
> -- 
> Zaid Abdulla 
> ___
> Users mailing list
> Users@lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users

___
Users mailing list
Users@lists.genieacs.com
http://lists.genieacs.com/mailman/listinfo/users


Re: Notifications / Events

2017-08-01 Thread Zaid Abdulla
On Mon, 2017-07-24 at 16:22 +0100, James McNab wrote:
> Are there still plans to implement some sort of pub/sub event system
> as stated in the second issue there, or could we implement this
> feature using a provision + extension?

That's something we're working on as part of a completely new API. It
still has a long way to go though. For implementing device provisioning
and such, provisions and extensions should be everything you need.

-- 
Zaid Abdulla 
___
Users mailing list
Users@lists.genieacs.com
http://lists.genieacs.com/mailman/listinfo/users


Re: Notifications / Events

2017-07-24 Thread Dan Morphis
Please look at v1.1. You can do this with presets and external scripts.

On Mon, Jul 24, 2017 at 7:22 AM, James McNab  wrote:

> Hello all,
>
> Is there any way to set up notifications or events to be sent out from
> GenieACS, for instance on receiving a 4 VALUE CHANGE Inform from a CPE?
>
> I noticed there are a number of closed PRs on GitHub that have implemented
> this feature:
>
> - https://github.com/zaidka/genieacs/pull/163
> - https://github.com/zaidka/genieacs/pull/45
>
> Are there still plans to implement some sort of pub/sub event system as
> stated in the second issue there, or could we implement this feature using
> a provision + extension?
>
> Cheers,
> James
>
> ___
> Users mailing list
> Users@lists.genieacs.com
> http://lists.genieacs.com/mailman/listinfo/users
>
>
___
Users mailing list
Users@lists.genieacs.com
http://lists.genieacs.com/mailman/listinfo/users