Reputation: 29
I am trying to provision a device and send actuation commands back using 1 component Orion.
I have successfully provisioned the device using to update orion query:
curl -iX POST \
'http://orion:1024/v2/op/update' \
-H 'Content-Type: application/json' \
-H 'fiware-service: agriculture' \
-H 'fiware-servicepath: /agriculture' \
-d '{
"actionType":"update",
"entities":[{"motor":{"type":"command","value":{"requestTime":"2023-11-17T06:50:00.060",
"payload":{"motor_status":"on","requestTimestamp":"2023-11-17T18:49:59.091",
"motor_status":"on"},"transactionId":"xxxx-87a5-4xxx2-xxx-xxxxxxx"}},"id":"urn:ngsi-ld:test:test1","type":"test"}]}
I am facing, and after trying, I have obtained this error:
{"error":"NotFound","description":"The requested entity has not been found. Check type and id"}
while Orion reported
fiware-orion Starting transaction to http://orion:1024/v2/op/update
fiware-orion | ERROR@10:16:34 postUpdateContext.cpp[190]:Runtime Error (error 'Timeout was reached' forwarding 'Update' to providing application)
fiware-orion | INFO@10:16:34 logMsg.h[1874]: Transaction ended
Thank you in advance I appreciate your help!
Upvotes: 0
Views: 97
Reputation: 5290
Your provider is incorrect. You have used the batch upsert operation to create an entity in Orion called urn:ngsi-ld:test:test1
. However your registration is circular, it is forwarding "attrs": ["on", "off"]
to http://orion:1024/v2/op/update
- this would mean that the registant service would receive a batch request on http://orion:1024/v2/op/update/v2/op/update
which does not exist.
Even if you altered the provider to http://orion:1024
, that is still wrong, as a context broker shouldn't registering directly back onto itself - you should be using another microservice such as an IoT Agent to translate the NGSI actuation request down to a low level protocol understood by a device.
Upvotes: 2