Details
-
Type:
Monitor
-
Status: Closed
-
Priority:
Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:IoT
-
HD-Enabler:IDAS
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 '
'
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 '
'
Thanks in advance
Activity
Field | Original Value | New Value |
---|---|---|
Component/s | FIWARE-TECH-HELP [ 10278 ] |
Status | Open [ 1 ] | In Progress [ 3 ] |
Resolution | Done [ 10000 ] | |
Status | In Progress [ 3 ] | Closed [ 6 ] |
Assignee | Francisco Romero [ frb ] |
Summary | [fiware-stackoverflow] Ultralight 2.0 commands with parameters (polling mode) | FIWARE.Question.Tech.Ultralight 2.0 commands with parameters (polling mode). |
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? <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 |
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? <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 |
HD-Chapter | IoT [ 10839 ] |
Fix Version/s | 2021 [ 12600 ] |