Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Data
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 25-05-2016 at 14:05
Please, ANSWER this question AT http://stackoverflow.com/questions/37437225/fiware-orion-context-broker-subscriptions-condition-does-not-work
Question:
Fiware Orion context broker subscriptions condition does not work
Description:
I am using Orion Context Broker version 1.1.0
I had the only entity in my DB:
{
"id"=>"Room1",
"type"=>"Room",
"temperature"=>{"type"=>"none", "value"=>10, "metadata"=>{}}
}
I did not have any subscription.
Then I created 3 subscriptions:
[
{
"subject"=>{"entities"=>[
"condition"=>{"attrs"=>["temperature"], "expression"=>{"q"=>"temperature>10"}}}
},
{
"subject"=>{"entities"=>[{"id"=>"Room1", "idPattern"=>"", "type"=>""}
],
"condition"=>{"attrs"=>["temperature"], "expression"=>
}}
},
{
"subject"=>{"entities"=>[
],
"condition"=>{"attrs"=>["temperature"], "expression"=>
}}
}
]
As you can see, the difference is only in the expressions: temperature>10, temperature<10, temperature==10.
So that any time I change the Room1 temperature I should have only one subscription triggering the notification.
But it does not work as it should !!!
Each time I change the temperature, I have all 3 notifications.
However, when subscriptions were created, only one of them triggered a notification, depending on the temperature value of the Room1. It worked as expected.
But when Room1 temperature is changed, it does not work correctly and triggers all 3 notifications.
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
HD-Enabler | Unknown [ 10910 ] | |
HD-Chapter | Unknown [ 10845 ] | |
HD-Node | Unknown [ 10852 ] |
HD-Enabler | Unknown [ 10910 ] | Orion [ 10875 ] |
HD-Chapter | Unknown [ 10845 ] | Data [ 10838 ] |
Assignee | Fermín Galán [ fermin ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Resolution | Fixed [ 1 ] |
Summary | [fiware-stackoverflow] Fiware Orion context broker subscriptions condition does not work | FIWARE.Question.Tech.Data.OrionContextBroker.Fiware Orion context broker subscriptions condition does not work |
HD-Node | Unknown [ 10852 ] |
Fix Version/s | 2021 [ 12600 ] |