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

FIWARE.Question.Tech.IoT.IDAS.FIWARE commands from CB to Ultralight 2.0 device

    Details

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

      Description

      Created question in FIWARE Q/A platform on 03-10-2019 at 10:10
      Please, ANSWER this question AT https://stackoverflow.com/questions/58214910/fiware-commands-from-cb-to-ultralight-2-0-device

      Question:
      FIWARE commands from CB to Ultralight 2.0 device

      Description:
      I need to send commands from a FIWARE CB to an UltraLight 2.0 device through an IoT agent via HTTP (polling mode). Although this tutorial only explains how to provision commands for a specific device:

      https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html

      I'm trying to provision a couple of commands (no2_offset and no2_factor) for the whole service group as follows:

      HTTP POST http://localhost:4041/iot/services

      {
      "services": [
      {
      "apikey": "si95g7noxpmah9cbx9ggoe36v7",
      "protocol": ["IoTA-UL"], "cbroker": "http://orion:1026",
      "entity_type": "myType",
      "resource": "/iot/d",
      "attributes": [

      { "object_id": "t", "name": "temperature", "type": "Number" }

      ,

      { "object_id": "h", "name": "humidity", "type": "Number" }

      ,

      { "object_id": "no2", "name": "NO2", "type": "Number" }

      ],
      "commands": [

      { "object_id": "no2off", "name": "no2_offset", "type": "command" }

      ,

      { "object_id": "no2fac", "name": "no2_factor", "type": "command" }

      ]
      }
      ]}

      The CB accepts the above request without problems. Then I query an entity under the above service group and I get the following response:

      [
      {
      "id": "myServicePath:DEVICE_807D3AF39E18",
      "type": "myType",
      "NO2": {
      "type": "Number",
      "value": 3.76,
      "metadata": {
      "TimeInstant":

      { "type": "DateTime", "value": "2019-10-02T15:56:35.00Z" }

      }
      },
      "TimeInstant": {
      "type": "DateTime",
      "value": "2019-10-02T15:56:35.00Z",
      "metadata": {}
      },
      "humidity": {
      "type": "Number",
      "value": 42.73,
      "metadata": {
      "TimeInstant":

      { "type": "DateTime", "value": "2019-10-02T15:56:35.00Z" }

      }
      },
      "no2_factor_info": {
      "type": "commandResult",
      "value": " ",
      "metadata": {}
      },
      "no2_factor_status": {
      "type": "commandStatus",
      "value": "PENDING",
      "metadata": {
      "TimeInstant":

      { "type": "DateTime", "value": "2019-10-02T15:36:21.00Z" }

      }
      },
      "no2_offset_info": {
      "type": "commandResult",
      "value": " ",
      "metadata": {}
      },
      "no2_offset_status": {
      "type": "commandStatus",
      "value": "PENDING",
      "metadata": {
      "TimeInstant":

      { "type": "DateTime", "value": "2019-10-02T14:40:56.00Z" }

      }
      },
      "temperature": {
      "type": "Number",
      "value": 26.49,
      "metadata": {
      "TimeInstant":

      { "type": "DateTime", "value": "2019-10-02T15:56:35.00Z" }

      }
      },
      "no2_offset": {
      "type": "string",
      "value": "",
      "metadata": {}
      },
      "no2_factor": {
      "type": "string",
      "value": "",
      "metadata": {}
      }
      }
      ]

      Both commands, along with some *_info and *_status stuff appear integrated among the rest of attributes. Everything looks good to me except for the type=string instead of type=command. In any case, whenever I update the entity with a new command value I never get the command on the device side (body always empty) although getting the entity really shows the update.

      Any idea? Is provisioning commands in the creation of service groups supported?

      Thanks in advance for your time,

      Daniel.

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2019-10-03 12:05|CREATED monitor | # answers= 0, accepted answer= False

        Show
        backlogmanager Backlog Manager added a comment - 2019-10-03 12:05|CREATED monitor | # answers= 0, accepted answer= False
        Hide
        jason.fox Jason Fox added a comment -

        Question unclear, no further interaction. closing.

        Show
        jason.fox Jason Fox added a comment - Question unclear, no further interaction. closing.

          People

          • Assignee:
            jason.fox Jason Fox
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: