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

FIWARE.Request.Tech.IoT.IDAS.No measurements in CB Entity when sent via IDAS UL2.0

    Details

    • Type: extRequest
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Fix Version/s: 2021
    • Component/s: FIWARE-TECH-HELP
    • Labels:
      None

      Description

      Hi,

      I have been trying to get UL2.0 via IDAS to the CB working:

      I have a FI-WARE Lab account with token generated. Changed the
      config.ini file:
      [user]

      1. Please, configure here your username at FIWARE Cloud and a valid
        Oauth2.0 TOKEN for your user (you can use get_token.py to obtain a valid
        TOKEN).
        username=MY_USERNAME
        token=MY_TOKEN

      [contextbroker]
      host=130.206.80.40
      port=1026
      OAuth=no

      1. Here you need to specify the ContextBroker database you are querying.
      2. Leave it blank if you want the general database or the IDAS service if
        you are looking for IoT devices connected by you.
      3. fiware_service=
        fiware_service=bus_auto
        fiware-service-path=/

      [idas]
      host=130.206.80.40
      adminport=5371
      ul20port=5371
      OAuth=no

      1. Here you need to configure the IDAS service your devices will be
        sending data to.
      2. By default the OpenIoT service is provided.
      3. fiware-service=fiwareiot
        fiware-service=bus_auto
        fiware-service-path=/
        #apikey=4jggokgpepnvsb2uv4s40d59ov
        apikey=4jggokgpepnvsb2uv4s40d59ov

      [local]
      #Choose here your System type. Examples: RaspberryPI, MACOSX, Linux, ...
      host_type=MACOSX

      1. Here please add a unique identifier for you. Suggestion: the 3 lower
        hexa bytes of your Ethernet MAC. E.g. 79:ed:af
      2. Also you may use your e-mail address.
        host_id=a0:11:00

      I used the SENSOR_TEMP template, including the 'protocol' field
      (PDI-IoTA-UltraLight which as the first problem I stumbled upon):

      {
      "devices": [
      { "device_id": "DEV_ID",
      "entity_name": "ENTITY_ID",
      "entity_type": "thing",
      "protocol": "PDI-IoTA-UltraLight",
      "timezone": "Europe/Amsterdam",
      "attributes": [

      { "object_id": "otemp", "name": "temperature", "type": "int" }

      ],
      "static_attributes": [

      { "name": "att_name", "type": "string", "value": "value" }

      ]
      }
      ]
      }

      Now I can Register the device ok. Like
      python RegisterDevice.py SENSOR_TEMP NexusPro Temp-Otterlo
      and see it in Device List:
      python ListDevices.py
      I can send Observations like
      python SendObservation.py Temp-Otterlo 'otemp|17'

      But in the ContextBroker I see the Entity but never the measurements, e.g.
      python GetEntity.py Temp-Otterlo

      • Asking to http://130.206.80.40:1026/ngsi10/queryContext
      • Headers: {'Fiware-Service': 'bus_auto', 'content-type': 'application/json', 'accept': 'application/json', 'X-Auth-Token': 'NULL'}
      • Sending PAYLOAD:
        {
        "entities": [ { "type": "", "id": "Temp-Otterlo", "isPattern": "false" }

        ],
        "attributes": []
        }

      ...

      • Status Code: 200
      • Response:
        {
        "contextResponses" : [
        {
        "contextElement" : {
        "type" : "thing",
        "isPattern" : "false",
        "id" : "Temp-Otterlo",
        "attributes" : [
        { "name" : "TimeInstant", "type" : "ISO8601", "value" : "2015-10-03T14:04:44.663133Z" }

        ,

        Unknown macro: { "name" }

        ]
        },
        "statusCode" :

        { "code" : "200", "reasonPhrase" : "OK" }

        }
        ]
        }

      I get an TimeInstant attribute strangely. I tried playing with settings
      of the .ini like fiware-service=fiwareiot, but to no avail. I am out of
      ideas. The documentation at
      http://catalogue.fiware.org/enablers/backend-device-management-idas/instances/global-instance-ul20http-iot-agent-release-4
      is talking about observations to be sent to port 8002 and setting
      "OpenIoT" service, but that failed.

      Any help is appreciated.

      kind regards / met vriendelijke groet,

      --Just

      Just van den Broecke
      The Netherlands
      www.justobjects.nl

      Since January 1st, old domains won't be supported and messages sent to any domain different to @lists.fiware.org will be lost.
      Please, send your messages using the new domain (Fiware-lab-help@lists.fiware.org) instead of the old one.
      _______________________________________________
      Fiware-lab-help mailing list
      Fiware-lab-help@lists.fiware.org
      https://lists.fiware.org/listinfo/fiware-lab-help

      [Created via e-mail received from: Just van den Broecke <just@justobjects.nl>]

        Activity

        Hide
        ralli Carlos Ralli Ucendo added a comment -

        Answered in Stackoverflow.

        Show
        ralli Carlos Ralli Ucendo added a comment - Answered in Stackoverflow.

          People

          • Assignee:
            ralli Carlos Ralli Ucendo
            Reporter:
            fw.ext.user FW External User
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: