Search code examples
iotfiwarefiware-orioncomplex-event-processingfiware-perseo

FiWARE: Detecting when a sensor is not sending data to Orion CB


I'm wondering if there is any way of detecting that a specific sensor, in a specific path, has stopped sending data to the Orion Context Broker. Then, if that happens, be able to execute some kind of alarm. I've been studying FiWARE for some months now, but I really don't know a GE that is able to do this.

Does anybody know how can I solve this problem? Thanks in advance.


Solution

  • Perseo CEP have a "no signal" rule type that allows to detect the lack of update in Orion attributes. It is open source and you can have a look, although I don't know to which extend this feature is documented.

    However, it shouldn't be difficult to develop a system doing so. Just to subscribe to the desired attribute using regular subscriptions at Orion and if you don't receive any notification in a given time, then it has stopped to send information to Orion.

    If you don't want to use subscriptions, your system could query Orion at a regular basic and check the dateModified metadata associated to the attribute, i.e. GET /v2/entities/device1/attrs/measure?metadata=dateModified. Please have a loook to the NGSIv2 specification section "System/builtin Metadata" about the dateModified metadata.