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

FIWARE.Question.Tech.Ultralight 2.0 commands with parameters (polling mode).

    Details

      Description

      Created question in FIWARE Q/A platform on 26-06-2017 at 13:06
      Please, ANSWER this question AT https://stackoverflow.com/questions/44758686/ultralight-2-0-commands-with-parameters-polling-mode

      Question:
      Ultralight 2.0 commands with parameters (polling mode)

      Description:
      I have found some troubles working with commands. According to the sintaxis of the protocol, a command can be executed using an updateContext operation to the Orion Context Broker, which now it is working perfect.

      The doubt is, how do I give the command some parameters, as specified in the protocol?

      <device name>@<command name>|<param name>=<value>|....

      If I send the following REST request, it gives me a 400 Bad request, complaining about strange characters:

      curl -X PUT \
      'http://MYIP:1026/v2/entities/1111/attrs/blink?type=Thing' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/json' \
      -H 'fiware-service: howtoservice' \
      -H 'fiware-servicepath: /howto' \
      -d '

      { "type": "command", "value": "blink=true|another_param=false" }

      '

      Where should I issue the params if it is not in the "value" key?

      If I use the following request, it acts as expected:

      curl -X PUT \
      'http://MYIP:1026/v2/entities/1111/attrs/blink?type=Thing' \
      -H 'cache-control: no-cache' \
      -H 'content-type: application/json' \
      -H 'fiware-service: howtoservice' \
      -H 'fiware-servicepath: /howto' \
      -d '

      { "type": "command", "value": "true" }

      '

      Thanks in advance

        Activity

        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 19:51|CREATED monitor | # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 19:51|CREATED monitor | # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 19:54|UPDATED status: transition Answer| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 19:54|UPDATED status: transition Answer| # answers= 1, accepted answer= True
        Hide
        backlogmanager Backlog Manager added a comment -

        2018-01-12 20:03|UPDATED status: transition Finish| # answers= 1, accepted answer= True

        Show
        backlogmanager Backlog Manager added a comment - 2018-01-12 20:03|UPDATED status: transition Finish| # answers= 1, accepted answer= True

          People

          • Assignee:
            frb Francisco Romero
            Reporter:
            backlogmanager Backlog Manager
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: