[ https://jira.fiware.org/browse/HELP-19882?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Fernando Lopez reassigned HELP-19882: ------------------------------------- Assignee: Miguel Ángel Pedraza > [fiware-stackoverflow] Unable to send Southbound data in Fiware IoTAgent LWM2M > ------------------------------------------------------------------------------ > > Key: HELP-19882 > URL: https://jira.fiware.org/browse/HELP-19882 > Project: Help-Desk > Issue Type: Monitor > Components: FIWARE-TECH-HELP > Reporter: Backlog Manager > Assignee: Miguel Ángel Pedraza > Labels: fiware, fiware-orion, lwm2m > > Created question in FIWARE Q/A platform on 29-07-2022 at 04:07 > {color: red}Please, ANSWER this question AT{color} https://stackoverflow.com/questions/73161618/unable-to-send-southbound-data-in-fiware-iotagent-lwm2m > +Question:+ > Unable to send Southbound data in Fiware IoTAgent LWM2M > +Description:+ > When provisioning the Robot example device, the entities are getting created with position_info and position_status attributes but the update Position attribute in Orion is giving error {"code": "404", "reasonPhrase": "No context element found", "details": "error forwarding update" } > Device provision req: > curl --location --request POST 'localhost:4041/iot/devices' \ > --header 'Content-Type: application/json' \ > --header 'Accept: application/json' \ > --header 'fiware-service: factory' \ > --header 'fiware-servicepath: /robots' \ > --data-raw '{ > "devices": [ > { > "device_id": "robot1", > "entity_type": "Robot", > "entity_name": "robot01", > "endpoint": "http://iot-sensors:3001/iot/robot", > "attributes": [ > { > "name": "Battery", > "type": "number" > } > ], > "lazy": [ > { > "name": "Message", > "type": "string" > } > ], > "commands": [ > { > "name": "Position", > "type": "location" > } > ], > "internal_attributes": { > "lwm2mResourceMapping": { > "Battery" : { > "objectType": 7392, > "objectInstance": 0, > "objectResource": 1 > }, > "Message" : { > "objectType": 7392, > "objectInstance": 0, > "objectResource": 2 > }, > "Position" : { > "objectType": 7392, > "objectInstance": 0, > "objectResource": 3 > } > } > } > } > ] > }' > And Update context request: > curl --location --request POST 'http://localhost:1026/v1/updateContext' \ > --header 'Content-Type: application/json' \ > --header 'Accept: application/json' \ > --header 'fiware-service: factory' \ > --header 'fiware-servicepath: /robots' \ > --data-raw '{ > "contextElements": [ > { > "type": "Robot", > "isPattern": "false", > "id": "Robot:robot1", > "attributes": [ > { > "name": "Position", > "type": "location", > "value": "[18,3]" > } > ] > } > ], > "updateAction": "UPDATE" > }' > As per the documentation, This action should trigger an Execute action in the client. It should also update the "_status" field of the entity with the "PENDING" value, stating the execution is pending of the client result. > I also tried to update the Position attribute using v2 but not working: > curl --location --request PATCH > 'http://localhost:1026/v2/entities/robot01/attrs/' \ > --header 'Content-Type: application/json' \ > --header 'Accept: application/json' \ > --header 'fiware-service: factory' \ > --header 'fiware-servicepath: /robots' \ > -d '{ > "Position": { > "type" : "location", > "value" : "[18,3]" > } > }' -- 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