1
votes

I would like to create some complex entities, aggregating the results of some simpler entities.

Example scenario: model a room with its temperature.

  • I have 3 temperature sensors in a room.
  • I create under Orion 3 "Sensor" entities with a "Temperature" attribute.
  • I would also like to create a "Room" entity, which contains a consolidated temperature value (says the average of the 3 sensors).

How to do that? Can I use Perseo (http://fiware-iot-stack.readthedocs.io/en/latest/cep/)? The idea is to create a rule on Perseo that will update the attribute value of the room based on the sensor entity values.

1
Any idea on that? @fgalan?cdupont

1 Answers

0
votes

Maybe you can model your scenario with FIWARE Comet STH.

One of the use possibilities is:

Aggregated time series context information: The STH component allows the query and retrieval of historical aggregated time series context information, this is information about the evolution of the entity attribute values grouped by time making it straight-forward to get distinct probabilistic measures such as means, standard deviations, maximum and minimum values, as well as the number of occurrences.

This way, you can get the average of the three sensors.

In order to update your Room entity, I think you can register a notification with a url pointing to your Room entity at Orion and use custom headers to specify the headers needed to make the notification works updating your entity.

The following link can help you about custom headers: How to add a custom header in outgoing notifications with Orion?

I hope this can help you.