[ https://jira.fiware.org/browse/HELP-16181?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jason Fox closed HELP-16181. ---------------------------- Resolution: Dismissed > [fiware-stackoverflow] FIWARE commands from CB to Ultralight 2.0 device > ----------------------------------------------------------------------- > > Key: HELP-16181 > URL: https://jira.fiware.org/browse/HELP-16181 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Jason Fox > Labels: fiware > > Created question in FIWARE Q/A platform on 03-10-2019 at 10:10 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/58214910/fiware-commands-from-cb-to-ultralight-2-0-device > +Question:+ > FIWARE commands from CB to Ultralight 2.0 device > +Description:+ > I need to send commands from a FIWARE CB to an UltraLight 2.0 device through an IoT agent via HTTP (polling mode). Although this tutorial only explains how to provision commands for a specific device: > https://fiware-iotagent-ul.readthedocs.io/en/latest/usermanual/index.html > I'm trying to provision a couple of commands (no2_offset and no2_factor) for the whole service group as follows: > HTTP POST http://localhost:4041/iot/services > { > "services": [ > { > "apikey": "si95g7noxpmah9cbx9ggoe36v7", > "protocol": ["IoTA-UL"], "cbroker": "http://orion:1026", > "entity_type": "myType", > "resource": "/iot/d", > "attributes": [ > { > "object_id": "t", > "name": "temperature", > "type": "Number" > }, > { > "object_id": "h", > "name": "humidity", > "type": "Number" > }, > { > "object_id": "no2", > "name": "NO2", > "type": "Number" > }], > "commands": [ > { > "object_id": "no2off", > "name": "no2_offset", > "type": "command" > }, > { > "object_id": "no2fac", > "name": "no2_factor", > "type": "command" > }] > } > ]} > The CB accepts the above request without problems. Then I query an entity under the above service group and I get the following response: > [ > { > "id": "myServicePath:DEVICE_807D3AF39E18", > "type": "myType", > "NO2": { > "type": "Number", > "value": 3.76, > "metadata": { > "TimeInstant": { > "type": "DateTime", > "value": "2019-10-02T15:56:35.00Z" > } > } > }, > "TimeInstant": { > "type": "DateTime", > "value": "2019-10-02T15:56:35.00Z", > "metadata": {} > }, > "humidity": { > "type": "Number", > "value": 42.73, > "metadata": { > "TimeInstant": { > "type": "DateTime", > "value": "2019-10-02T15:56:35.00Z" > } > } > }, > "no2_factor_info": { > "type": "commandResult", > "value": " ", > "metadata": {} > }, > "no2_factor_status": { > "type": "commandStatus", > "value": "PENDING", > "metadata": { > "TimeInstant": { > "type": "DateTime", > "value": "2019-10-02T15:36:21.00Z" > } > } > }, > "no2_offset_info": { > "type": "commandResult", > "value": " ", > "metadata": {} > }, > "no2_offset_status": { > "type": "commandStatus", > "value": "PENDING", > "metadata": { > "TimeInstant": { > "type": "DateTime", > "value": "2019-10-02T14:40:56.00Z" > } > } > }, > "temperature": { > "type": "Number", > "value": 26.49, > "metadata": { > "TimeInstant": { > "type": "DateTime", > "value": "2019-10-02T15:56:35.00Z" > } > } > }, > "no2_offset": { > "type": "string", > "value": "", > "metadata": {} > }, > "no2_factor": { > "type": "string", > "value": "", > "metadata": {} > } > } > ] > Both commands, along with some *_info and *_status stuff appear integrated among the rest of attributes. Everything looks good to me except for the type=string instead of type=command. In any case, whenever I update the entity with a new command value I never get the command on the device side (body always empty) although getting the entity really shows the update. > Any idea? Is provisioning commands in the creation of service groups supported? > Thanks in advance for your time, > Daniel. -- This message was sent by Atlassian JIRA (v6.4.1#64016)
You can get more information about our cookies and privacy policies clicking on the following links: Privacy policy Cookies policy