telefonicaid / telefonicaid/iotagent-node-lib
updateHandler with device parameter
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 62
- Forks
- 90
- Avg merge
- 2h 35m
- Merged PRs (30d)
- 1
Description
Hi,
I'm trying to use updateHandler to send updates to the devices. The issue here is that I have internal attributes with each device and I need to check them before sending the updates or commands. I found that the parameters are only limited to "id, type, service, subservice, attributes, callback" without the device itself. In this way I'm force to get the device "again" to get check the internal attributes.
I checked the source in the contextServer.js file and this issue can be solved by adding the device in the parameters. My question, is there any reason not to send the device in the parameters list? or is there any better way to get the device without re-fetching it from the database?
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 in contextServer.js and trace how updateHandler receives and uses its current parameters. Check whether passing the device would preserve the existing handler contract and identify how internal device attributes are currently obtained. Done means the update handler can inspect those attributes without fetching the device again, with the API behavior clearly defined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100