iotagent-ul icon indicating copy to clipboard operation
iotagent-ul copied to clipboard

Commands queue

Open Secmotic opened this issue 7 years ago • 0 comments

We have detected a probably not desired behavior when sending commands using UL2.0

In order to send several commands to a device and put them in a queue, it is a good idea to send a single update query with all the commands to be queued:

Header:
   Fiware-service: howtoservice
   Fiware-servicepath: /howto
   Content-type: application/json

Body:
  {
	"contextElements": [{
        "type": "Thing",
        "isPattern": false,
        "id":"ID_DEVICE",
        "attributes": [
        	{
        		"name": "get_status", 
        		"type": "command", 
        		"value": "path:test"
        	},
        	{ 
        		"name": "get_param", 
        		"type": "command", 
        		"value": "path:test"
        	}]
      }],
    "updateAction": "UPDATE"
  }

The result of this execution, is that the device receives the following: ID_DEVICE@get_status|path:test|ID_DEVICE@get_param|path:test

But it would be desirable that the device receives: ID_DEVICE@get_status|path:test ID_DEVICE@get_param|path:test

Or is this an expected behavior done by any reason?

Thanks in advance

Secmotic avatar Sep 11 '17 10:09 Secmotic