telefonicaid / telefonicaid/iotagent-node-lib
Sending observations from a device associated to an entity with ambiguity in the type
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 90
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 1
Description
As the uniqueness in the CB is defined by "entitiy_id" and "entity_type" we can have the following entities:
<service, subservice, entity_1, type_A>
<service, subservice, entity_1, type_B>
For this situation we need to use the "type" as URL parameter to distinguish the entity when we make requests to the CB.
Example: https://host/v2/entities/entity_1?type=type_A
Then we create a device associate to an entity with this kind ambiguity, for example:
{
"devices": [
{
"device_id": "tempSensorWSN_A",
"entity_name": "entity_1",
"entity_type": "type_A",
"attributes": [
{ "object_id": "t", "name": "temperature", "type": "float" },
{ "object_id": "h", "name": "humidity", "type": "float" }
],
"protocol": "IoTA-UL",
"transport": "HTTP"
}
]
}
the creation is correct but when we try to send observations through the IoTA (UL2.0 is what I tested), the answer is:
{
"name": "ENTITY_GENERIC_ERROR",
"message": "Error accesing entity data for device: entity_1 of type: type_A"
}
It seems like the IoTA does not add the type paramenter to the URL when create the request to the CB as is needed in these cases.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the UL2.0 observation request for a device whose entity name and type are both ambiguous, then trace the request from the IoTA to the Context Broker. Verify where the Context Broker URL is assembled and confirm that the entity type is included as a URL parameter; done means observations for the example device succeed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100