EPL Apps that monitor the Events from devices that in specific group

Hi Team,

I am working for a demo that need monitor all the events from devices in specific group.

The group name should be hard code in the EPL, e.g: ‘EPL_Event_Check_Group’.

So far we can specific the type for the event like below .
on all Event(type = Constants.INPUT_EVENT_TYPE)

Are there any EPL sample that can find out the devices in specific group , then monitor all events from those devices?


You will first need to do a FindManagedObject using the name of your group in the params. Eg

send FindManagedObject(reqId, "", { "query":"name eq ' EPL_Event_Check_Group'"}) to FindManagedObject.SEND_CHANNEL;

In the response you will have all the child devices or child assets and their related Ids.
From there, you simply create your listeners based on those Ids.
An example would be:

on all Event(source=One_of_the_Child_Id_received, type = Constants.INPUT_EVENT_TYPE)

Hi Monnereau,
Shall we also need create a listener for the ManagedObject of Group ?

on all ManagedObject (id=group_id)

Because there will be new devices assigned to the group.

Hi Chen

Yes indeed, and keep in memory the ids of the device you already created a listener for. So you dont recreate the same listener for the same child devices when you receive an update of the MO Group