Details
-
Type: Monitor
-
Status: Closed
-
Priority: Major
-
Resolution: Done
-
Affects Version/s: None
-
Fix Version/s: 2021
-
Component/s: FIWARE-TECH-HELP
-
Labels:
-
HD-Chapter:Data
-
HD-Enabler:Orion
Description
Created question in FIWARE Q/A platform on 17-01-2018 at 18:01
Please, ANSWER this question AT https://stackoverflow.com/questions/48306811/cant-find-device-lazy-attributes-in-orion-context-broker
Question:
Can't find device lazy attributes in Orion Context Broker
Description:
I develop IoT Agent with node.js library. And register device with this through IoTA:
'devices': [{
'device_id': 'ULSensor',
'entity_name': 'Sensor01',
'entity_type': 'BasicULSensor',
'attributes': [
,
{ 'name': 'l', 'type': 'meters' } ],
'lazy': [
,
{ 'name': 'c', 'type': 'curiosity' } ]
}]
Then make request to http://orion:1026/v1/queryContext with this payload:
data = {
"entities": [
]
, "attributes": [
'c'
]
}
And got this:
"errorCode" :
{ "code" : "404", "reasonPhrase" : "No context element found", "details" : "error forwarding query" }But when set 't' in attributes - orion sends correct response. I wrote queryContextHandler and updateContextHandler in IoTA, but they were not called. Orion is a docker image, and node-lib from npm.
IoTA log shows that were two register requests:
"url": "http://orion:1026/NGSI9/registerContext",
"method": "POST",
"json": {
"contextRegistrations": [
{
"entities": [
],
"attributes": [
,
{ "name": "c", "type": "curiosity", "isDomain": "false" } ],
"providingApplication": "http://myiotagent:4042"
}
],
"duration": "P1M"
}
"url": "http://orion:1026/v1/updateContext",
"method": "POST",
"json": {
"contextElements": [
{
"type": "BasicULSensor",
"isPattern": "false",
"id": "Sensor01",
"attributes": [
,
{ "name": "l", "type": "meters", "value": " " } ]
}
],
"updateAction": "APPEND"
}
How to register device correctly or send query to orion to get lazy attributes?
Thanks!
Activity
- All
- Comments
- History
- Activity
- Transitions