MANDATORY_PARAMS_NOT_FOUND is an error message specific to the IoT Agent for JSON. It is usually invoked by an incoming measure which has failed to supply the necessary anti-spoofing information. It should not occur when a command is sent. You have not supplied the actuator provisioning call, but I assume it is something like this:
curl -L -X POST 'http://localhost:4041/iot/devices' \
-H 'fiware-service: openiot' \
-H 'fiware-servicepath: /' \
-H 'Content-Type: application/json' \
--data-raw '{
"devices": [
{
"device_id": "bell001",
"entity_name": "urn:ngsi-ld:Bell:001",
"entity_type": "Bell",
"protocol": "PDI-IoTA-JSON",
"transport": "HTTP",
"endpoint": "http://my-device/iot/bell001",
"commands": [
{
"name": "ring",
"type": "command"
}
]
}
]
}'
Where http://my-device/iot/bell001 is the listening endpoint of the actuator. At a guess your device is responding to this by sending a response to http://iot-agent/iot/json - probably a GET - specifically a response without i or k or d parameters.
i: is the device ID.
k: the API Key for the device's service.
d: the data payload
If you set the IOTA_LOG_LEVEL=DEBUG, the following transactions should occur:
- Incoming Request:
op=IoTAgentNGSI.ContextServer-v2 | from=n/a | srv=openiot | subsrv=/ | msg=Handling v2 update from [iot-agent:4041] | comp=IoTAgent
op=IoTAgentNGSI.ContextServer-v2 | from=n/a | srv=openiot | subsrv=/ | msg={
"entities": [
{
"id": "Bell:001",
"type": "Bell",
"ring": {
"type": "command",
"value": "",
"metadata": {}
}
}
],
"actionType": "update"
} | comp=IoTAgent
- Actuation Request:
op=IoTAgentNGSI.Request | from=n/a | srv=n/a | subsrv=n/a | msg=Options: {
"url": "http://iot-sensors:3001/iot/bell001",
"method": "POST",
"body": "{ring:''}",
"headers": {
"fiware-service": "openiot",
"fiware-servicepath": "/",
"content-type": "application/json"
},
"responseType": "text"
} | comp=IoTAgent
- Set status to pending
op=IoTAgentNGSI.Entities-v2 | from=n/a | srv=n/a | subsrv=n/a | msg=Using the following NGSI v2 request:
{
"url": "http://orion:1026/v2/entities/Bell:001/attrs?type=Bell",
"method": "PATCH",
"headers": {
"fiware-service": "openiot",
"fiware-servicepath": "/"
},
"json": {
"ring_status": {
"type": "commandStatus",
"value": "PENDING",
"metadata": {
"TimeInstant": {
"type": "DateTime",
"value": "2022-07-12T06:47:59.795Z"
}
}
}
}
- If the device responds with 200, set status to
OK
op=IoTAgentNGSI.Entities-v2 | from=n/a | srv=openiot | subsrv=/ | msg=Updating device value in the Context Broker at [http://orion:1026/v2/op/update] | comp=IoTAgent
op=IoTAgentNGSI.Entities-v2 | from=n/a | srv=openiot | subsrv=/ | msg=Using the following NGSI v2 request:
2022-07-12T06:47:59.944482296Z
{
"url": "http://orion:1026/v2/op/update",
"method": "POST",
"headers": {
"fiware-service": "openiot",
"fiware-servicepath": "/"
},
"json": {
"actionType": "update",
"entities": [
{
"ring_status": {
"type": "commandStatus",
"value": "OK",
"metadata": {
"TimeInstant": {
"type": "DateTime",
"value": "2022-07-12T06:47:59.942Z"
}
}
},
"ring_info": {
"type": "commandResult",
"value": " ring OK",
"metadata": {
"TimeInstant": {
"type": "DateTime",
"value": "2022-07-12T06:47:59.942Z"
}
}
}
]
}
}
I'm guessing that your device is responding incorrectly to the actuation request (number 2 in the list)