2
votes

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.

2

2 Answers

1
votes

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.

0
votes

Orion in itself has no such mechanism implemented. However, it would be fairly easy to implement an application (a context consumer) doing what you are asking for. That application would subscribe to the updates of the sensor and keep a timestamp, updated in each incoming notification, and also, of course, check for how long time has elapsed since the last (latest) notification and if that time is greater than some threshold, issue some kind of warning/alarm