Details
-
Type:
Monitor
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Unknown
-
HD-Enabler:Unknown
-
HD-Node:Unknown
Description
Created question in FIWARE Q/A platform on 07-06-2025 at 13:06
Please, ANSWER this question AT https://stackoverflow.com/questions/79656997/orion-context-broker-returns-notfound-when-invoking-command-on-provisioned-lor
Question:
Orion context broker returns "NotFound" when invoking command on provisioned LoRaWAN device
Description:
I provisioned an actuator in IoT agent, then want to send command to that actuator with PATCH request, but Orion returns NOT FOUND
I provisioned the device with:
{
"devices": [
{
"device_id": "actuator-testing",
"entity_name": "bell002",
"entity_type": "notifier",
"timezone": "America/Santiago",
"endpoint": "http://localhost:4061/v2/notify",
"attributes": [
],
"commands": [
],
"internal_attributes": {
"lorawan": {
"application_server":
,
"dev_eui": "70B3D57ED007082D",
"app_eui": "1231314133224231",
"application_id": "temp-sensorss@ttn",
"application_key": "CE9CA5D1665846B6B5355C809E0F8FC5",
"data_model": "application_server"
}
}
}
]
}
and with this PATCH request wanted to invoke it
curl http://URL:1026/v2/entities/bell002/attrs?type=notifier \
-d {
"ring":
}
and received this response
{
"error": "NotFound",
"description": "The requested entity has not been found. Check type and id"
}
And this is the config I'm using
orion-v2:
image: quay.io/fiware/orion:4.1.0
hostname: orion
container_name: fiware-orion
depends_on:
- mongo-db
networks:
default:
ipv4_address: 172.18.1.9
expose: - "$
{ORION_PORT}"
ports:
- "${ORION_PORT}:$
{ORION_PORT}" # localhost:1026
#command: -logLevel DEBUG -noCache -dbhost mongodb -corsOrigin __ALL
command: -dbURI mongodb://mongo-db -logLevel DEBUG
iot-agent:
image: fiware/iotagent-ul:3.7.0-distroless
hostname: iot-agent
container_name: fiware-iot-agent
depends_on:
- mongo-db
- orion-v2
networks:
default:
ipv4_address: 172.18.1.100
ports:
- "${IOTA_NORTH_PORT}:${IOTA_NORTH_PORT}" # localhost:4041
- "${IOTA_SOUTH_PORT}:${IOTA_SOUTH_PORT}" # localhost:7896
environment:
- IOTA_CB_HOST=orion
- IOTA_CB_PORT=${ORION_PORT}# port the context broker listens on to update context
- IOTA_NORTH_PORT=$
{IOTA_NORTH_PORT}
- IOTA_REGISTRY_TYPE=mongodb #Whether to hold IoT device info in memory or in a database
- IOTA_LOG_LEVEL=DEBUG # The log level of the IoT Agent
- IOTA_TIMESTAMP=true # Supply timestamp information with each measurement
- IOTA_CB_NGSI_VERSION=v2 # use NGSIv2 when sending updates for active attributes
- IOTA_AUTOCAST=true # Ensure Ultralight number values are read as numbers not strings
- IOTA_MONGO_HOST=mongo-db # The host name of MongoDB
- IOTA_MONGO_PORT=${MONGO_DB_PORT} # The port mongoDB is listening on
- IOTA_MONGO_DB=iotagentjson # The name of the database used in mongoDB
- IOTA_HTTP_PORT=${IOTA_SOUTH_PORT} # The port used for device traffic over HTTP
- IOTA_PROVIDER_URL=http://iot-agent:${IOTA_NORTH_PORT} - IOTA_AUTH_ENABLED=true
- IOTA_AUTH_TYPE=oauth2
- IOTA_AUTH_HEADER=Authorization
- IOTA_AUTH_HOST=keyrock
- IOTA_AUTH_PORT=$
{KEYROCK_PORT}
- IOTA_AUTH_URL=http://keyrock:${KEYROCK_PORT} - IOTA_AUTH_CLIENT_ID=tutorial-dckr-site-0000-xpresswebapp
- IOTA_AUTH_CLIENT_SECRET=tutorial-dckr-site-0000-clientsecret
- IOTA_AUTH_PERMANENT_TOKEN=true
- IOTA_AUTH_TOKEN_PATH=/oauth2/token
You can see the versions, the models and the environment variables that I'm using. I can invoke commands with sending update from IoT agent itself with this request:
curl http://iot-agent-host:4041/v2/op/update \
-d
{ "actionType": "update", "entities": [ { "id": "bell002", "type": "notifier", "ring": { "type": "command", "value":
} } ] }
This works correctly, and updates the ringStatus and ringInfo from the endpoint.
Activity
- All
- Comments
- History
- Activity
- Transitions