[ https://jira.fiware.org/browse/HELP-19818?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez reassigned HELP-19818: ------------------------------------- Assignee: Jason Fox > [fiware-stackoverflow] Error when invoke a PATCH command to Orion Context Broker > -------------------------------------------------------------------------------- > > Key: HELP-19818 > URL: https://jira.fiware.org/browse/HELP-19818 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Jason Fox > Labels: fiware, fiware-orion > > Created question in FIWARE Q/A platform on 11-07-2022 at 15:07 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/72941258/error-when-invoke-a-patch-command-to-orion-context-broker > +Question:+ > Error when invoke a PATCH command to Orion Context Broker > +Description:+ > We're trying to invoke commands from Orion to IoT Device using PATCH and POST requests, but we're always having the following error: > Error [MANDATORY_PARAMS_NOT_FOUND] handing request: > Some of the mandatory params weren't found in the request: ["API Key","Device Id","Payload"] > Steps: > Create a "Device Entity" in Orion Context Broker > Provisioning a new Device > Create a Service in IoT JSON Agent > { > "services": [ > { > "apikey": "my_api_key", > "protocol": [ > "IoTA-JSON" > ], > "cbroker": "orion:1026", > "entity_type": "Device", > "resource": "/iot/json" > } > ] > } > Send a POST request to http://iot-agent-host:4041/v2/op/update to execute a command, via gateway, into the IoT Device (Works OK): > { > "actionType": "update", > "entities": [ > { > "id": "shelly-1pm-test", > "type": "Device", > "cmd": { > "type": "command", > "value": { > "turn": "off", > "idDevice": "device001" > } > } > } > ] > } > Send a PATCH request to http://context-broker-host:1026/v2/entities/entity-name/attrs to execute a command, via Orion CB, into the IoT Device, getting 204 in the response: > { > "cmd": { > "type": "command", > "value": { > "turn": "off", > "idDevice": "98cdac2e6101" > } > } > } > The command is not executed. Viewing the IoT JSON Agent logfile we can see: > [MANDATORY_PARAMS_NOT_FOUND] handing request: Some of the mandatory params weren't found in the request: ["API Key","Device Id","Payload"] > Any ideas? > Thanks in advance -- 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