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

        fla Fernando Lopez made changes -
        Fix Version/s 2021 [ 12600 ]
        fla Fernando Lopez made changes -
        HD-Enabler IDAS [ 10884 ]
        Description
        Created question in FIWARE Q/A platform on 26-06-2017 at 13:06
        {color: red}Please, ANSWER this question AT{color} 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?

        &lt;device name&gt;@&lt;command name&gt;|&lt;param name&gt;=&lt;value&gt;|....


        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&#39; \
          -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&#39; \
          -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
        Created question in FIWARE Q/A platform on 26-06-2017 at 13:06
        {color: red}Please, ANSWER this question AT{color} 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?

        &lt;device name&gt;@&lt;command name&gt;|&lt;param name&gt;=&lt;value&gt;|....


        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&#39; \
          -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&#39; \
          -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
        HD-Chapter IoT [ 10839 ]
        backlogmanager Backlog Manager made changes -
        Summary [fiware-stackoverflow] Ultralight 2.0 commands with parameters (polling mode) FIWARE.Question.Tech.Ultralight 2.0 commands with parameters (polling mode).
        fla Fernando Lopez made changes -
        Assignee Francisco Romero [ frb ]
        backlogmanager Backlog Manager made changes -
        Resolution Done [ 10000 ]
        Status In Progress [ 3 ] Closed [ 6 ]
        backlogmanager Backlog Manager made changes -
        Status Open [ 1 ] In Progress [ 3 ]
        backlogmanager Backlog Manager made changes -
        Field Original Value New Value
        Component/s FIWARE-TECH-HELP [ 10278 ]
        backlogmanager Backlog Manager created issue -

          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: