telefonicaid / telefonicaid/iotagent-node-lib

Multientity plugin entity_name based on registered device id

Open
#913 8 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
62
Forks
90
Avg merge
2h 35m
Merged PRs (30d)
1

Description

Hello guys,

I was making use of the multi-entity plugin for the first time with the lwm2m iotagent. My goal was to create a DeviceConfig entity with lazy attributes and another Device entity with active attributes.
The problem I found is that the name of the entity in the multi-entity plugin must always be explicitly added to the resource. E.g.

{
    "name": "Longitude",
    "type": "Number",
    "entity_name": "idas-03-service:Other",
    "entity_type": "Other"
}

In this case, you can see how for a resource a specific type and entity name is added.
What I would like to know is if there is a way to change the entity name dynamically depending on the id of the registered device. Something like that:

{
    "name": "Longitude",
    "type": "Number",
    "entity_name": "${@id}:Other",
    "entity_type": "Other"
}

This way you could make use of the multi-entity plugin by using static provisioning (config.js file) or service provisioning.

Perhaps it is possible to solve this problem in another way. Any advice?
Thank you very much for your time and efforts,
Greetings,

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the multi-entity plugin and the config.js static-provisioning path mentioned in the report, then compare how service provisioning supplies the registered device id. Determine whether entity_name can be resolved from that id in both provisioning modes. Done means the supported behavior or limitation is documented and verified for the LwM2M IoT Agent use case.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend-api-design, embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
28/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.