allow receive commands by CB notifications#1560
Merged
Conversation
2 tasks
fgalan
reviewed
May 22, 2025
|
|
||
| In this case relevant fields are just `targetEntityId`, `targetEntityType`, `cmd` and `params`. | ||
|
|
||
| The IoT Agent detects the selected attribute is a command, and replies to the Context Broker with a 200 OK (without payload). |
Member
There was a problem hiding this comment.
Note that
[
{
"type": "device",
"id": "Dev0001",
"switch": {
"type": "command",
"value": ""
}
}
]
is not a valid response for a notification. It should be 200 OK or 204 No Content (maybe that later one is more appropiate).
(Actually it is not a valid response also for a update, in the "classic" mode, see https://github.com/telefonicaid/fiware-orion/blob/master/doc/manuals/orion-api.md#update-post-v2opupdate. It should be 204 No Content)
fgalan
reviewed
May 22, 2025
fgalan
reviewed
May 22, 2025
Comment on lines
+34
to
+42
| execTs: { type: Date }, | ||
| status: Object, | ||
| info: Object, | ||
| onDelivered: Object, | ||
| onOk: Object, | ||
| onError: Object, | ||
| onInfo: Object, | ||
| cmdExecution: Object, | ||
| dateExpiration: { type: Date }, |
Member
There was a problem hiding this comment.
Now that PR #1717 has been merged... should these fields also added to database model doc?
fgalan
reviewed
May 22, 2025
fgalan
reviewed
May 22, 2025
| } | ||
| ] | ||
| ``` | ||
| The IoT Agent detects the selected attribute is a command, and replies to the Context Broker with a 204 OK (without payload). |
Member
There was a problem hiding this comment.
It seems documentation was not aligned with the code in this case.
Member
|
LGTM |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR does not modify current commands based on CB registrations. It's backward compatible and adds a new way of receive command through a CB notification.
related issue #1455