Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
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 17-03-2016 at 16:03
Please, ANSWER this question AT http://stackoverflow.com/questions/36064565/fiware-orion-subscription-with-georel-expression-in-condition
Question:
Fiware orion subscription with georel expression in condition
Description:
I have an entity in my orion DB:
{
"id"=>"User-121",
"type"=>"User",
"location"=>
,
"time"=>{"type"=>"none", "value"=>222909, "metadata"=>{}}
}
Also, I have 3 subscriptions to this entity, which have the same coordinates in condition's expression:
Should trigger when the entity is located, at least 100 meters far away from the reference point.
{
"id"=>"...",
"expires"=>"...",
"status"=>"active",
"subject"=>{
"entities"=>[
"condition"=>{
"attributes"=>["location", "time"],
"expression"=>{ "q"=>"", "geometry"=>"point", "coords"=>"59.851484, 30.199463", "georel"=>"near;minDistance:100"}
}
},
"notification"=>{ "callback"=>"http://callback", "attributes"=>["time"] }
}
Should trigger when the entity is located, at a maximum, 100 meters far away from the reference point
{
"id"=>"...",
"expires"=>"...",
"status"=>"active",
"subject"=>{
"entities"=>[{"id"=>"User-121", "idPattern"=>"", "type"=>"User"}
],
"condition"=>{
"attributes"=>["location", "time"],
"expression"=>
}
},
"notification"=>
},
Should trigger when the entity is located at the reference point (has the same coordinates)
{
"id"=>"...",
"expires"=>"...",
"status"=>"active",
"subject"=>{
"entities"=>[
],
"condition"=>{
"attributes"=>["location", "time"],
"expression"=>
}
},
"notification"=>
}
The problem is that all of the subscriptions send notifications each time I update the entity. It doesn't even depend on the entity's coordinates values. Whatever the coordinates are, I always receive 3 notifications of any update.
What am I doing wrong ?
Activity
- All
- Comments
- History
- Activity
- Transitions
2016-03-17 18:05|CREATED monitor | # answers= 0, accepted answer= False