Search code examples
fiware-orionfiware-cygnusfiware-sth-comet

Save attribute data with same value in Cygnus & STH-Comet


I created the subscription in Orion to save data via Cygnus in STH-Comet. Is there a way to save data when a client updates the attribute with the same value?


Solution

  • Basically, you have two ways to make Orion sending notifications even when the attribute value doesn't change at update time (assuming that the attribute is covered by the subscription, of course ;)

    • Use the forcedUpdate option in the update request, eg. POST /v2/entities/E/attrs?options=forcedUpdate. This feature was introduced in Orion 2.2.0.
    • Include entityUpdate in the alterationTypes field in the subscription (check more information on this in Orion API documentation). This feature was introduced in Orion 3.7.0, although some later fix was done in Orion 3.8.0.

    The first may require modification on clients. The second one probably is better, as it is configured in the subscription.

    In any case, I'd recommend you to upgrade Orion Context Broker to the newest version (today that is 3.11.0, but in a couple of days Orion 3.12.0 will be released).