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
2018-01-12 19:51|CREATED monitor | # answers= 1, accepted answer= True