Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
Description
Created question in FIWARE Q/A platform on 22-09-2021 at 16:09
Please, ANSWER this question AT https://stackoverflow.com/questions/69288105/fiware-orion-context-broker-as-context-provider
Question:
FIWARE - Orion Context Broker as Context Provider
Description:
I'm having a hard time to understand how context providers work in the Orion Context Broker.
I followed the examples in the step by step guide written by Json Fox. However, I still do not exactly get what happens in the background and how the context broker exactly creates the POST from the registration. Here is what I am trying to do:
I do have a WeatherStation that provides sensor data for a neighborhood.
{
"id": "urn:ngsi-ld:WeatherStation:001",
"type": "Device:WeatherStation",
"temperature": {
"type": "Number",
"value": 20.5,
"metadata": {}
},
"windspeed": {
"type": "Number",
"value": 60.0,
"metadata": {}
}
}
Now I like the WeatherStation to be a context provider for all buildings.
{
"id": "urn:ngsi-ld:building:001",
"type": "Building"
}
Here is the registration that I try to use.
{
"id": null,
"description": "Random Weather Conditions",
"provider": {
"http":
,
"supportedForwardingMode": "all"
},
"dataProvided": {
"entities": [
],
"attrs": [
"temperature",
"windspeed"
],
"expression": null
},
"status": "active",
"expires": null,
"forwardingInformation": null
}
The context broker accepts both entities and the registration without any error.
Since I have a multi-tenant setup I use one fiware_service for the complete neighborhood but every building would later have a seperate fiware_servicepath. Hence, the weatherstation has a different servicepath than the building. Although I also tried to put them both in the same path.
I also tried to vary the url of the registration but with no success.
Is this scenario actually possible with the current implementation? It would be very useful
Is there any example for this including also the headers?
I know that I could simply use reference but that would put more work on the user.
Thanks for any help on this.
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
HD-Enabler | Unknown [ 10910 ] | |
HD-Chapter | Unknown [ 10845 ] | |
HD-Node | Unknown [ 10852 ] |
Assignee | Ken Zangelin [ kzangeli ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Status | In Progress [ 3 ] | Answered [ 10104 ] |
Resolution | Done [ 10000 ] | |
Status | Answered [ 10104 ] | Closed [ 6 ] |
Summary | [fiware-stackoverflow] FIWARE - Orion Context Broker as Context Provider | FIWARE.Question.Tech.FIWARE - Orion Context Broker as Context Provider. |
HD-Enabler | Unknown [ 10910 ] | |
HD-Chapter | Unknown [ 10845 ] | |
HD-Node | Unknown [ 10852 ] |