Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add command entity creation documentation #1551

Merged
merged 26 commits into from
Jul 31, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions doc/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@
- [Config groups](#config-groups)
- [Devices](#devices)
- [Entity attributes](#entity-attributes)
- [Device autoprovision and entity creation](#device-autoprovision-and-entity-creation)
- [Entity creation before sending commands](#entity-creation-before-sending-commands)
- [Multientity support)](#multientity-support)
- [Metadata support](#metadata-support)
- [NGSI LD data and metadata considerations](#ngsi-ld-data-and-metadata-considerations)
Expand Down Expand Up @@ -215,6 +217,27 @@ Note that, when information coming from devices, this means measures, are not de
device, the IoT agent will store that information into the destination entity using the same attribute name than the
measure name, unless `explicitAttrs` is defined. Measures `id` or `type` names are invalid, and will be ignored.

## Device autoprovision and entity creation
mapedraza marked this conversation as resolved.
Show resolved Hide resolved

For those agents that uses IoTA Node LIB version 3.4.0 or higher, you should consider that the entity is not created
automaticaly when a device is created. This means that al entities into the context broker are created when data
arrives from a device, either if the device is created or autoprovisioned.
mapedraza marked this conversation as resolved.
Show resolved Hide resolved
mapedraza marked this conversation as resolved.
Show resolved Hide resolved

### Entity creation before sending commands

Before sending commands, it is needed the entity is created. This mean you need to create the entity into the context
broker by one of the multiples methods that creates an entity before updating the command attribute. Otherwise, you
would obtain an error like the following one when updating the entity into the context broker.
mapedraza marked this conversation as resolved.
Show resolved Hide resolved

```json
{
"error": "NotFound",
"description": "The requested entity has not been found. Check type and id"
}
```

For further information, check the issue [fiware-orion/#4430](https://github.com/telefonicaid/fiware-orion/issues/4430)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should a paragraph explaining what to do if you need the entity in advance? Something like this:

If for any reason you need the entity at CB before the first measure of the corresponding device arrives to the IOTAgent, you can create it in advance using the CB NGSIv2 API.

Please, adapt/improve the text as needed.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in 557f75a

## Multientity support

The IOTA is able to persists measures coming from a single device to more than one entity, declaring the target entities
Expand Down
Loading