Uploaded image for project: 'Help-Desk'
  1. Help-Desk
  2. HELP-18358

FIWARE.Question.Tech.FIWARE - Orion Context Broker as Context Provider.

    Details

      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":

      { "url": "http://localhost:1026/v2" }

      ,
      "supportedForwardingMode": "all"
      },
      "dataProvided": {
      "entities": [

      { "id": "urn:ngsi-ld:building:001", "idPattern": null, "type": "Building", "typePattern": null }

      ],
      "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

        Hide
        backlogmanager Backlog Manager added a comment -

        2021-09-23 05:31|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2021-09-23 05:31|CREATED monitor | # answers= 0, accepted answer= False

          People

          • Assignee:
            kzangeli Ken Zangelin
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: